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
3726 xfs_fileoff_t bno, in xfs_trim_extent() argument
3730 xfs_fileoff_t end = bno + len; in xfs_trim_extent()
3732 if (irec->br_startoff + irec->br_blockcount <= bno || in xfs_trim_extent()
3738 if (irec->br_startoff < bno) { in xfs_trim_extent()
3739 distance = bno - irec->br_startoff; in xfs_trim_extent()
3762 xfs_fileoff_t *bno, in xfs_bmapi_trim_map() argument
3777 if (obno > *bno) in xfs_bmapi_trim_map()
3778 *bno = obno; in xfs_bmapi_trim_map()
3779 ASSERT((*bno >= obno) || (n == 0)); in xfs_bmapi_trim_map()
3780 ASSERT(*bno < end); in xfs_bmapi_trim_map()
3781 mval->br_startoff = *bno; in xfs_bmapi_trim_map()
3786 (*bno - got->br_startoff); in xfs_bmapi_trim_map()
3794 mval->br_blockcount = XFS_FILBLKS_MIN(end - *bno, in xfs_bmapi_trim_map()
3795 got->br_blockcount - (*bno - got->br_startoff)); in xfs_bmapi_trim_map()
3807 xfs_fileoff_t *bno, in xfs_bmapi_update_map() argument
3821 *bno = mval->br_startoff + mval->br_blockcount; in xfs_bmapi_update_map()
3822 *len = end - *bno; in xfs_bmapi_update_map()
3861 xfs_fileoff_t bno, in xfs_bmapi_read() argument
3898 if (!xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) in xfs_bmapi_read()
3900 end = bno + len; in xfs_bmapi_read()
3901 obno = bno; in xfs_bmapi_read()
3903 while (bno < end && n < *nmap) { in xfs_bmapi_read()
3907 if (got.br_startoff > bno) { in xfs_bmapi_read()
3909 mval->br_startoff = bno; in xfs_bmapi_read()
3912 XFS_FILBLKS_MIN(len, got.br_startoff - bno); in xfs_bmapi_read()
3914 bno += mval->br_blockcount; in xfs_bmapi_read()
3922 xfs_bmapi_trim_map(mval, &got, &bno, len, obno, end, n, flags); in xfs_bmapi_read()
3923 xfs_bmapi_update_map(&mval, &bno, &len, obno, end, &n, flags); in xfs_bmapi_read()
3926 if (bno >= end || n >= *nmap) in xfs_bmapi_read()
4311 xfs_fileoff_t bno, /* starting file offs. mapped */ in xfs_bmapi_write() argument
4339 orig_bno = bno; in xfs_bmapi_write()
4380 if (!xfs_iext_lookup_extent(ip, ifp, bno, &bma.icur, &bma.got)) in xfs_bmapi_write()
4387 end = bno + len; in xfs_bmapi_write()
4388 obno = bno; in xfs_bmapi_write()
4389 while (bno < end && n < *nmap) { in xfs_bmapi_write()
4393 if (eof || bma.got.br_startoff > bno) { in xfs_bmapi_write()
4415 bma.offset = bno; in xfs_bmapi_write()
4448 xfs_bmapi_trim_map(mval, &bma.got, &bno, len, obno, in xfs_bmapi_write()
4459 xfs_bmapi_update_map(&mval, &bno, &len, obno, end, &n, flags); in xfs_bmapi_write()
4466 if (bno >= end || n >= *nmap || bma.nallocs >= *nmap) in xfs_bmapi_write()
4630 xfs_fileoff_t bno, in xfs_bmapi_remap() argument
4664 if (xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) { in xfs_bmapi_remap()
4666 ASSERT(got.br_startoff > bno); in xfs_bmapi_remap()
4667 ASSERT(got.br_startoff - bno >= len); in xfs_bmapi_remap()
4678 got.br_startoff = bno; in xfs_bmapi_remap()
5060 xfs_fsblock_t bno; in xfs_bmap_del_extent_real() local
5062 bno = div_u64_rem(del->br_startblock, in xfs_bmap_del_extent_real()
5066 error = xfs_rtfree_extent(tp, bno, (xfs_extlen_t)len); in xfs_bmap_del_extent_real()
5571 xfs_fileoff_t bno, in xfs_bunmapi() argument
5579 error = __xfs_bunmapi(tp, ip, bno, &len, flags, nexts); in xfs_bunmapi()