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()
1251 xfs_fsblock_t bno; /* block # of "block" */ in xfs_bmap_read_extents() local
1263 bno = NULLFSBLOCK; in xfs_bmap_read_extents()
1275 bno = be64_to_cpu(*pp); in xfs_bmap_read_extents()
1276 ASSERT(bno != NULLFSBLOCK); in xfs_bmap_read_extents()
1277 ASSERT(XFS_FSB_TO_AGNO(mp, bno) < mp->m_sb.sb_agcount); in xfs_bmap_read_extents()
1278 ASSERT(XFS_FSB_TO_AGBNO(mp, bno) < mp->m_sb.sb_agblocks); in xfs_bmap_read_extents()
1284 error = xfs_btree_read_bufl(mp, tp, bno, 0, &bp, in xfs_bmap_read_extents()
1292 bno = be64_to_cpu(*pp); in xfs_bmap_read_extents()
1294 XFS_FSB_SANITY_CHECK(mp, bno), error0); in xfs_bmap_read_extents()
1353 bno = nextbno; in xfs_bmap_read_extents()
1357 if (bno == NULLFSBLOCK) in xfs_bmap_read_extents()
1359 error = xfs_btree_read_bufl(mp, tp, bno, 0, &bp, in xfs_bmap_read_extents()
1385 xfs_fileoff_t bno, /* block number searched for */ in xfs_bmap_search_multi_extents() argument
1404 ep = xfs_iext_bno_to_ext(ifp, bno, &lastx); in xfs_bmap_search_multi_extents()
1432 xfs_fileoff_t bno, /* block number searched for */ in xfs_bmap_search_extents() argument
1445 ep = xfs_bmap_search_multi_extents(ifp, bno, eofp, lastxp, gotp, prevp); in xfs_bmap_search_extents()
1532 xfs_fileoff_t bno; /* input file offset */ in xfs_bmap_last_before() local
1553 bno = *last_block - 1; in xfs_bmap_last_before()
1554 ep = xfs_bmap_search_extents(ip, bno, whichfork, &eof, &lastx, &got, in xfs_bmap_last_before()
1556 if (eof || xfs_bmbt_get_startoff(ep) > bno) { in xfs_bmap_last_before()
3914 xfs_fileoff_t *bno, in xfs_bmapi_trim_map() argument
3929 if (obno > *bno) in xfs_bmapi_trim_map()
3930 *bno = obno; in xfs_bmapi_trim_map()
3931 ASSERT((*bno >= obno) || (n == 0)); in xfs_bmapi_trim_map()
3932 ASSERT(*bno < end); in xfs_bmapi_trim_map()
3933 mval->br_startoff = *bno; in xfs_bmapi_trim_map()
3938 (*bno - got->br_startoff); in xfs_bmapi_trim_map()
3946 mval->br_blockcount = XFS_FILBLKS_MIN(end - *bno, in xfs_bmapi_trim_map()
3947 got->br_blockcount - (*bno - got->br_startoff)); in xfs_bmapi_trim_map()
3959 xfs_fileoff_t *bno, in xfs_bmapi_update_map() argument
3973 *bno = mval->br_startoff + mval->br_blockcount; in xfs_bmapi_update_map()
3974 *len = end - *bno; in xfs_bmapi_update_map()
4014 xfs_fileoff_t bno, in xfs_bmapi_read() argument
4059 xfs_bmap_search_extents(ip, bno, whichfork, &eof, &lastx, &got, &prev); in xfs_bmapi_read()
4060 end = bno + len; in xfs_bmapi_read()
4061 obno = bno; in xfs_bmapi_read()
4063 while (bno < end && n < *nmap) { in xfs_bmapi_read()
4067 if (got.br_startoff > bno) { in xfs_bmapi_read()
4069 mval->br_startoff = bno; in xfs_bmapi_read()
4072 XFS_FILBLKS_MIN(len, got.br_startoff - bno); in xfs_bmapi_read()
4074 bno += mval->br_blockcount; in xfs_bmapi_read()
4082 xfs_bmapi_trim_map(mval, &got, &bno, len, obno, end, n, flags); in xfs_bmapi_read()
4083 xfs_bmapi_update_map(&mval, &bno, &len, obno, end, &n, flags); in xfs_bmapi_read()
4086 if (bno >= end || n >= *nmap) in xfs_bmapi_read()
4201 xfs_fileoff_t bno, /* starting file offs. mapped */ in xfs_bmapi_delay() argument
4242 xfs_bmap_search_extents(ip, bno, XFS_DATA_FORK, &eof, &lastx, &got, &prev); in xfs_bmapi_delay()
4243 end = bno + len; in xfs_bmapi_delay()
4244 obno = bno; in xfs_bmapi_delay()
4246 while (bno < end && n < *nmap) { in xfs_bmapi_delay()
4247 if (eof || got.br_startoff > bno) { in xfs_bmapi_delay()
4248 error = xfs_bmapi_reserve_delalloc(ip, bno, len, &got, in xfs_bmapi_delay()
4260 xfs_bmapi_trim_map(mval, &got, &bno, len, obno, end, n, flags); in xfs_bmapi_delay()
4261 xfs_bmapi_update_map(&mval, &bno, &len, obno, end, &n, flags); in xfs_bmapi_delay()
4264 if (bno >= end || n >= *nmap) in xfs_bmapi_delay()
4493 xfs_fileoff_t bno, /* starting file offs. mapped */ in xfs_bmapi_write() argument
4522 orig_bno = bno; in xfs_bmapi_write()
4581 xfs_bmap_search_extents(ip, bno, whichfork, &eof, &bma.idx, &bma.got, in xfs_bmapi_write()
4584 end = bno + len; in xfs_bmapi_write()
4585 obno = bno; in xfs_bmapi_write()
4594 while (bno < end && n < *nmap) { in xfs_bmapi_write()
4595 inhole = eof || bma.got.br_startoff > bno; in xfs_bmapi_write()
4606 bma.offset = bno; in xfs_bmapi_write()
4631 xfs_bmapi_trim_map(mval, &bma.got, &bno, len, obno, in xfs_bmapi_write()
4642 xfs_bmapi_update_map(&mval, &bno, &len, obno, end, &n, flags); in xfs_bmapi_write()
4649 if (bno >= end || n >= *nmap || bma.nallocs >= *nmap) in xfs_bmapi_write()
4787 xfs_fsblock_t bno; in xfs_bmap_del_extent() local
4794 bno = del->br_startblock; in xfs_bmap_del_extent()
4796 do_div(bno, mp->m_sb.sb_rextsize); in xfs_bmap_del_extent()
4798 error = xfs_rtfree_extent(tp, bno, (xfs_extlen_t)len); in xfs_bmap_del_extent()
5051 xfs_fileoff_t bno, /* starting offset to unmap */ in xfs_bunmapi() argument
5081 trace_xfs_bunmap(ip, bno, len, flags, _RET_IP_); in xfs_bunmapi()
5111 start = bno; in xfs_bunmapi()
5112 bno = start + len - 1; in xfs_bunmapi()
5113 ep = xfs_bmap_search_extents(ip, bno, whichfork, &eof, &lastx, &got, in xfs_bunmapi()
5123 bno = got.br_startoff + got.br_blockcount - 1; in xfs_bunmapi()
5144 while (bno != (xfs_fileoff_t)-1 && bno >= start && lastx >= 0 && in xfs_bunmapi()
5150 if (got.br_startoff > bno) { in xfs_bunmapi()
5160 bno = XFS_FILEOFF_MIN(bno, in xfs_bunmapi()
5162 if (bno < start) in xfs_bunmapi()
5177 if (del.br_startoff + del.br_blockcount > bno + 1) in xfs_bunmapi()
5178 del.br_blockcount = bno + 1 - del.br_startoff; in xfs_bunmapi()
5195 ASSERT(bno >= mod); in xfs_bunmapi()
5196 bno -= mod > del.br_blockcount ? in xfs_bunmapi()
5198 if (bno < got.br_startoff) { in xfs_bunmapi()
5247 ASSERT(bno >= del.br_blockcount); in xfs_bunmapi()
5248 bno -= del.br_blockcount; in xfs_bunmapi()
5249 if (got.br_startoff > bno) { in xfs_bunmapi()
5347 bno = del.br_startoff - 1; in xfs_bunmapi()
5352 if (bno != (xfs_fileoff_t)-1 && bno >= start) { in xfs_bunmapi()
5355 if (xfs_bmbt_get_startoff(ep) > bno) { in xfs_bunmapi()
5365 *done = bno == (xfs_fileoff_t)-1 || bno < start || lastx < 0; in xfs_bunmapi()