Lines Matching full:mp
36 struct xfs_mount *mp, in xfs_failure_pgoff() argument
40 loff_t pos = XFS_FSB_TO_B(mp, rec->rm_offset); in xfs_failure_pgoff()
43 pos += XFS_FSB_TO_B(mp, in xfs_failure_pgoff()
50 struct xfs_mount *mp, in xfs_failure_pgcnt() argument
65 return XFS_FSB_TO_B(mp, end_cross - start_cross) >> PAGE_SHIFT; in xfs_failure_pgcnt()
74 struct xfs_mount *mp = cur->bc_mp; in xfs_dax_failure_fn() local
92 error = xfs_iget(mp, cur->bc_tp, rec->rm_owner, XFS_IGET_INCORE, in xfs_dax_failure_fn()
103 pgoff = xfs_failure_pgoff(mp, rec, notify); in xfs_dax_failure_fn()
104 pgcnt = xfs_failure_pgcnt(mp, rec, notify); in xfs_dax_failure_fn()
122 struct xfs_mount *mp) in xfs_dax_notify_failure_freeze() argument
124 struct super_block *sb = mp->m_super; in xfs_dax_notify_failure_freeze()
129 xfs_emerg(mp, "already frozen by kernel, err=%d", error); in xfs_dax_notify_failure_freeze()
136 struct xfs_mount *mp, in xfs_dax_notify_failure_thaw() argument
139 struct super_block *sb = mp->m_super; in xfs_dax_notify_failure_thaw()
145 xfs_emerg(mp, "still frozen after notify failure, err=%d", in xfs_dax_notify_failure_thaw()
158 struct xfs_mount *mp, in xfs_dax_notify_ddev_failure() argument
169 xfs_fsblock_t fsbno = XFS_DADDR_TO_FSB(mp, daddr); in xfs_dax_notify_ddev_failure()
170 xfs_agnumber_t agno = XFS_FSB_TO_AGNO(mp, fsbno); in xfs_dax_notify_ddev_failure()
171 xfs_fsblock_t end_fsbno = XFS_DADDR_TO_FSB(mp, in xfs_dax_notify_ddev_failure()
173 xfs_agnumber_t end_agno = XFS_FSB_TO_AGNO(mp, end_fsbno); in xfs_dax_notify_ddev_failure()
176 xfs_info(mp, "Device is about to be removed!"); in xfs_dax_notify_ddev_failure()
185 kernel_frozen = xfs_dax_notify_failure_freeze(mp) == 0; in xfs_dax_notify_ddev_failure()
188 error = xfs_trans_alloc_empty(mp, &tp); in xfs_dax_notify_ddev_failure()
199 pag = xfs_perag_get(mp, agno); in xfs_dax_notify_ddev_failure()
206 cur = xfs_rmapbt_init_cursor(mp, tp, agf_bp, pag); in xfs_dax_notify_ddev_failure()
213 ri_low.rm_startblock = XFS_FSB_TO_AGBNO(mp, fsbno); in xfs_dax_notify_ddev_failure()
215 ri_high.rm_startblock = XFS_FSB_TO_AGBNO(mp, end_fsbno); in xfs_dax_notify_ddev_failure()
231 fsbno = XFS_AGB_TO_FSB(mp, agno + 1, 0); in xfs_dax_notify_ddev_failure()
243 xfs_force_shutdown(mp, SHUTDOWN_FORCE_UMOUNT); in xfs_dax_notify_ddev_failure()
245 xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_ONDISK); in xfs_dax_notify_ddev_failure()
253 xfs_dax_notify_failure_thaw(mp, kernel_frozen); in xfs_dax_notify_ddev_failure()
265 struct xfs_mount *mp = dax_holder(dax_dev); in xfs_dax_notify_failure() local
269 if (!(mp->m_super->s_flags & SB_BORN)) { in xfs_dax_notify_failure()
270 xfs_warn(mp, "filesystem is not ready for notify_failure()!"); in xfs_dax_notify_failure()
274 if (mp->m_rtdev_targp && mp->m_rtdev_targp->bt_daxdev == dax_dev) { in xfs_dax_notify_failure()
275 xfs_debug(mp, in xfs_dax_notify_failure()
280 if (mp->m_logdev_targp && mp->m_logdev_targp->bt_daxdev == dax_dev && in xfs_dax_notify_failure()
281 mp->m_logdev_targp != mp->m_ddev_targp) { in xfs_dax_notify_failure()
290 xfs_err(mp, "ondisk log corrupt, shutting down fs!"); in xfs_dax_notify_failure()
291 xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_ONDISK); in xfs_dax_notify_failure()
295 if (!xfs_has_rmapbt(mp)) { in xfs_dax_notify_failure()
296 xfs_debug(mp, "notify_failure() needs rmapbt enabled!"); in xfs_dax_notify_failure()
300 ddev_start = mp->m_ddev_targp->bt_dax_part_off; in xfs_dax_notify_failure()
301 ddev_end = ddev_start + bdev_nr_bytes(mp->m_ddev_targp->bt_bdev) - 1; in xfs_dax_notify_failure()
306 len = bdev_nr_bytes(mp->m_ddev_targp->bt_bdev); in xfs_dax_notify_failure()
325 return xfs_dax_notify_ddev_failure(mp, BTOBB(offset), BTOBB(len), in xfs_dax_notify_failure()