Lines Matching refs:bno

257 	xfs_fsblock_t		bno)  in xfs_bmap_get_bp()  argument
268 if (xfs_buf_daddr(cur->bc_levels[i].bp) == bno) in xfs_bmap_get_bp()
277 xfs_buf_daddr(bip->bli_buf) == bno) in xfs_bmap_get_bp()
349 xfs_fsblock_t bno; /* block # of "block" */ in xfs_bmap_check_leaf_extents() local
367 bno = NULLFSBLOCK; in xfs_bmap_check_leaf_extents()
376 bno = be64_to_cpu(*pp); in xfs_bmap_check_leaf_extents()
378 ASSERT(bno != NULLFSBLOCK); in xfs_bmap_check_leaf_extents()
379 ASSERT(XFS_FSB_TO_AGNO(mp, bno) < mp->m_sb.sb_agcount); in xfs_bmap_check_leaf_extents()
380 ASSERT(XFS_FSB_TO_AGBNO(mp, bno) < mp->m_sb.sb_agblocks); in xfs_bmap_check_leaf_extents()
389 bp = xfs_bmap_get_bp(cur, XFS_FSB_TO_DADDR(mp, bno)); in xfs_bmap_check_leaf_extents()
392 error = xfs_bmap_read_buf(mp, NULL, bno, &bp); in xfs_bmap_check_leaf_extents()
409 bno = be64_to_cpu(*pp); in xfs_bmap_check_leaf_extents()
410 if (XFS_IS_CORRUPT(mp, !xfs_verify_fsbno(mp, bno))) { in xfs_bmap_check_leaf_extents()
468 bno = nextbno; in xfs_bmap_check_leaf_extents()
472 if (bno == NULLFSBLOCK) in xfs_bmap_check_leaf_extents()
476 bp = xfs_bmap_get_bp(cur, XFS_FSB_TO_DADDR(mp, bno)); in xfs_bmap_check_leaf_extents()
479 error = xfs_bmap_read_buf(mp, NULL, bno, &bp); in xfs_bmap_check_leaf_extents()
510 xfs_fileoff_t bno, in xfs_bmap_validate_ret() argument
524 ASSERT(mval[i].br_startoff >= bno); in xfs_bmap_validate_ret()
527 bno + len); in xfs_bmap_validate_ret()
529 ASSERT(mval[i].br_startoff < bno + len); in xfs_bmap_validate_ret()
531 bno); in xfs_bmap_validate_ret()
545 #define xfs_bmap_validate_ret(bno,len,flags,mval,onmap,nmap) do { } while (0) argument
3690 xfs_fileoff_t bno, in xfs_trim_extent() argument
3694 xfs_fileoff_t end = bno + len; in xfs_trim_extent()
3696 if (irec->br_startoff + irec->br_blockcount <= bno || in xfs_trim_extent()
3702 if (irec->br_startoff < bno) { in xfs_trim_extent()
3703 distance = bno - irec->br_startoff; in xfs_trim_extent()
3726 xfs_fileoff_t *bno, in xfs_bmapi_trim_map() argument
3741 if (obno > *bno) in xfs_bmapi_trim_map()
3742 *bno = obno; in xfs_bmapi_trim_map()
3743 ASSERT((*bno >= obno) || (n == 0)); in xfs_bmapi_trim_map()
3744 ASSERT(*bno < end); in xfs_bmapi_trim_map()
3745 mval->br_startoff = *bno; in xfs_bmapi_trim_map()
3750 (*bno - got->br_startoff); in xfs_bmapi_trim_map()
3758 mval->br_blockcount = XFS_FILBLKS_MIN(end - *bno, in xfs_bmapi_trim_map()
3759 got->br_blockcount - (*bno - got->br_startoff)); in xfs_bmapi_trim_map()
3771 xfs_fileoff_t *bno, in xfs_bmapi_update_map() argument
3785 *bno = mval->br_startoff + mval->br_blockcount; in xfs_bmapi_update_map()
3786 *len = end - *bno; in xfs_bmapi_update_map()
3825 xfs_fileoff_t bno, in xfs_bmapi_read() argument
3866 if (!xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) in xfs_bmapi_read()
3868 end = bno + len; in xfs_bmapi_read()
3869 obno = bno; in xfs_bmapi_read()
3871 while (bno < end && n < *nmap) { in xfs_bmapi_read()
3875 if (got.br_startoff > bno) { in xfs_bmapi_read()
3877 mval->br_startoff = bno; in xfs_bmapi_read()
3880 XFS_FILBLKS_MIN(len, got.br_startoff - bno); in xfs_bmapi_read()
3882 bno += mval->br_blockcount; in xfs_bmapi_read()
3890 xfs_bmapi_trim_map(mval, &got, &bno, len, obno, end, n, flags); in xfs_bmapi_read()
3891 xfs_bmapi_update_map(&mval, &bno, &len, obno, end, &n, flags); in xfs_bmapi_read()
3894 if (bno >= end || n >= *nmap) in xfs_bmapi_read()
4147 xfs_fileoff_t bno, /* starting file offs. mapped */ in xfs_bmapi_write() argument
4175 orig_bno = bno; in xfs_bmapi_write()
4217 if (!xfs_iext_lookup_extent(ip, ifp, bno, &bma.icur, &bma.got)) in xfs_bmapi_write()
4224 end = bno + len; in xfs_bmapi_write()
4225 obno = bno; in xfs_bmapi_write()
4226 while (bno < end && n < *nmap) { in xfs_bmapi_write()
4230 if (eof || bma.got.br_startoff > bno) { in xfs_bmapi_write()
4252 bma.offset = bno; in xfs_bmapi_write()
4268 (bno - bma.got.br_startoff)); in xfs_bmapi_write()
4272 bma.got.br_startoff - bno); in xfs_bmapi_write()
4299 xfs_bmapi_trim_map(mval, &bma.got, &bno, len, obno, in xfs_bmapi_write()
4310 xfs_bmapi_update_map(&mval, &bno, &len, obno, end, &n, flags); in xfs_bmapi_write()
4317 if (bno >= end || n >= *nmap || bma.nallocs >= *nmap) in xfs_bmapi_write()
4525 xfs_fileoff_t bno, in xfs_bmapi_remap() argument
4560 if (xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) { in xfs_bmapi_remap()
4562 ASSERT(got.br_startoff > bno); in xfs_bmapi_remap()
4563 ASSERT(got.br_startoff - bno >= len); in xfs_bmapi_remap()
4573 got.br_startoff = bno; in xfs_bmapi_remap()
5481 xfs_fileoff_t bno, in xfs_bunmapi() argument
5489 error = __xfs_bunmapi(tp, ip, bno, &len, flags, nexts); in xfs_bunmapi()