Lines Matching refs:bno
232 xfs_fsblock_t bno) in xfs_bmap_get_bp() argument
243 if (xfs_buf_daddr(cur->bc_levels[i].bp) == bno) in xfs_bmap_get_bp()
252 xfs_buf_daddr(bip->bli_buf) == bno) in xfs_bmap_get_bp()
324 xfs_fsblock_t bno; /* block # of "block" */ in xfs_bmap_check_leaf_extents() local
342 bno = NULLFSBLOCK; in xfs_bmap_check_leaf_extents()
351 bno = be64_to_cpu(*pp); in xfs_bmap_check_leaf_extents()
353 ASSERT(bno != NULLFSBLOCK); in xfs_bmap_check_leaf_extents()
354 ASSERT(XFS_FSB_TO_AGNO(mp, bno) < mp->m_sb.sb_agcount); in xfs_bmap_check_leaf_extents()
355 ASSERT(XFS_FSB_TO_AGBNO(mp, bno) < mp->m_sb.sb_agblocks); in xfs_bmap_check_leaf_extents()
364 bp = xfs_bmap_get_bp(cur, XFS_FSB_TO_DADDR(mp, bno)); in xfs_bmap_check_leaf_extents()
367 error = xfs_btree_read_bufl(mp, NULL, bno, &bp, in xfs_bmap_check_leaf_extents()
384 bno = be64_to_cpu(*pp); in xfs_bmap_check_leaf_extents()
385 if (XFS_IS_CORRUPT(mp, !xfs_verify_fsbno(mp, bno))) { in xfs_bmap_check_leaf_extents()
442 bno = nextbno; in xfs_bmap_check_leaf_extents()
446 if (bno == NULLFSBLOCK) in xfs_bmap_check_leaf_extents()
450 bp = xfs_bmap_get_bp(cur, XFS_FSB_TO_DADDR(mp, bno)); in xfs_bmap_check_leaf_extents()
453 error = xfs_btree_read_bufl(mp, NULL, bno, &bp, in xfs_bmap_check_leaf_extents()
484 xfs_fileoff_t bno, in xfs_bmap_validate_ret() argument
498 ASSERT(mval[i].br_startoff >= bno); in xfs_bmap_validate_ret()
501 bno + len); in xfs_bmap_validate_ret()
503 ASSERT(mval[i].br_startoff < bno + len); in xfs_bmap_validate_ret()
505 bno); in xfs_bmap_validate_ret()
519 #define xfs_bmap_validate_ret(bno,len,flags,mval,onmap,nmap) do { } while (0) argument
3692 xfs_fileoff_t bno, in xfs_trim_extent() argument
3696 xfs_fileoff_t end = bno + len; in xfs_trim_extent()
3698 if (irec->br_startoff + irec->br_blockcount <= bno || in xfs_trim_extent()
3704 if (irec->br_startoff < bno) { in xfs_trim_extent()
3705 distance = bno - irec->br_startoff; in xfs_trim_extent()
3728 xfs_fileoff_t *bno, in xfs_bmapi_trim_map() argument
3743 if (obno > *bno) in xfs_bmapi_trim_map()
3744 *bno = obno; in xfs_bmapi_trim_map()
3745 ASSERT((*bno >= obno) || (n == 0)); in xfs_bmapi_trim_map()
3746 ASSERT(*bno < end); in xfs_bmapi_trim_map()
3747 mval->br_startoff = *bno; in xfs_bmapi_trim_map()
3752 (*bno - got->br_startoff); in xfs_bmapi_trim_map()
3760 mval->br_blockcount = XFS_FILBLKS_MIN(end - *bno, in xfs_bmapi_trim_map()
3761 got->br_blockcount - (*bno - got->br_startoff)); in xfs_bmapi_trim_map()
3773 xfs_fileoff_t *bno, in xfs_bmapi_update_map() argument
3787 *bno = mval->br_startoff + mval->br_blockcount; in xfs_bmapi_update_map()
3788 *len = end - *bno; in xfs_bmapi_update_map()
3827 xfs_fileoff_t bno, in xfs_bmapi_read() argument
3864 if (!xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) in xfs_bmapi_read()
3866 end = bno + len; in xfs_bmapi_read()
3867 obno = bno; in xfs_bmapi_read()
3869 while (bno < end && n < *nmap) { in xfs_bmapi_read()
3873 if (got.br_startoff > bno) { in xfs_bmapi_read()
3875 mval->br_startoff = bno; in xfs_bmapi_read()
3878 XFS_FILBLKS_MIN(len, got.br_startoff - bno); in xfs_bmapi_read()
3880 bno += mval->br_blockcount; in xfs_bmapi_read()
3888 xfs_bmapi_trim_map(mval, &got, &bno, len, obno, end, n, flags); in xfs_bmapi_read()
3889 xfs_bmapi_update_map(&mval, &bno, &len, obno, end, &n, flags); in xfs_bmapi_read()
3892 if (bno >= end || n >= *nmap) in xfs_bmapi_read()
4277 xfs_fileoff_t bno, /* starting file offs. mapped */ in xfs_bmapi_write() argument
4305 orig_bno = bno; in xfs_bmapi_write()
4346 if (!xfs_iext_lookup_extent(ip, ifp, bno, &bma.icur, &bma.got)) in xfs_bmapi_write()
4353 end = bno + len; in xfs_bmapi_write()
4354 obno = bno; in xfs_bmapi_write()
4355 while (bno < end && n < *nmap) { in xfs_bmapi_write()
4359 if (eof || bma.got.br_startoff > bno) { in xfs_bmapi_write()
4381 bma.offset = bno; in xfs_bmapi_write()
4414 xfs_bmapi_trim_map(mval, &bma.got, &bno, len, obno, in xfs_bmapi_write()
4425 xfs_bmapi_update_map(&mval, &bno, &len, obno, end, &n, flags); in xfs_bmapi_write()
4432 if (bno >= end || n >= *nmap || bma.nallocs >= *nmap) in xfs_bmapi_write()
4598 xfs_fileoff_t bno, in xfs_bmapi_remap() argument
4632 if (xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) { in xfs_bmapi_remap()
4634 ASSERT(got.br_startoff > bno); in xfs_bmapi_remap()
4635 ASSERT(got.br_startoff - bno >= len); in xfs_bmapi_remap()
4646 got.br_startoff = bno; in xfs_bmapi_remap()
5028 xfs_fsblock_t bno; in xfs_bmap_del_extent_real() local
5030 bno = div_u64_rem(del->br_startblock, in xfs_bmap_del_extent_real()
5034 error = xfs_rtfree_extent(tp, bno, (xfs_extlen_t)len); in xfs_bmap_del_extent_real()
5539 xfs_fileoff_t bno, in xfs_bunmapi() argument
5547 error = __xfs_bunmapi(tp, ip, bno, &len, flags, nexts); in xfs_bunmapi()