Lines Matching refs:got

1214 	struct xfs_bmbt_irec	got;  in xfs_bmap_first_unused()  local
1232 for_each_xfs_iext(ifp, &icur, &got) { in xfs_bmap_first_unused()
1236 if (got.br_startoff >= lowest + len && in xfs_bmap_first_unused()
1237 got.br_startoff - max >= len) in xfs_bmap_first_unused()
1239 lastaddr = got.br_startoff + got.br_blockcount; in xfs_bmap_first_unused()
1261 struct xfs_bmbt_irec got; in xfs_bmap_last_before() local
1281 if (!xfs_iext_lookup_extent_before(ip, ifp, last_block, &icur, &got)) in xfs_bmap_last_before()
1395 struct xfs_bmbt_irec *new = &bma->got; in xfs_bmap_add_extent_delay_real()
3124 if (!isnullstartblock(ap->got.br_startblock)) { in xfs_bmap_adjacent()
3128 adjust = gotdiff = ap->got.br_startoff - ap->offset; in xfs_bmap_adjacent()
3133 gotbno = ap->got.br_startblock; in xfs_bmap_adjacent()
3385 if (xfs_bmap_extsize_align(mp, &ap->got, &ap->prev, align, 0, in xfs_bmap_compute_alignments()
3763 struct xfs_bmbt_irec *got, in xfs_bmapi_trim_map() argument
3772 got->br_startoff + got->br_blockcount <= obno) { in xfs_bmapi_trim_map()
3773 *mval = *got; in xfs_bmapi_trim_map()
3774 if (isnullstartblock(got->br_startblock)) in xfs_bmapi_trim_map()
3784 if (isnullstartblock(got->br_startblock)) in xfs_bmapi_trim_map()
3787 mval->br_startblock = got->br_startblock + in xfs_bmapi_trim_map()
3788 (*bno - got->br_startoff); in xfs_bmapi_trim_map()
3797 got->br_blockcount - (*bno - got->br_startoff)); in xfs_bmapi_trim_map()
3798 mval->br_state = got->br_state; in xfs_bmapi_trim_map()
3872 struct xfs_bmbt_irec got; in xfs_bmapi_read() local
3900 if (!xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) in xfs_bmapi_read()
3908 got.br_startoff = end; in xfs_bmapi_read()
3909 if (got.br_startoff > bno) { in xfs_bmapi_read()
3914 XFS_FILBLKS_MIN(len, got.br_startoff - bno); in xfs_bmapi_read()
3924 xfs_bmapi_trim_map(mval, &got, &bno, len, obno, end, n, flags); in xfs_bmapi_read()
3932 if (!xfs_iext_next_extent(ifp, &icur, &got)) in xfs_bmapi_read()
3959 struct xfs_bmbt_irec *got, in xfs_bmapi_reserve_delalloc() argument
3976 alen = XFS_FILBLKS_MIN(alen, got->br_startoff - aoff); in xfs_bmapi_reserve_delalloc()
3988 error = xfs_bmap_extsize_align(mp, got, &prev, extsz, 0, eof, in xfs_bmapi_reserve_delalloc()
4021 got->br_startoff = aoff; in xfs_bmapi_reserve_delalloc()
4022 got->br_startblock = nullstartblock(indlen); in xfs_bmapi_reserve_delalloc()
4023 got->br_blockcount = alen; in xfs_bmapi_reserve_delalloc()
4024 got->br_state = XFS_EXT_NORM; in xfs_bmapi_reserve_delalloc()
4026 xfs_bmap_add_extent_hole_delay(ip, whichfork, icur, got); in xfs_bmapi_reserve_delalloc()
4102 bma->length = (xfs_extlen_t)bma->got.br_blockcount; in xfs_bmapi_allocate()
4103 bma->offset = bma->got.br_startoff; in xfs_bmapi_allocate()
4110 bma->got.br_startoff - bma->offset); in xfs_bmapi_allocate()
4148 bma->got.br_startoff = bma->offset; in xfs_bmapi_allocate()
4149 bma->got.br_startblock = bma->blkno; in xfs_bmapi_allocate()
4150 bma->got.br_blockcount = bma->length; in xfs_bmapi_allocate()
4151 bma->got.br_state = XFS_EXT_NORM; in xfs_bmapi_allocate()
4154 bma->got.br_state = XFS_EXT_UNWRITTEN; in xfs_bmapi_allocate()
4160 whichfork, &bma->icur, &bma->cur, &bma->got, in xfs_bmapi_allocate()
4172 xfs_iext_get_extent(ifp, &bma->icur, &bma->got); in xfs_bmapi_allocate()
4174 ASSERT(bma->got.br_startoff <= bma->offset); in xfs_bmapi_allocate()
4175 ASSERT(bma->got.br_startoff + bma->got.br_blockcount >= in xfs_bmapi_allocate()
4177 ASSERT(bma->got.br_state == XFS_EXT_NORM || in xfs_bmapi_allocate()
4178 bma->got.br_state == XFS_EXT_UNWRITTEN); in xfs_bmapi_allocate()
4250 xfs_iext_get_extent(ifp, &bma->icur, &bma->got); in xfs_bmapi_convert_unwritten()
4382 if (!xfs_iext_lookup_extent(ip, ifp, bno, &bma.icur, &bma.got)) in xfs_bmapi_write()
4395 if (eof || bma.got.br_startoff > bno) { in xfs_bmapi_write()
4405 } else if (isnullstartblock(bma.got.br_startblock)) { in xfs_bmapi_write()
4450 xfs_bmapi_trim_map(mval, &bma.got, &bno, len, obno, in xfs_bmapi_write()
4472 bma.prev = bma.got; in xfs_bmapi_write()
4473 if (!xfs_iext_next_extent(ifp, &bma.icur, &bma.got)) in xfs_bmapi_write()
4537 if (!xfs_iext_lookup_extent(ip, ifp, offset_fsb, &bma.icur, &bma.got) || in xfs_bmapi_convert_delalloc()
4538 bma.got.br_startoff > offset_fsb) { in xfs_bmapi_convert_delalloc()
4553 if (!isnullstartblock(bma.got.br_startblock)) { in xfs_bmapi_convert_delalloc()
4554 xfs_bmbt_to_iomap(ip, iomap, &bma.got, flags); in xfs_bmapi_convert_delalloc()
4562 bma.offset = bma.got.br_startoff; in xfs_bmapi_convert_delalloc()
4563 bma.length = max_t(xfs_filblks_t, bma.got.br_blockcount, MAXEXTLEN); in xfs_bmapi_convert_delalloc()
4594 if (WARN_ON_ONCE(!xfs_valid_startblock(ip, bma.got.br_startblock))) in xfs_bmapi_convert_delalloc()
4600 ASSERT(!isnullstartblock(bma.got.br_startblock)); in xfs_bmapi_convert_delalloc()
4601 xfs_bmbt_to_iomap(ip, iomap, &bma.got, flags); in xfs_bmapi_convert_delalloc()
4637 struct xfs_bmbt_irec got; in xfs_bmapi_remap() local
4663 if (xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) { in xfs_bmapi_remap()
4665 ASSERT(got.br_startoff > bno); in xfs_bmapi_remap()
4666 ASSERT(got.br_startoff - bno >= len); in xfs_bmapi_remap()
4677 got.br_startoff = bno; in xfs_bmapi_remap()
4678 got.br_startblock = startblock; in xfs_bmapi_remap()
4679 got.br_blockcount = len; in xfs_bmapi_remap()
4681 got.br_state = XFS_EXT_UNWRITTEN; in xfs_bmapi_remap()
4683 got.br_state = XFS_EXT_NORM; in xfs_bmapi_remap()
4686 &cur, &got, &logflags, flags); in xfs_bmapi_remap()
4795 struct xfs_bmbt_irec *got, in xfs_bmap_del_extent_delay() argument
4812 got_endoff = got->br_startoff + got->br_blockcount; in xfs_bmap_del_extent_delay()
4813 da_old = startblockval(got->br_startblock); in xfs_bmap_del_extent_delay()
4817 ASSERT(got->br_startoff <= del->br_startoff); in xfs_bmap_del_extent_delay()
4838 if (got->br_startoff == del->br_startoff) in xfs_bmap_del_extent_delay()
4855 got->br_startoff = del_endoff; in xfs_bmap_del_extent_delay()
4856 got->br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_delay()
4858 got->br_blockcount), da_old); in xfs_bmap_del_extent_delay()
4859 got->br_startblock = nullstartblock((int)da_new); in xfs_bmap_del_extent_delay()
4860 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_delay()
4866 got->br_blockcount = got->br_blockcount - del->br_blockcount; in xfs_bmap_del_extent_delay()
4868 got->br_blockcount), da_old); in xfs_bmap_del_extent_delay()
4869 got->br_startblock = nullstartblock((int)da_new); in xfs_bmap_del_extent_delay()
4870 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_delay()
4882 got->br_blockcount = del->br_startoff - got->br_startoff; in xfs_bmap_del_extent_delay()
4883 got_indlen = xfs_bmap_worst_indlen(ip, got->br_blockcount); in xfs_bmap_del_extent_delay()
4892 got->br_startblock = nullstartblock((int)got_indlen); in xfs_bmap_del_extent_delay()
4895 new.br_state = got->br_state; in xfs_bmap_del_extent_delay()
4898 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_delay()
4922 struct xfs_bmbt_irec *got, in xfs_bmap_del_extent_cow() argument
4934 got_endoff = got->br_startoff + got->br_blockcount; in xfs_bmap_del_extent_cow()
4937 ASSERT(got->br_startoff <= del->br_startoff); in xfs_bmap_del_extent_cow()
4939 ASSERT(!isnullstartblock(got->br_startblock)); in xfs_bmap_del_extent_cow()
4941 if (got->br_startoff == del->br_startoff) in xfs_bmap_del_extent_cow()
4958 got->br_startoff = del_endoff; in xfs_bmap_del_extent_cow()
4959 got->br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_cow()
4960 got->br_startblock = del->br_startblock + del->br_blockcount; in xfs_bmap_del_extent_cow()
4961 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_cow()
4967 got->br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_cow()
4968 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_cow()
4974 got->br_blockcount = del->br_startoff - got->br_startoff; in xfs_bmap_del_extent_cow()
4978 new.br_state = got->br_state; in xfs_bmap_del_extent_cow()
4981 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_cow()
5009 struct xfs_bmbt_irec got; /* current extent entry */ in xfs_bmap_del_extent_real() local
5026 xfs_iext_get_extent(ifp, icur, &got); in xfs_bmap_del_extent_real()
5027 ASSERT(got.br_startoff <= del->br_startoff); in xfs_bmap_del_extent_real()
5029 got_endoff = got.br_startoff + got.br_blockcount; in xfs_bmap_del_extent_real()
5031 ASSERT(!isnullstartblock(got.br_startblock)); in xfs_bmap_del_extent_real()
5046 del->br_startoff > got.br_startoff && del_endoff < got_endoff) in xfs_bmap_del_extent_real()
5081 error = xfs_bmbt_lookup_eq(cur, &got, &i); in xfs_bmap_del_extent_real()
5090 if (got.br_startoff == del->br_startoff) in xfs_bmap_del_extent_real()
5120 got.br_startoff = del_endoff; in xfs_bmap_del_extent_real()
5121 got.br_startblock = del_endblock; in xfs_bmap_del_extent_real()
5122 got.br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_real()
5123 xfs_iext_update_extent(ip, state, icur, &got); in xfs_bmap_del_extent_real()
5128 error = xfs_bmbt_update(cur, &got); in xfs_bmap_del_extent_real()
5136 got.br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_real()
5137 xfs_iext_update_extent(ip, state, icur, &got); in xfs_bmap_del_extent_real()
5142 error = xfs_bmbt_update(cur, &got); in xfs_bmap_del_extent_real()
5171 old = got; in xfs_bmap_del_extent_real()
5173 got.br_blockcount = del->br_startoff - got.br_startoff; in xfs_bmap_del_extent_real()
5174 xfs_iext_update_extent(ip, state, icur, &got); in xfs_bmap_del_extent_real()
5178 new.br_state = got.br_state; in xfs_bmap_del_extent_real()
5183 error = xfs_bmbt_update(cur, &got); in xfs_bmap_del_extent_real()
5203 error = xfs_bmbt_lookup_eq(cur, &got, &i); in xfs_bmap_del_extent_real()
5291 struct xfs_bmbt_irec got; /* current extent record */ in __xfs_bunmapi() local
5343 if (!xfs_iext_lookup_extent_before(ip, ifp, &end, &icur, &got)) { in __xfs_bunmapi()
5374 if (got.br_startoff > end && in __xfs_bunmapi()
5375 !xfs_iext_prev_extent(ifp, &icur, &got)) { in __xfs_bunmapi()
5384 got.br_startoff + got.br_blockcount - 1); in __xfs_bunmapi()
5391 del = got; in __xfs_bunmapi()
5394 if (got.br_startoff < start) { in __xfs_bunmapi()
5396 del.br_blockcount -= start - got.br_startoff; in __xfs_bunmapi()
5398 del.br_startblock += start - got.br_startoff; in __xfs_bunmapi()
5432 if (end < got.br_startoff && in __xfs_bunmapi()
5433 !xfs_iext_prev_extent(ifp, &icur, &got)) { in __xfs_bunmapi()
5484 if (got.br_startoff > end && in __xfs_bunmapi()
5485 !xfs_iext_prev_extent(ifp, &icur, &got)) { in __xfs_bunmapi()
5535 &got, &del); in __xfs_bunmapi()
5553 if (!xfs_iext_get_extent(ifp, &icur, &got) || in __xfs_bunmapi()
5554 (got.br_startoff > end && in __xfs_bunmapi()
5555 !xfs_iext_prev_extent(ifp, &icur, &got))) { in __xfs_bunmapi()
5630 struct xfs_bmbt_irec *got, /* current extent to shift */ in xfs_bmse_can_merge() argument
5635 startoff = got->br_startoff - shift; in xfs_bmse_can_merge()
5642 (left->br_startblock + left->br_blockcount != got->br_startblock) || in xfs_bmse_can_merge()
5643 (left->br_state != got->br_state) || in xfs_bmse_can_merge()
5644 (left->br_blockcount + got->br_blockcount > MAXEXTLEN)) in xfs_bmse_can_merge()
5666 struct xfs_bmbt_irec *got, /* extent to shift */ in xfs_bmse_merge() argument
5677 blockcount = left->br_blockcount + got->br_blockcount; in xfs_bmse_merge()
5681 ASSERT(xfs_bmse_can_merge(left, got, shift)); in xfs_bmse_merge()
5698 error = xfs_bmbt_lookup_eq(cur, got, &i); in xfs_bmse_merge()
5733 xfs_rmap_unmap_extent(tp, ip, whichfork, got); in xfs_bmse_merge()
5734 memcpy(&new, got, sizeof(new)); in xfs_bmse_merge()
5746 struct xfs_bmbt_irec *got, in xfs_bmap_shift_update_extent() argument
5752 struct xfs_bmbt_irec prev = *got; in xfs_bmap_shift_update_extent()
5757 got->br_startoff = startoff; in xfs_bmap_shift_update_extent()
5766 error = xfs_bmbt_update(cur, got); in xfs_bmap_shift_update_extent()
5774 got); in xfs_bmap_shift_update_extent()
5778 xfs_rmap_map_extent(tp, ip, whichfork, got); in xfs_bmap_shift_update_extent()
5794 struct xfs_bmbt_irec got, prev; in xfs_bmap_collapse_extents() local
5819 if (!xfs_iext_lookup_extent(ip, ifp, *next_fsb, &icur, &got)) { in xfs_bmap_collapse_extents()
5823 if (XFS_IS_CORRUPT(mp, isnullstartblock(got.br_startblock))) { in xfs_bmap_collapse_extents()
5828 new_startoff = got.br_startoff - offset_shift_fsb; in xfs_bmap_collapse_extents()
5835 if (xfs_bmse_can_merge(&prev, &got, offset_shift_fsb)) { in xfs_bmap_collapse_extents()
5837 offset_shift_fsb, &icur, &got, &prev, in xfs_bmap_collapse_extents()
5844 if (got.br_startoff < offset_shift_fsb) { in xfs_bmap_collapse_extents()
5850 error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got, in xfs_bmap_collapse_extents()
5856 if (!xfs_iext_next_extent(ifp, &icur, &got)) { in xfs_bmap_collapse_extents()
5861 *next_fsb = got.br_startoff; in xfs_bmap_collapse_extents()
5877 struct xfs_bmbt_irec got; in xfs_bmap_can_insert_extents() local
5887 error = xfs_bmap_last_extent(NULL, ip, XFS_DATA_FORK, &got, &is_empty); in xfs_bmap_can_insert_extents()
5888 if (!error && !is_empty && got.br_startoff >= off && in xfs_bmap_can_insert_extents()
5889 ((got.br_startoff + shift) & BMBT_STARTOFF_MASK) < got.br_startoff) in xfs_bmap_can_insert_extents()
5909 struct xfs_bmbt_irec got, next; in xfs_bmap_insert_extents() local
5936 if (!xfs_iext_get_extent(ifp, &icur, &got) || in xfs_bmap_insert_extents()
5937 stop_fsb > got.br_startoff) { in xfs_bmap_insert_extents()
5942 if (!xfs_iext_lookup_extent(ip, ifp, *next_fsb, &icur, &got)) { in xfs_bmap_insert_extents()
5947 if (XFS_IS_CORRUPT(mp, isnullstartblock(got.br_startblock))) { in xfs_bmap_insert_extents()
5952 if (XFS_IS_CORRUPT(mp, stop_fsb > got.br_startoff)) { in xfs_bmap_insert_extents()
5957 new_startoff = got.br_startoff + offset_shift_fsb; in xfs_bmap_insert_extents()
5959 if (new_startoff + got.br_blockcount > next.br_startoff) { in xfs_bmap_insert_extents()
5970 if (xfs_bmse_can_merge(&got, &next, offset_shift_fsb)) in xfs_bmap_insert_extents()
5974 error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got, in xfs_bmap_insert_extents()
5979 if (!xfs_iext_prev_extent(ifp, &icur, &got) || in xfs_bmap_insert_extents()
5980 stop_fsb >= got.br_startoff + got.br_blockcount) { in xfs_bmap_insert_extents()
5985 *next_fsb = got.br_startoff; in xfs_bmap_insert_extents()
6009 struct xfs_bmbt_irec got; in xfs_bmap_split_extent() local
6034 if (!xfs_iext_lookup_extent(ip, ifp, split_fsb, &icur, &got) || in xfs_bmap_split_extent()
6035 got.br_startoff >= split_fsb) in xfs_bmap_split_extent()
6038 gotblkcnt = split_fsb - got.br_startoff; in xfs_bmap_split_extent()
6040 new.br_startblock = got.br_startblock + gotblkcnt; in xfs_bmap_split_extent()
6041 new.br_blockcount = got.br_blockcount - gotblkcnt; in xfs_bmap_split_extent()
6042 new.br_state = got.br_state; in xfs_bmap_split_extent()
6047 error = xfs_bmbt_lookup_eq(cur, &got, &i); in xfs_bmap_split_extent()
6056 got.br_blockcount = gotblkcnt; in xfs_bmap_split_extent()
6058 &got); in xfs_bmap_split_extent()
6062 error = xfs_bmbt_update(cur, &got); in xfs_bmap_split_extent()