Lines Matching refs:bno
231 xfs_fsblock_t bno) in xfs_bmap_get_bp() argument
242 if (XFS_BUF_ADDR(cur->bc_bufs[i]) == bno) in xfs_bmap_get_bp()
251 XFS_BUF_ADDR(bip->bli_buf) == bno) in xfs_bmap_get_bp()
323 xfs_fsblock_t bno; /* block # of "block" */ in xfs_bmap_check_leaf_extents() local
341 bno = NULLFSBLOCK; in xfs_bmap_check_leaf_extents()
350 bno = be64_to_cpu(*pp); in xfs_bmap_check_leaf_extents()
352 ASSERT(bno != NULLFSBLOCK); in xfs_bmap_check_leaf_extents()
353 ASSERT(XFS_FSB_TO_AGNO(mp, bno) < mp->m_sb.sb_agcount); in xfs_bmap_check_leaf_extents()
354 ASSERT(XFS_FSB_TO_AGBNO(mp, bno) < mp->m_sb.sb_agblocks); in xfs_bmap_check_leaf_extents()
363 bp = xfs_bmap_get_bp(cur, XFS_FSB_TO_DADDR(mp, bno)); in xfs_bmap_check_leaf_extents()
366 error = xfs_btree_read_bufl(mp, NULL, bno, &bp, in xfs_bmap_check_leaf_extents()
383 bno = be64_to_cpu(*pp); in xfs_bmap_check_leaf_extents()
384 if (XFS_IS_CORRUPT(mp, !xfs_verify_fsbno(mp, bno))) { in xfs_bmap_check_leaf_extents()
441 bno = nextbno; in xfs_bmap_check_leaf_extents()
445 if (bno == NULLFSBLOCK) in xfs_bmap_check_leaf_extents()
449 bp = xfs_bmap_get_bp(cur, XFS_FSB_TO_DADDR(mp, bno)); in xfs_bmap_check_leaf_extents()
452 error = xfs_btree_read_bufl(mp, NULL, bno, &bp, in xfs_bmap_check_leaf_extents()
483 xfs_fileoff_t bno, in xfs_bmap_validate_ret() argument
497 ASSERT(mval[i].br_startoff >= bno); in xfs_bmap_validate_ret()
500 bno + len); in xfs_bmap_validate_ret()
502 ASSERT(mval[i].br_startoff < bno + len); in xfs_bmap_validate_ret()
504 bno); in xfs_bmap_validate_ret()
518 #define xfs_bmap_validate_ret(bno,len,flags,mval,onmap,nmap) do { } while (0) argument
532 xfs_fsblock_t bno, in __xfs_bmap_add_free() argument
543 ASSERT(bno != NULLFSBLOCK); in __xfs_bmap_add_free()
546 ASSERT(!isnullstartblock(bno)); in __xfs_bmap_add_free()
547 agno = XFS_FSB_TO_AGNO(mp, bno); in __xfs_bmap_add_free()
548 agbno = XFS_FSB_TO_AGBNO(mp, bno); in __xfs_bmap_add_free()
558 new->xefi_startblock = bno; in __xfs_bmap_add_free()
566 XFS_FSB_TO_AGNO(tp->t_mountp, bno), 0, in __xfs_bmap_add_free()
567 XFS_FSB_TO_AGBNO(tp->t_mountp, bno), len); in __xfs_bmap_add_free()
3732 xfs_fileoff_t bno, in xfs_trim_extent() argument
3736 xfs_fileoff_t end = bno + len; in xfs_trim_extent()
3738 if (irec->br_startoff + irec->br_blockcount <= bno || in xfs_trim_extent()
3744 if (irec->br_startoff < bno) { in xfs_trim_extent()
3745 distance = bno - irec->br_startoff; in xfs_trim_extent()
3768 xfs_fileoff_t *bno, in xfs_bmapi_trim_map() argument
3783 if (obno > *bno) in xfs_bmapi_trim_map()
3784 *bno = obno; in xfs_bmapi_trim_map()
3785 ASSERT((*bno >= obno) || (n == 0)); in xfs_bmapi_trim_map()
3786 ASSERT(*bno < end); in xfs_bmapi_trim_map()
3787 mval->br_startoff = *bno; in xfs_bmapi_trim_map()
3792 (*bno - got->br_startoff); in xfs_bmapi_trim_map()
3800 mval->br_blockcount = XFS_FILBLKS_MIN(end - *bno, in xfs_bmapi_trim_map()
3801 got->br_blockcount - (*bno - got->br_startoff)); in xfs_bmapi_trim_map()
3813 xfs_fileoff_t *bno, in xfs_bmapi_update_map() argument
3827 *bno = mval->br_startoff + mval->br_blockcount; in xfs_bmapi_update_map()
3828 *len = end - *bno; in xfs_bmapi_update_map()
3867 xfs_fileoff_t bno, in xfs_bmapi_read() argument
3906 if (!xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) in xfs_bmapi_read()
3908 end = bno + len; in xfs_bmapi_read()
3909 obno = bno; in xfs_bmapi_read()
3911 while (bno < end && n < *nmap) { in xfs_bmapi_read()
3915 if (got.br_startoff > bno) { in xfs_bmapi_read()
3917 mval->br_startoff = bno; in xfs_bmapi_read()
3920 XFS_FILBLKS_MIN(len, got.br_startoff - bno); in xfs_bmapi_read()
3922 bno += mval->br_blockcount; in xfs_bmapi_read()
3930 xfs_bmapi_trim_map(mval, &got, &bno, len, obno, end, n, flags); in xfs_bmapi_read()
3931 xfs_bmapi_update_map(&mval, &bno, &len, obno, end, &n, flags); in xfs_bmapi_read()
3934 if (bno >= end || n >= *nmap) in xfs_bmapi_read()
4312 xfs_fileoff_t bno, /* starting file offs. mapped */ in xfs_bmapi_write() argument
4340 orig_bno = bno; in xfs_bmapi_write()
4383 if (!xfs_iext_lookup_extent(ip, ifp, bno, &bma.icur, &bma.got)) in xfs_bmapi_write()
4390 end = bno + len; in xfs_bmapi_write()
4391 obno = bno; in xfs_bmapi_write()
4392 while (bno < end && n < *nmap) { in xfs_bmapi_write()
4396 if (eof || bma.got.br_startoff > bno) { in xfs_bmapi_write()
4418 bma.offset = bno; in xfs_bmapi_write()
4451 xfs_bmapi_trim_map(mval, &bma.got, &bno, len, obno, in xfs_bmapi_write()
4462 xfs_bmapi_update_map(&mval, &bno, &len, obno, end, &n, flags); in xfs_bmapi_write()
4469 if (bno >= end || n >= *nmap || bma.nallocs >= *nmap) in xfs_bmapi_write()
4624 xfs_fileoff_t bno, in xfs_bmapi_remap() argument
4660 if (xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) { in xfs_bmapi_remap()
4662 ASSERT(got.br_startoff > bno); in xfs_bmapi_remap()
4663 ASSERT(got.br_startoff - bno >= len); in xfs_bmapi_remap()
4674 got.br_startoff = bno; in xfs_bmapi_remap()
5057 xfs_fsblock_t bno; in xfs_bmap_del_extent_real() local
5059 bno = div_u64_rem(del->br_startblock, in xfs_bmap_del_extent_real()
5063 error = xfs_rtfree_extent(tp, bno, (xfs_extlen_t)len); in xfs_bmap_del_extent_real()
5597 xfs_fileoff_t bno, in xfs_bunmapi() argument
5605 error = __xfs_bunmapi(tp, ip, bno, &len, flags, nexts); in xfs_bunmapi()