Lines Matching full:got
1251 struct xfs_bmbt_irec got; in xfs_bmap_first_unused() local
1269 for_each_xfs_iext(ifp, &icur, &got) { in xfs_bmap_first_unused()
1273 if (got.br_startoff >= lowest + len && in xfs_bmap_first_unused()
1274 got.br_startoff - max >= len) in xfs_bmap_first_unused()
1276 lastaddr = got.br_startoff + got.br_blockcount; in xfs_bmap_first_unused()
1298 struct xfs_bmbt_irec got; in xfs_bmap_last_before() local
1319 if (!xfs_iext_lookup_extent_before(ip, ifp, last_block, &icur, &got)) in xfs_bmap_last_before()
1453 struct xfs_bmbt_irec *new = &bma->got; in xfs_bmap_add_extent_delay_real()
3102 if (!isnullstartblock(ap->got.br_startblock)) { in xfs_bmap_adjacent()
3106 adjust = gotdiff = ap->got.br_startoff - ap->offset; in xfs_bmap_adjacent()
3111 gotbno = ap->got.br_startblock; in xfs_bmap_adjacent()
3197 * use the best as the minimum, otherwise we've got the maxlen we in xfs_bmap_select_minlen()
3316 if (xfs_bmap_extsize_align(mp, &ap->got, &ap->prev, align, 0, in xfs_bmap_compute_alignments()
3720 struct xfs_bmbt_irec *got, in xfs_bmapi_trim_map() argument
3729 got->br_startoff + got->br_blockcount <= obno) { in xfs_bmapi_trim_map()
3730 *mval = *got; in xfs_bmapi_trim_map()
3731 if (isnullstartblock(got->br_startblock)) in xfs_bmapi_trim_map()
3741 if (isnullstartblock(got->br_startblock)) in xfs_bmapi_trim_map()
3744 mval->br_startblock = got->br_startblock + in xfs_bmapi_trim_map()
3745 (*bno - got->br_startoff); in xfs_bmapi_trim_map()
3747 * Return the minimum of what we got and what we asked for for in xfs_bmapi_trim_map()
3754 got->br_blockcount - (*bno - got->br_startoff)); in xfs_bmapi_trim_map()
3755 mval->br_state = got->br_state; in xfs_bmapi_trim_map()
3829 struct xfs_bmbt_irec got; in xfs_bmapi_read() local
3861 if (!xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) in xfs_bmapi_read()
3869 got.br_startoff = end; in xfs_bmapi_read()
3870 if (got.br_startoff > bno) { in xfs_bmapi_read()
3875 XFS_FILBLKS_MIN(len, got.br_startoff - bno); in xfs_bmapi_read()
3885 xfs_bmapi_trim_map(mval, &got, &bno, len, obno, end, n, flags); in xfs_bmapi_read()
3893 if (!xfs_iext_next_extent(ifp, &icur, &got)) in xfs_bmapi_read()
3970 bma->got.br_startoff = bma->offset; in xfs_bmapi_allocate()
3971 bma->got.br_startblock = bma->blkno; in xfs_bmapi_allocate()
3972 bma->got.br_blockcount = bma->length; in xfs_bmapi_allocate()
3973 bma->got.br_state = XFS_EXT_NORM; in xfs_bmapi_allocate()
3976 bma->got.br_state = XFS_EXT_UNWRITTEN; in xfs_bmapi_allocate()
3982 whichfork, &bma->icur, &bma->cur, &bma->got, in xfs_bmapi_allocate()
3992 xfs_iext_get_extent(ifp, &bma->icur, &bma->got); in xfs_bmapi_allocate()
3994 ASSERT(bma->got.br_startoff <= bma->offset); in xfs_bmapi_allocate()
3995 ASSERT(bma->got.br_startoff + bma->got.br_blockcount >= in xfs_bmapi_allocate()
3997 ASSERT(bma->got.br_state == XFS_EXT_NORM || in xfs_bmapi_allocate()
3998 bma->got.br_state == XFS_EXT_UNWRITTEN); in xfs_bmapi_allocate()
4070 xfs_iext_get_extent(ifp, &bma->icur, &bma->got); in xfs_bmapi_convert_unwritten()
4212 if (!xfs_iext_lookup_extent(ip, ifp, bno, &bma.icur, &bma.got)) in xfs_bmapi_write()
4225 if (eof || bma.got.br_startoff > bno) { in xfs_bmapi_write()
4235 } else if (isnullstartblock(bma.got.br_startblock)) { in xfs_bmapi_write()
4262 bma.got.br_blockcount - in xfs_bmapi_write()
4263 (bno - bma.got.br_startoff)); in xfs_bmapi_write()
4267 bma.got.br_startoff - bno); in xfs_bmapi_write()
4294 xfs_bmapi_trim_map(mval, &bma.got, &bno, len, obno, in xfs_bmapi_write()
4316 bma.prev = bma.got; in xfs_bmapi_write()
4317 if (!xfs_iext_next_extent(ifp, &bma.icur, &bma.got)) in xfs_bmapi_write()
4394 if (!xfs_iext_lookup_extent(ip, ifp, offset_fsb, &bma.icur, &bma.got) || in xfs_bmapi_convert_one_delalloc()
4395 bma.got.br_startoff > offset_fsb) { in xfs_bmapi_convert_one_delalloc()
4410 if (!isnullstartblock(bma.got.br_startblock)) { in xfs_bmapi_convert_one_delalloc()
4411 xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags, in xfs_bmapi_convert_one_delalloc()
4428 bma.offset = bma.got.br_startoff; in xfs_bmapi_convert_one_delalloc()
4429 bma.length = bma.got.br_blockcount; in xfs_bmapi_convert_one_delalloc()
4458 ASSERT(!isnullstartblock(bma.got.br_startblock)); in xfs_bmapi_convert_one_delalloc()
4459 xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags, in xfs_bmapi_convert_one_delalloc()
4528 struct xfs_bmbt_irec got; in xfs_bmapi_remap() local
4555 if (xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) { in xfs_bmapi_remap()
4557 ASSERT(got.br_startoff > bno); in xfs_bmapi_remap()
4558 ASSERT(got.br_startoff - bno >= len); in xfs_bmapi_remap()
4568 got.br_startoff = bno; in xfs_bmapi_remap()
4569 got.br_startblock = startblock; in xfs_bmapi_remap()
4570 got.br_blockcount = len; in xfs_bmapi_remap()
4572 got.br_state = XFS_EXT_UNWRITTEN; in xfs_bmapi_remap()
4574 got.br_state = XFS_EXT_NORM; in xfs_bmapi_remap()
4577 &cur, &got, &logflags, flags); in xfs_bmapi_remap()
4670 struct xfs_bmbt_irec *got, in xfs_bmap_del_extent_delay() argument
4688 got_endoff = got->br_startoff + got->br_blockcount; in xfs_bmap_del_extent_delay()
4689 da_old = startblockval(got->br_startblock); in xfs_bmap_del_extent_delay()
4693 ASSERT(got->br_startoff <= del->br_startoff); in xfs_bmap_del_extent_delay()
4704 if (got->br_startoff == del->br_startoff) in xfs_bmap_del_extent_delay()
4721 got->br_startoff = del_endoff; in xfs_bmap_del_extent_delay()
4722 got->br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_delay()
4724 got->br_blockcount), da_old); in xfs_bmap_del_extent_delay()
4725 got->br_startblock = nullstartblock((int)da_new); in xfs_bmap_del_extent_delay()
4726 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_delay()
4732 got->br_blockcount = got->br_blockcount - del->br_blockcount; in xfs_bmap_del_extent_delay()
4734 got->br_blockcount), da_old); in xfs_bmap_del_extent_delay()
4735 got->br_startblock = nullstartblock((int)da_new); in xfs_bmap_del_extent_delay()
4736 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_delay()
4748 got->br_blockcount = del->br_startoff - got->br_startoff; in xfs_bmap_del_extent_delay()
4749 got_indlen = xfs_bmap_worst_indlen(ip, got->br_blockcount); in xfs_bmap_del_extent_delay()
4774 got->br_startblock = nullstartblock((int)got_indlen); in xfs_bmap_del_extent_delay()
4777 new.br_state = got->br_state; in xfs_bmap_del_extent_delay()
4780 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_delay()
4813 struct xfs_bmbt_irec *got, in xfs_bmap_del_extent_cow() argument
4825 got_endoff = got->br_startoff + got->br_blockcount; in xfs_bmap_del_extent_cow()
4828 ASSERT(got->br_startoff <= del->br_startoff); in xfs_bmap_del_extent_cow()
4830 ASSERT(!isnullstartblock(got->br_startblock)); in xfs_bmap_del_extent_cow()
4832 if (got->br_startoff == del->br_startoff) in xfs_bmap_del_extent_cow()
4849 got->br_startoff = del_endoff; in xfs_bmap_del_extent_cow()
4850 got->br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_cow()
4851 got->br_startblock = del->br_startblock + del->br_blockcount; in xfs_bmap_del_extent_cow()
4852 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_cow()
4858 got->br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_cow()
4859 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_cow()
4865 got->br_blockcount = del->br_startoff - got->br_startoff; in xfs_bmap_del_extent_cow()
4869 new.br_state = got->br_state; in xfs_bmap_del_extent_cow()
4872 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_cow()
4926 struct xfs_bmbt_irec got; /* current extent entry */ in xfs_bmap_del_extent_real() local
4927 xfs_fileoff_t got_endoff; /* first offset past got */ in xfs_bmap_del_extent_real()
4945 xfs_iext_get_extent(ifp, icur, &got); in xfs_bmap_del_extent_real()
4946 ASSERT(got.br_startoff <= del->br_startoff); in xfs_bmap_del_extent_real()
4948 got_endoff = got.br_startoff + got.br_blockcount; in xfs_bmap_del_extent_real()
4950 ASSERT(!isnullstartblock(got.br_startblock)); in xfs_bmap_del_extent_real()
4964 del->br_startoff > got.br_startoff && del_endoff < got_endoff) in xfs_bmap_del_extent_real()
4976 error = xfs_bmbt_lookup_eq(cur, &got, &i); in xfs_bmap_del_extent_real()
4985 if (got.br_startoff == del->br_startoff) in xfs_bmap_del_extent_real()
5015 got.br_startoff = del_endoff; in xfs_bmap_del_extent_real()
5016 got.br_startblock = del_endblock; in xfs_bmap_del_extent_real()
5017 got.br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_real()
5018 xfs_iext_update_extent(ip, state, icur, &got); in xfs_bmap_del_extent_real()
5023 error = xfs_bmbt_update(cur, &got); in xfs_bmap_del_extent_real()
5031 got.br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_real()
5032 xfs_iext_update_extent(ip, state, icur, &got); in xfs_bmap_del_extent_real()
5037 error = xfs_bmbt_update(cur, &got); in xfs_bmap_del_extent_real()
5046 old = got; in xfs_bmap_del_extent_real()
5048 got.br_blockcount = del->br_startoff - got.br_startoff; in xfs_bmap_del_extent_real()
5049 xfs_iext_update_extent(ip, state, icur, &got); in xfs_bmap_del_extent_real()
5053 new.br_state = got.br_state; in xfs_bmap_del_extent_real()
5058 error = xfs_bmbt_update(cur, &got); in xfs_bmap_del_extent_real()
5078 error = xfs_bmbt_lookup_eq(cur, &got, &i); in xfs_bmap_del_extent_real()
5187 struct xfs_bmbt_irec got; /* current extent record */ in __xfs_bunmapi() local
5229 if (!xfs_iext_lookup_extent_before(ip, ifp, &end, &icur, &got)) { in __xfs_bunmapi()
5249 if (got.br_startoff > end && in __xfs_bunmapi()
5250 !xfs_iext_prev_extent(ifp, &icur, &got)) { in __xfs_bunmapi()
5259 got.br_startoff + got.br_blockcount - 1); in __xfs_bunmapi()
5266 del = got; in __xfs_bunmapi()
5269 if (got.br_startoff < start) { in __xfs_bunmapi()
5271 del.br_blockcount -= start - got.br_startoff; in __xfs_bunmapi()
5273 del.br_startblock += start - got.br_startoff; in __xfs_bunmapi()
5299 if (end < got.br_startoff && in __xfs_bunmapi()
5300 !xfs_iext_prev_extent(ifp, &icur, &got)) { in __xfs_bunmapi()
5352 if (got.br_startoff > end && in __xfs_bunmapi()
5353 !xfs_iext_prev_extent(ifp, &icur, &got)) { in __xfs_bunmapi()
5402 xfs_bmap_del_extent_delay(ip, whichfork, &icur, &got, in __xfs_bunmapi()
5419 if (!xfs_iext_get_extent(ifp, &icur, &got) || in __xfs_bunmapi()
5420 (got.br_startoff > end && in __xfs_bunmapi()
5421 !xfs_iext_prev_extent(ifp, &icur, &got))) { in __xfs_bunmapi()
5498 struct xfs_bmbt_irec *got, /* current extent to shift */ in xfs_bmse_can_merge() argument
5503 startoff = got->br_startoff - shift; in xfs_bmse_can_merge()
5510 (left->br_startblock + left->br_blockcount != got->br_startblock) || in xfs_bmse_can_merge()
5511 (left->br_state != got->br_state) || in xfs_bmse_can_merge()
5512 (left->br_blockcount + got->br_blockcount > XFS_MAX_BMBT_EXTLEN) || in xfs_bmse_can_merge()
5513 !xfs_bmap_same_rtgroup(ip, whichfork, left, got)) in xfs_bmse_can_merge()
5535 struct xfs_bmbt_irec *got, /* extent to shift */ in xfs_bmse_merge() argument
5546 blockcount = left->br_blockcount + got->br_blockcount; in xfs_bmse_merge()
5549 ASSERT(xfs_bmse_can_merge(ip, whichfork, left, got, shift)); in xfs_bmse_merge()
5566 error = xfs_bmbt_lookup_eq(cur, got, &i); in xfs_bmse_merge()
5607 xfs_rmap_unmap_extent(tp, ip, whichfork, got); in xfs_bmse_merge()
5608 memcpy(&new, got, sizeof(new)); in xfs_bmse_merge()
5620 struct xfs_bmbt_irec *got, in xfs_bmap_shift_update_extent() argument
5626 struct xfs_bmbt_irec prev = *got; in xfs_bmap_shift_update_extent()
5631 got->br_startoff = startoff; in xfs_bmap_shift_update_extent()
5642 error = xfs_bmbt_update(cur, got); in xfs_bmap_shift_update_extent()
5650 got); in xfs_bmap_shift_update_extent()
5654 xfs_rmap_map_extent(tp, ip, whichfork, got); in xfs_bmap_shift_update_extent()
5670 struct xfs_bmbt_irec got, prev; in xfs_bmap_collapse_extents() local
5694 if (!xfs_iext_lookup_extent(ip, ifp, *next_fsb, &icur, &got)) { in xfs_bmap_collapse_extents()
5698 if (XFS_IS_CORRUPT(mp, isnullstartblock(got.br_startblock))) { in xfs_bmap_collapse_extents()
5704 new_startoff = got.br_startoff - offset_shift_fsb; in xfs_bmap_collapse_extents()
5711 if (xfs_bmse_can_merge(ip, whichfork, &prev, &got, in xfs_bmap_collapse_extents()
5714 offset_shift_fsb, &icur, &got, &prev, in xfs_bmap_collapse_extents()
5721 if (got.br_startoff < offset_shift_fsb) { in xfs_bmap_collapse_extents()
5727 error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got, in xfs_bmap_collapse_extents()
5733 if (!xfs_iext_next_extent(ifp, &icur, &got)) { in xfs_bmap_collapse_extents()
5738 *next_fsb = got.br_startoff; in xfs_bmap_collapse_extents()
5754 struct xfs_bmbt_irec got; in xfs_bmap_can_insert_extents() local
5764 error = xfs_bmap_last_extent(NULL, ip, XFS_DATA_FORK, &got, &is_empty); in xfs_bmap_can_insert_extents()
5765 if (!error && !is_empty && got.br_startoff >= off && in xfs_bmap_can_insert_extents()
5766 ((got.br_startoff + shift) & BMBT_STARTOFF_MASK) < got.br_startoff) in xfs_bmap_can_insert_extents()
5786 struct xfs_bmbt_irec got, next; in xfs_bmap_insert_extents() local
5812 if (!xfs_iext_get_extent(ifp, &icur, &got) || in xfs_bmap_insert_extents()
5813 stop_fsb > got.br_startoff) { in xfs_bmap_insert_extents()
5818 if (!xfs_iext_lookup_extent(ip, ifp, *next_fsb, &icur, &got)) { in xfs_bmap_insert_extents()
5823 if (XFS_IS_CORRUPT(mp, isnullstartblock(got.br_startblock))) { in xfs_bmap_insert_extents()
5829 if (XFS_IS_CORRUPT(mp, stop_fsb > got.br_startoff)) { in xfs_bmap_insert_extents()
5835 new_startoff = got.br_startoff + offset_shift_fsb; in xfs_bmap_insert_extents()
5837 if (new_startoff + got.br_blockcount > next.br_startoff) { in xfs_bmap_insert_extents()
5848 if (xfs_bmse_can_merge(ip, whichfork, &got, &next, in xfs_bmap_insert_extents()
5853 error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got, in xfs_bmap_insert_extents()
5858 if (!xfs_iext_prev_extent(ifp, &icur, &got) || in xfs_bmap_insert_extents()
5859 stop_fsb >= got.br_startoff + got.br_blockcount) { in xfs_bmap_insert_extents()
5864 *next_fsb = got.br_startoff; in xfs_bmap_insert_extents()
5888 struct xfs_bmbt_irec got; in xfs_bmap_split_extent() local
5891 xfs_fsblock_t gotblkcnt; /* new block count for got */ in xfs_bmap_split_extent()
5914 if (!xfs_iext_lookup_extent(ip, ifp, split_fsb, &icur, &got) || in xfs_bmap_split_extent()
5915 got.br_startoff >= split_fsb) in xfs_bmap_split_extent()
5918 gotblkcnt = split_fsb - got.br_startoff; in xfs_bmap_split_extent()
5920 new.br_startblock = got.br_startblock + gotblkcnt; in xfs_bmap_split_extent()
5921 new.br_blockcount = got.br_blockcount - gotblkcnt; in xfs_bmap_split_extent()
5922 new.br_state = got.br_state; in xfs_bmap_split_extent()
5926 error = xfs_bmbt_lookup_eq(cur, &got, &i); in xfs_bmap_split_extent()
5936 got.br_blockcount = gotblkcnt; in xfs_bmap_split_extent()
5938 &got); in xfs_bmap_split_extent()
5942 error = xfs_bmbt_update(cur, &got); in xfs_bmap_split_extent()