Lines Matching full:mp

80 	struct xfs_mount	*mp = args->mp;  in xfs_rtbuf_get()  local
93 ip = mp->m_rsumip; in xfs_rtbuf_get()
98 ip = mp->m_rbmip; in xfs_rtbuf_get()
121 if (XFS_IS_CORRUPT(mp, nmap == 0 || !xfs_bmap_is_written_extent(&map))) { in xfs_rtbuf_get()
122 xfs_rt_mark_sick(mp, issum ? XFS_SICK_RT_SUMMARY : in xfs_rtbuf_get()
128 error = xfs_trans_read_buf(mp, args->tp, mp->m_ddev_targp, in xfs_rtbuf_get()
129 XFS_FSB_TO_DADDR(mp, map.br_startblock), in xfs_rtbuf_get()
130 mp->m_bsize, 0, &bp, &xfs_rtbuf_ops); in xfs_rtbuf_get()
132 xfs_rt_mark_sick(mp, issum ? XFS_SICK_RT_SUMMARY : in xfs_rtbuf_get()
148 struct xfs_mount *mp = args->mp; in xfs_rtbitmap_read_buf() local
150 if (XFS_IS_CORRUPT(mp, block >= mp->m_sb.sb_rbmblocks)) { in xfs_rtbitmap_read_buf()
151 xfs_rt_mark_sick(mp, XFS_SICK_RT_BITMAP); in xfs_rtbitmap_read_buf()
163 struct xfs_mount *mp = args->mp; in xfs_rtsummary_read_buf() local
165 if (XFS_IS_CORRUPT(mp, block >= mp->m_rsumblocks)) { in xfs_rtsummary_read_buf()
166 xfs_rt_mark_sick(args->mp, XFS_SICK_RT_SUMMARY); in xfs_rtsummary_read_buf()
182 struct xfs_mount *mp = args->mp; in xfs_rtfind_back() local
198 block = xfs_rtx_to_rbmblock(mp, start); in xfs_rtfind_back()
206 word = xfs_rtx_to_rbmword(mp, start); in xfs_rtfind_back()
252 word = mp->m_blockwsize - 1; in xfs_rtfind_back()
290 word = mp->m_blockwsize - 1; in xfs_rtfind_back()
336 struct xfs_mount *mp = args->mp; in xfs_rtfind_forw() local
354 block = xfs_rtx_to_rbmblock(mp, start); in xfs_rtfind_forw()
362 word = xfs_rtx_to_rbmword(mp, start); in xfs_rtfind_forw()
399 if (++word == mp->m_blockwsize && i < len) { in xfs_rtfind_forw()
437 if (++word == mp->m_blockwsize && i < len) { in xfs_rtfind_forw()
504 struct xfs_mount *mp = args->mp; in xfs_rtmodify_summary() local
505 xfs_rtsumoff_t so = xfs_rtsumoffs(mp, log, bbno); in xfs_rtmodify_summary()
510 error = xfs_rtsummary_read_buf(args, xfs_rtsumoffs_to_block(mp, so)); in xfs_rtmodify_summary()
514 infoword = xfs_rtsumoffs_to_infoword(mp, so); in xfs_rtmodify_summary()
517 if (mp->m_rsum_cache) { in xfs_rtmodify_summary()
518 if (val == 0 && log + 1 == mp->m_rsum_cache[bbno]) in xfs_rtmodify_summary()
519 mp->m_rsum_cache[bbno] = log; in xfs_rtmodify_summary()
520 if (val != 0 && log >= mp->m_rsum_cache[bbno]) in xfs_rtmodify_summary()
521 mp->m_rsum_cache[bbno] = log + 1; in xfs_rtmodify_summary()
539 struct xfs_mount *mp = args->mp; in xfs_rtget_summary() local
540 xfs_rtsumoff_t so = xfs_rtsumoffs(mp, log, bbno); in xfs_rtget_summary()
543 error = xfs_rtsummary_read_buf(args, xfs_rtsumoffs_to_block(mp, so)); in xfs_rtget_summary()
545 *sum = xfs_suminfo_get(args, xfs_rtsumoffs_to_infoword(mp, so)); in xfs_rtget_summary()
576 struct xfs_mount *mp = args->mp; in xfs_rtmodify_range() local
590 block = xfs_rtx_to_rbmblock(mp, start); in xfs_rtmodify_range()
601 firstword = word = xfs_rtx_to_rbmword(mp, start); in xfs_rtmodify_range()
631 if (++word == mp->m_blockwsize && i < len) { in xfs_rtmodify_range()
663 if (++word == mp->m_blockwsize && i < len) { in xfs_rtmodify_range()
714 struct xfs_mount *mp = args->mp; in xfs_rtfree_range() local
740 error = xfs_rtfind_forw(args, end, mp->m_sb.sb_rextents - 1, in xfs_rtfree_range()
751 xfs_rtx_to_rbmblock(mp, preblock), -1); in xfs_rtfree_range()
763 xfs_rtx_to_rbmblock(mp, end + 1), -1); in xfs_rtfree_range()
774 xfs_rtx_to_rbmblock(mp, preblock), 1); in xfs_rtfree_range()
790 struct xfs_mount *mp = args->mp; in xfs_rtcheck_range() local
804 block = xfs_rtx_to_rbmblock(mp, start); in xfs_rtcheck_range()
815 word = xfs_rtx_to_rbmword(mp, start); in xfs_rtcheck_range()
852 if (++word == mp->m_blockwsize && i < len) { in xfs_rtcheck_range()
891 if (++word == mp->m_blockwsize && i < len) { in xfs_rtcheck_range()
967 struct xfs_mount *mp = tp->t_mountp; in xfs_rtfree_extent() local
969 .mp = mp, in xfs_rtfree_extent()
975 ASSERT(mp->m_rbmip->i_itemp != NULL); in xfs_rtfree_extent()
976 xfs_assert_ilocked(mp->m_rbmip, XFS_ILOCK_EXCL); in xfs_rtfree_extent()
997 if (tp->t_frextents_delta + mp->m_sb.sb_frextents == in xfs_rtfree_extent()
998 mp->m_sb.sb_rextents) { in xfs_rtfree_extent()
999 if (!(mp->m_rbmip->i_diflags & XFS_DIFLAG_NEWRTBM)) in xfs_rtfree_extent()
1000 mp->m_rbmip->i_diflags |= XFS_DIFLAG_NEWRTBM; in xfs_rtfree_extent()
1002 atime = inode_get_atime(VFS_I(mp->m_rbmip)); in xfs_rtfree_extent()
1004 inode_set_atime_to_ts(VFS_I(mp->m_rbmip), atime); in xfs_rtfree_extent()
1005 xfs_trans_log_inode(tp, mp->m_rbmip, XFS_ILOG_CORE); in xfs_rtfree_extent()
1024 struct xfs_mount *mp = tp->t_mountp; in xfs_rtfree_blocks() local
1029 mod = xfs_rtb_to_rtxoff(mp, rtlen); in xfs_rtfree_blocks()
1035 mod = xfs_rtb_to_rtxoff(mp, rtbno); in xfs_rtfree_blocks()
1041 return xfs_rtfree_extent(tp, xfs_rtb_to_rtx(mp, rtbno), in xfs_rtfree_blocks()
1042 xfs_rtb_to_rtx(mp, rtlen)); in xfs_rtfree_blocks()
1048 struct xfs_mount *mp, in xfs_rtalloc_query_range() argument
1056 .mp = mp, in xfs_rtalloc_query_range()
1063 if (start == end || start >= mp->m_sb.sb_rextents) in xfs_rtalloc_query_range()
1066 end = min(end, mp->m_sb.sb_rextents - 1); in xfs_rtalloc_query_range()
1089 error = fn(mp, tp, &rec, priv); in xfs_rtalloc_query_range()
1104 struct xfs_mount *mp, in xfs_rtalloc_query_all() argument
1109 return xfs_rtalloc_query_range(mp, tp, 0, mp->m_sb.sb_rextents - 1, fn, in xfs_rtalloc_query_all()
1116 struct xfs_mount *mp, in xfs_rtalloc_extent_is_free() argument
1123 .mp = mp, in xfs_rtalloc_extent_is_free()
1145 struct xfs_mount *mp, in xfs_rtbitmap_blockcount() argument
1148 return howmany_64(rtextents, NBBY * mp->m_sb.sb_blocksize); in xfs_rtbitmap_blockcount()
1154 struct xfs_mount *mp, in xfs_rtsummary_blockcount() argument
1161 return XFS_B_TO_FSB(mp, rsumwords << XFS_WORDLOG); in xfs_rtsummary_blockcount()
1167 struct xfs_mount *mp) in xfs_rtbitmap_lock() argument
1169 xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL | XFS_ILOCK_RTBITMAP); in xfs_rtbitmap_lock()
1170 xfs_ilock(mp->m_rsumip, XFS_ILOCK_EXCL | XFS_ILOCK_RTSUM); in xfs_rtbitmap_lock()
1188 struct xfs_mount *mp) in xfs_rtbitmap_unlock() argument
1190 xfs_iunlock(mp->m_rsumip, XFS_ILOCK_EXCL | XFS_ILOCK_RTSUM); in xfs_rtbitmap_unlock()
1191 xfs_iunlock(mp->m_rbmip, XFS_ILOCK_EXCL | XFS_ILOCK_RTBITMAP); in xfs_rtbitmap_unlock()
1200 struct xfs_mount *mp, in xfs_rtbitmap_lock_shared() argument
1204 xfs_ilock(mp->m_rbmip, XFS_ILOCK_SHARED | XFS_ILOCK_RTBITMAP); in xfs_rtbitmap_lock_shared()
1207 xfs_ilock(mp->m_rsumip, XFS_ILOCK_SHARED | XFS_ILOCK_RTSUM); in xfs_rtbitmap_lock_shared()
1213 struct xfs_mount *mp, in xfs_rtbitmap_unlock_shared() argument
1217 xfs_iunlock(mp->m_rsumip, XFS_ILOCK_SHARED | XFS_ILOCK_RTSUM); in xfs_rtbitmap_unlock_shared()
1220 xfs_iunlock(mp->m_rbmip, XFS_ILOCK_SHARED | XFS_ILOCK_RTBITMAP); in xfs_rtbitmap_unlock_shared()
1230 struct xfs_mount *mp = ip->i_mount; in xfs_rtfile_alloc_blocks() local
1235 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_growrtalloc, in xfs_rtfile_alloc_blocks()
1236 XFS_GROWFSRT_SPACE_RES(mp, count_fsb), 0, 0, &tp); in xfs_rtfile_alloc_blocks()
1267 struct xfs_mount *mp = ip->i_mount; in xfs_rtfile_initialize_block() local
1270 const size_t copylen = mp->m_blockwsize << XFS_WORDLOG; in xfs_rtfile_initialize_block()
1274 if (ip == mp->m_rsumip) in xfs_rtfile_initialize_block()
1279 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_growrtzero, 0, 0, 0, &tp); in xfs_rtfile_initialize_block()
1285 error = xfs_trans_get_buf(tp, mp->m_ddev_targp, in xfs_rtfile_initialize_block()
1286 XFS_FSB_TO_DADDR(mp, fsbno), mp->m_bsize, 0, &bp); in xfs_rtfile_initialize_block()
1298 xfs_trans_log_buf(tp, bp, 0, mp->m_sb.sb_blocksize - 1); in xfs_rtfile_initialize_block()
1314 struct xfs_mount *mp = ip->i_mount; in xfs_rtfile_initialize_blocks() local
1315 const size_t copylen = mp->m_blockwsize << XFS_WORDLOG; in xfs_rtfile_initialize_blocks()