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()
1249 xfs_fsblock_t bno; /* block # of "block" */ in xfs_bmap_read_extents() local
1261 bno = NULLFSBLOCK; in xfs_bmap_read_extents()
1273 bno = be64_to_cpu(*pp); in xfs_bmap_read_extents()
1274 ASSERT(bno != NULLFSBLOCK); in xfs_bmap_read_extents()
1275 ASSERT(XFS_FSB_TO_AGNO(mp, bno) < mp->m_sb.sb_agcount); in xfs_bmap_read_extents()
1276 ASSERT(XFS_FSB_TO_AGBNO(mp, bno) < mp->m_sb.sb_agblocks); in xfs_bmap_read_extents()
1282 error = xfs_btree_read_bufl(mp, tp, bno, 0, &bp, in xfs_bmap_read_extents()
1290 bno = be64_to_cpu(*pp); in xfs_bmap_read_extents()
1292 XFS_FSB_SANITY_CHECK(mp, bno), error0); in xfs_bmap_read_extents()
1351 bno = nextbno; in xfs_bmap_read_extents()
1355 if (bno == NULLFSBLOCK) in xfs_bmap_read_extents()
1357 error = xfs_btree_read_bufl(mp, tp, bno, 0, &bp, in xfs_bmap_read_extents()
1383 xfs_fileoff_t bno, /* block number searched for */ in xfs_bmap_search_multi_extents() argument
1402 ep = xfs_iext_bno_to_ext(ifp, bno, &lastx); in xfs_bmap_search_multi_extents()
1430 xfs_fileoff_t bno, /* block number searched for */ in xfs_bmap_search_extents() argument
1443 ep = xfs_bmap_search_multi_extents(ifp, bno, eofp, lastxp, gotp, prevp); in xfs_bmap_search_extents()
1530 xfs_fileoff_t bno; /* input file offset */ in xfs_bmap_last_before() local
1551 bno = *last_block - 1; in xfs_bmap_last_before()
1552 ep = xfs_bmap_search_extents(ip, bno, whichfork, &eof, &lastx, &got, in xfs_bmap_last_before()
1554 if (eof || xfs_bmbt_get_startoff(ep) > bno) { in xfs_bmap_last_before()
3911 xfs_fileoff_t *bno, in xfs_bmapi_trim_map() argument
3926 if (obno > *bno) in xfs_bmapi_trim_map()
3927 *bno = obno; in xfs_bmapi_trim_map()
3928 ASSERT((*bno >= obno) || (n == 0)); in xfs_bmapi_trim_map()
3929 ASSERT(*bno < end); in xfs_bmapi_trim_map()
3930 mval->br_startoff = *bno; in xfs_bmapi_trim_map()
3935 (*bno - got->br_startoff); in xfs_bmapi_trim_map()
3943 mval->br_blockcount = XFS_FILBLKS_MIN(end - *bno, in xfs_bmapi_trim_map()
3944 got->br_blockcount - (*bno - got->br_startoff)); in xfs_bmapi_trim_map()
3956 xfs_fileoff_t *bno, in xfs_bmapi_update_map() argument
3970 *bno = mval->br_startoff + mval->br_blockcount; in xfs_bmapi_update_map()
3971 *len = end - *bno; in xfs_bmapi_update_map()
4011 xfs_fileoff_t bno, in xfs_bmapi_read() argument
4056 xfs_bmap_search_extents(ip, bno, whichfork, &eof, &lastx, &got, &prev); in xfs_bmapi_read()
4057 end = bno + len; in xfs_bmapi_read()
4058 obno = bno; in xfs_bmapi_read()
4060 while (bno < end && n < *nmap) { in xfs_bmapi_read()
4064 if (got.br_startoff > bno) { in xfs_bmapi_read()
4066 mval->br_startoff = bno; in xfs_bmapi_read()
4069 XFS_FILBLKS_MIN(len, got.br_startoff - bno); in xfs_bmapi_read()
4071 bno += mval->br_blockcount; in xfs_bmapi_read()
4079 xfs_bmapi_trim_map(mval, &got, &bno, len, obno, end, n, flags); in xfs_bmapi_read()
4080 xfs_bmapi_update_map(&mval, &bno, &len, obno, end, &n, flags); in xfs_bmapi_read()
4083 if (bno >= end || n >= *nmap) in xfs_bmapi_read()
4198 xfs_fileoff_t bno, /* starting file offs. mapped */ in xfs_bmapi_delay() argument
4239 xfs_bmap_search_extents(ip, bno, XFS_DATA_FORK, &eof, &lastx, &got, &prev); in xfs_bmapi_delay()
4240 end = bno + len; in xfs_bmapi_delay()
4241 obno = bno; in xfs_bmapi_delay()
4243 while (bno < end && n < *nmap) { in xfs_bmapi_delay()
4244 if (eof || got.br_startoff > bno) { in xfs_bmapi_delay()
4245 error = xfs_bmapi_reserve_delalloc(ip, bno, len, &got, in xfs_bmapi_delay()
4257 xfs_bmapi_trim_map(mval, &got, &bno, len, obno, end, n, flags); in xfs_bmapi_delay()
4258 xfs_bmapi_update_map(&mval, &bno, &len, obno, end, &n, flags); in xfs_bmapi_delay()
4261 if (bno >= end || n >= *nmap) in xfs_bmapi_delay()
4490 xfs_fileoff_t bno, /* starting file offs. mapped */ in xfs_bmapi_write() argument
4519 orig_bno = bno; in xfs_bmapi_write()
4578 xfs_bmap_search_extents(ip, bno, whichfork, &eof, &bma.idx, &bma.got, in xfs_bmapi_write()
4581 end = bno + len; in xfs_bmapi_write()
4582 obno = bno; in xfs_bmapi_write()
4591 while (bno < end && n < *nmap) { in xfs_bmapi_write()
4592 inhole = eof || bma.got.br_startoff > bno; in xfs_bmapi_write()
4603 bma.offset = bno; in xfs_bmapi_write()
4628 xfs_bmapi_trim_map(mval, &bma.got, &bno, len, obno, in xfs_bmapi_write()
4639 xfs_bmapi_update_map(&mval, &bno, &len, obno, end, &n, flags); in xfs_bmapi_write()
4646 if (bno >= end || n >= *nmap || bma.nallocs >= *nmap) in xfs_bmapi_write()
4784 xfs_fsblock_t bno; in xfs_bmap_del_extent() local
4791 bno = del->br_startblock; in xfs_bmap_del_extent()
4793 do_div(bno, mp->m_sb.sb_rextsize); in xfs_bmap_del_extent()
4795 error = xfs_rtfree_extent(tp, bno, (xfs_extlen_t)len); in xfs_bmap_del_extent()
5048 xfs_fileoff_t bno, /* starting offset to unmap */ in xfs_bunmapi() argument
5078 trace_xfs_bunmap(ip, bno, len, flags, _RET_IP_); in xfs_bunmapi()
5108 start = bno; in xfs_bunmapi()
5109 bno = start + len - 1; in xfs_bunmapi()
5110 ep = xfs_bmap_search_extents(ip, bno, whichfork, &eof, &lastx, &got, in xfs_bunmapi()
5120 bno = got.br_startoff + got.br_blockcount - 1; in xfs_bunmapi()
5141 while (bno != (xfs_fileoff_t)-1 && bno >= start && lastx >= 0 && in xfs_bunmapi()
5147 if (got.br_startoff > bno) { in xfs_bunmapi()
5157 bno = XFS_FILEOFF_MIN(bno, in xfs_bunmapi()
5159 if (bno < start) in xfs_bunmapi()
5174 if (del.br_startoff + del.br_blockcount > bno + 1) in xfs_bunmapi()
5175 del.br_blockcount = bno + 1 - del.br_startoff; in xfs_bunmapi()
5192 ASSERT(bno >= mod); in xfs_bunmapi()
5193 bno -= mod > del.br_blockcount ? in xfs_bunmapi()
5195 if (bno < got.br_startoff) { in xfs_bunmapi()
5244 ASSERT(bno >= del.br_blockcount); in xfs_bunmapi()
5245 bno -= del.br_blockcount; in xfs_bunmapi()
5246 if (got.br_startoff > bno) { in xfs_bunmapi()
5344 bno = del.br_startoff - 1; in xfs_bunmapi()
5349 if (bno != (xfs_fileoff_t)-1 && bno >= start) { in xfs_bunmapi()
5352 if (xfs_bmbt_get_startoff(ep) > bno) { in xfs_bunmapi()
5362 *done = bno == (xfs_fileoff_t)-1 || bno < start || lastx < 0; in xfs_bunmapi()