Lines Matching refs:bno

111 	xfs_fsblock_t		bno,  in xfs_bmbt_lookup_eq()  argument
116 cur->bc_rec.b.br_startblock = bno; in xfs_bmbt_lookup_eq()
125 xfs_fsblock_t bno, in xfs_bmbt_lookup_ge() argument
130 cur->bc_rec.b.br_startblock = bno; in xfs_bmbt_lookup_ge()
164 xfs_fsblock_t bno, in xfs_bmbt_update() argument
170 xfs_bmbt_disk_set_allf(&rec.bmbt, off, bno, len, state); in xfs_bmbt_update()
251 xfs_fsblock_t bno) in xfs_bmap_get_bp() argument
262 if (XFS_BUF_ADDR(cur->bc_bufs[i]) == bno) in xfs_bmap_get_bp()
271 XFS_BUF_ADDR(bip->bli_buf) == bno) in xfs_bmap_get_bp()
338 xfs_fsblock_t bno; /* block # of "block" */ in xfs_bmap_check_leaf_extents() local
355 bno = NULLFSBLOCK; in xfs_bmap_check_leaf_extents()
366 bno = be64_to_cpu(*pp); in xfs_bmap_check_leaf_extents()
368 ASSERT(bno != NULLFSBLOCK); in xfs_bmap_check_leaf_extents()
369 ASSERT(XFS_FSB_TO_AGNO(mp, bno) < mp->m_sb.sb_agcount); in xfs_bmap_check_leaf_extents()
370 ASSERT(XFS_FSB_TO_AGBNO(mp, bno) < mp->m_sb.sb_agblocks); in xfs_bmap_check_leaf_extents()
379 bp = xfs_bmap_get_bp(cur, XFS_FSB_TO_DADDR(mp, bno)); in xfs_bmap_check_leaf_extents()
382 error = xfs_btree_read_bufl(mp, NULL, bno, 0, &bp, in xfs_bmap_check_leaf_extents()
399 bno = be64_to_cpu(*pp); in xfs_bmap_check_leaf_extents()
401 XFS_FSB_SANITY_CHECK(mp, bno), error0); in xfs_bmap_check_leaf_extents()
455 bno = nextbno; in xfs_bmap_check_leaf_extents()
459 if (bno == NULLFSBLOCK) in xfs_bmap_check_leaf_extents()
463 bp = xfs_bmap_get_bp(cur, XFS_FSB_TO_DADDR(mp, bno)); in xfs_bmap_check_leaf_extents()
466 error = xfs_btree_read_bufl(mp, NULL, bno, 0, &bp, in xfs_bmap_check_leaf_extents()
522 xfs_fileoff_t bno, in xfs_bmap_validate_ret() argument
536 ASSERT(mval[i].br_startoff >= bno); in xfs_bmap_validate_ret()
539 bno + len); in xfs_bmap_validate_ret()
541 ASSERT(mval[i].br_startoff < bno + len); in xfs_bmap_validate_ret()
543 bno); in xfs_bmap_validate_ret()
557 #define xfs_bmap_validate_ret(bno,len,flags,mval,onmap,nmap) argument
570 xfs_fsblock_t bno, /* fs block number of extent */ in xfs_bmap_add_free() argument
582 ASSERT(bno != NULLFSBLOCK); in xfs_bmap_add_free()
585 ASSERT(!isnullstartblock(bno)); in xfs_bmap_add_free()
586 agno = XFS_FSB_TO_AGNO(mp, bno); in xfs_bmap_add_free()
587 agbno = XFS_FSB_TO_AGBNO(mp, bno); in xfs_bmap_add_free()
595 new->xbfi_startblock = bno; in xfs_bmap_add_free()
600 if (cur->xbfi_startblock >= bno) in xfs_bmap_add_free()
1250 xfs_fsblock_t bno; /* block # of "block" */ in xfs_bmap_read_extents() local
1262 bno = NULLFSBLOCK; in xfs_bmap_read_extents()
1274 bno = be64_to_cpu(*pp); in xfs_bmap_read_extents()
1275 ASSERT(bno != NULLFSBLOCK); in xfs_bmap_read_extents()
1276 ASSERT(XFS_FSB_TO_AGNO(mp, bno) < mp->m_sb.sb_agcount); in xfs_bmap_read_extents()
1277 ASSERT(XFS_FSB_TO_AGBNO(mp, bno) < mp->m_sb.sb_agblocks); in xfs_bmap_read_extents()
1283 error = xfs_btree_read_bufl(mp, tp, bno, 0, &bp, in xfs_bmap_read_extents()
1291 bno = be64_to_cpu(*pp); in xfs_bmap_read_extents()
1293 XFS_FSB_SANITY_CHECK(mp, bno), error0); in xfs_bmap_read_extents()
1352 bno = nextbno; in xfs_bmap_read_extents()
1356 if (bno == NULLFSBLOCK) in xfs_bmap_read_extents()
1358 error = xfs_btree_read_bufl(mp, tp, bno, 0, &bp, in xfs_bmap_read_extents()
1384 xfs_fileoff_t bno, /* block number searched for */ in xfs_bmap_search_multi_extents() argument
1403 ep = xfs_iext_bno_to_ext(ifp, bno, &lastx); in xfs_bmap_search_multi_extents()
1431 xfs_fileoff_t bno, /* block number searched for */ in xfs_bmap_search_extents() argument
1444 ep = xfs_bmap_search_multi_extents(ifp, bno, eofp, lastxp, gotp, prevp); in xfs_bmap_search_extents()
1531 xfs_fileoff_t bno; /* input file offset */ in xfs_bmap_last_before() local
1552 bno = *last_block - 1; in xfs_bmap_last_before()
1553 ep = xfs_bmap_search_extents(ip, bno, whichfork, &eof, &lastx, &got, in xfs_bmap_last_before()
1555 if (eof || xfs_bmbt_get_startoff(ep) > bno) { in xfs_bmap_last_before()
3906 xfs_fileoff_t *bno, in xfs_bmapi_trim_map() argument
3921 if (obno > *bno) in xfs_bmapi_trim_map()
3922 *bno = obno; in xfs_bmapi_trim_map()
3923 ASSERT((*bno >= obno) || (n == 0)); in xfs_bmapi_trim_map()
3924 ASSERT(*bno < end); in xfs_bmapi_trim_map()
3925 mval->br_startoff = *bno; in xfs_bmapi_trim_map()
3930 (*bno - got->br_startoff); in xfs_bmapi_trim_map()
3938 mval->br_blockcount = XFS_FILBLKS_MIN(end - *bno, in xfs_bmapi_trim_map()
3939 got->br_blockcount - (*bno - got->br_startoff)); in xfs_bmapi_trim_map()
3951 xfs_fileoff_t *bno, in xfs_bmapi_update_map() argument
3965 *bno = mval->br_startoff + mval->br_blockcount; in xfs_bmapi_update_map()
3966 *len = end - *bno; in xfs_bmapi_update_map()
4006 xfs_fileoff_t bno, in xfs_bmapi_read() argument
4051 xfs_bmap_search_extents(ip, bno, whichfork, &eof, &lastx, &got, &prev); in xfs_bmapi_read()
4052 end = bno + len; in xfs_bmapi_read()
4053 obno = bno; in xfs_bmapi_read()
4055 while (bno < end && n < *nmap) { in xfs_bmapi_read()
4059 if (got.br_startoff > bno) { in xfs_bmapi_read()
4061 mval->br_startoff = bno; in xfs_bmapi_read()
4064 XFS_FILBLKS_MIN(len, got.br_startoff - bno); in xfs_bmapi_read()
4066 bno += mval->br_blockcount; in xfs_bmapi_read()
4074 xfs_bmapi_trim_map(mval, &got, &bno, len, obno, end, n, flags); in xfs_bmapi_read()
4075 xfs_bmapi_update_map(&mval, &bno, &len, obno, end, &n, flags); in xfs_bmapi_read()
4078 if (bno >= end || n >= *nmap) in xfs_bmapi_read()
4193 xfs_fileoff_t bno, /* starting file offs. mapped */ in xfs_bmapi_delay() argument
4234 xfs_bmap_search_extents(ip, bno, XFS_DATA_FORK, &eof, &lastx, &got, &prev); in xfs_bmapi_delay()
4235 end = bno + len; in xfs_bmapi_delay()
4236 obno = bno; in xfs_bmapi_delay()
4238 while (bno < end && n < *nmap) { in xfs_bmapi_delay()
4239 if (eof || got.br_startoff > bno) { in xfs_bmapi_delay()
4240 error = xfs_bmapi_reserve_delalloc(ip, bno, len, &got, in xfs_bmapi_delay()
4252 xfs_bmapi_trim_map(mval, &got, &bno, len, obno, end, n, flags); in xfs_bmapi_delay()
4253 xfs_bmapi_update_map(&mval, &bno, &len, obno, end, &n, flags); in xfs_bmapi_delay()
4256 if (bno >= end || n >= *nmap) in xfs_bmapi_delay()
4463 xfs_fileoff_t bno, /* starting file offs. mapped */ in xfs_bmapi_write() argument
4492 orig_bno = bno; in xfs_bmapi_write()
4539 xfs_bmap_search_extents(ip, bno, whichfork, &eof, &bma.idx, &bma.got, in xfs_bmapi_write()
4542 end = bno + len; in xfs_bmapi_write()
4543 obno = bno; in xfs_bmapi_write()
4552 while (bno < end && n < *nmap) { in xfs_bmapi_write()
4553 inhole = eof || bma.got.br_startoff > bno; in xfs_bmapi_write()
4564 bma.offset = bno; in xfs_bmapi_write()
4589 xfs_bmapi_trim_map(mval, &bma.got, &bno, len, obno, in xfs_bmapi_write()
4600 xfs_bmapi_update_map(&mval, &bno, &len, obno, end, &n, flags); in xfs_bmapi_write()
4607 if (bno >= end || n >= *nmap || bma.nallocs >= *nmap) in xfs_bmapi_write()
4745 xfs_fsblock_t bno; in xfs_bmap_del_extent() local
4752 bno = del->br_startblock; in xfs_bmap_del_extent()
4754 do_div(bno, mp->m_sb.sb_rextsize); in xfs_bmap_del_extent()
4756 error = xfs_rtfree_extent(tp, bno, (xfs_extlen_t)len); in xfs_bmap_del_extent()
5009 xfs_fileoff_t bno, /* starting offset to unmap */ in xfs_bunmapi() argument
5039 trace_xfs_bunmap(ip, bno, len, flags, _RET_IP_); in xfs_bunmapi()
5069 start = bno; in xfs_bunmapi()
5070 bno = start + len - 1; in xfs_bunmapi()
5071 ep = xfs_bmap_search_extents(ip, bno, whichfork, &eof, &lastx, &got, in xfs_bunmapi()
5081 bno = got.br_startoff + got.br_blockcount - 1; in xfs_bunmapi()
5102 while (bno != (xfs_fileoff_t)-1 && bno >= start && lastx >= 0 && in xfs_bunmapi()
5108 if (got.br_startoff > bno) { in xfs_bunmapi()
5118 bno = XFS_FILEOFF_MIN(bno, in xfs_bunmapi()
5120 if (bno < start) in xfs_bunmapi()
5135 if (del.br_startoff + del.br_blockcount > bno + 1) in xfs_bunmapi()
5136 del.br_blockcount = bno + 1 - del.br_startoff; in xfs_bunmapi()
5153 ASSERT(bno >= mod); in xfs_bunmapi()
5154 bno -= mod > del.br_blockcount ? in xfs_bunmapi()
5156 if (bno < got.br_startoff) { in xfs_bunmapi()
5205 ASSERT(bno >= del.br_blockcount); in xfs_bunmapi()
5206 bno -= del.br_blockcount; in xfs_bunmapi()
5207 if (got.br_startoff > bno) { in xfs_bunmapi()
5305 bno = del.br_startoff - 1; in xfs_bunmapi()
5310 if (bno != (xfs_fileoff_t)-1 && bno >= start) { in xfs_bunmapi()
5313 if (xfs_bmbt_get_startoff(ep) > bno) { in xfs_bunmapi()
5323 *done = bno == (xfs_fileoff_t)-1 || bno < start || lastx < 0; in xfs_bunmapi()