Lines Matching full:got
1235 struct xfs_bmbt_irec got; in xfs_bmap_first_unused() local
1253 for_each_xfs_iext(ifp, &icur, &got) { in xfs_bmap_first_unused()
1257 if (got.br_startoff >= lowest + len && in xfs_bmap_first_unused()
1258 got.br_startoff - max >= len) in xfs_bmap_first_unused()
1260 lastaddr = got.br_startoff + got.br_blockcount; in xfs_bmap_first_unused()
1282 struct xfs_bmbt_irec got; in xfs_bmap_last_before() local
1302 if (!xfs_iext_lookup_extent_before(ip, ifp, last_block, &icur, &got)) in xfs_bmap_last_before()
1416 struct xfs_bmbt_irec *new = &bma->got; in xfs_bmap_add_extent_delay_real()
3135 if (!isnullstartblock(ap->got.br_startblock)) { in xfs_bmap_adjacent()
3139 adjust = gotdiff = ap->got.br_startoff - ap->offset; in xfs_bmap_adjacent()
3144 gotbno = ap->got.br_startblock; in xfs_bmap_adjacent()
3228 * use the best as the minimum, otherwise we've got the maxlen we in xfs_bmap_select_minlen()
3347 if (xfs_bmap_extsize_align(mp, &ap->got, &ap->prev, align, 0, in xfs_bmap_compute_alignments()
3782 struct xfs_bmbt_irec *got, in xfs_bmapi_trim_map() argument
3791 got->br_startoff + got->br_blockcount <= obno) { in xfs_bmapi_trim_map()
3792 *mval = *got; in xfs_bmapi_trim_map()
3793 if (isnullstartblock(got->br_startblock)) in xfs_bmapi_trim_map()
3803 if (isnullstartblock(got->br_startblock)) in xfs_bmapi_trim_map()
3806 mval->br_startblock = got->br_startblock + in xfs_bmapi_trim_map()
3807 (*bno - got->br_startoff); in xfs_bmapi_trim_map()
3809 * Return the minimum of what we got and what we asked for for in xfs_bmapi_trim_map()
3816 got->br_blockcount - (*bno - got->br_startoff)); in xfs_bmapi_trim_map()
3817 mval->br_state = got->br_state; in xfs_bmapi_trim_map()
3891 struct xfs_bmbt_irec got; in xfs_bmapi_read() local
3919 if (!xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) in xfs_bmapi_read()
3927 got.br_startoff = end; in xfs_bmapi_read()
3928 if (got.br_startoff > bno) { in xfs_bmapi_read()
3933 XFS_FILBLKS_MIN(len, got.br_startoff - bno); in xfs_bmapi_read()
3943 xfs_bmapi_trim_map(mval, &got, &bno, len, obno, end, n, flags); in xfs_bmapi_read()
3951 if (!xfs_iext_next_extent(ifp, &icur, &got)) in xfs_bmapi_read()
3962 * On entry, got refers to the first extent beyond the offset of the extent to
3963 * allocate or eof is specified if no such extent exists. On return, got refers
3967 * during insertion into the inode fork. Thus, got does not reflect the current
3978 struct xfs_bmbt_irec *got, in xfs_bmapi_reserve_delalloc() argument
3995 alen = XFS_FILBLKS_MIN(alen, got->br_startoff - aoff); in xfs_bmapi_reserve_delalloc()
4007 error = xfs_bmap_extsize_align(mp, got, &prev, extsz, 0, eof, in xfs_bmapi_reserve_delalloc()
4040 got->br_startoff = aoff; in xfs_bmapi_reserve_delalloc()
4041 got->br_startblock = nullstartblock(indlen); in xfs_bmapi_reserve_delalloc()
4042 got->br_blockcount = alen; in xfs_bmapi_reserve_delalloc()
4043 got->br_state = XFS_EXT_NORM; in xfs_bmapi_reserve_delalloc()
4045 xfs_bmap_add_extent_hole_delay(ip, whichfork, icur, got); in xfs_bmapi_reserve_delalloc()
4121 bma->length = (xfs_extlen_t)bma->got.br_blockcount; in xfs_bmapi_allocate()
4122 bma->offset = bma->got.br_startoff; in xfs_bmapi_allocate()
4129 bma->got.br_startoff - bma->offset); in xfs_bmapi_allocate()
4167 bma->got.br_startoff = bma->offset; in xfs_bmapi_allocate()
4168 bma->got.br_startblock = bma->blkno; in xfs_bmapi_allocate()
4169 bma->got.br_blockcount = bma->length; in xfs_bmapi_allocate()
4170 bma->got.br_state = XFS_EXT_NORM; in xfs_bmapi_allocate()
4173 bma->got.br_state = XFS_EXT_UNWRITTEN; in xfs_bmapi_allocate()
4179 whichfork, &bma->icur, &bma->cur, &bma->got, in xfs_bmapi_allocate()
4191 xfs_iext_get_extent(ifp, &bma->icur, &bma->got); in xfs_bmapi_allocate()
4193 ASSERT(bma->got.br_startoff <= bma->offset); in xfs_bmapi_allocate()
4194 ASSERT(bma->got.br_startoff + bma->got.br_blockcount >= in xfs_bmapi_allocate()
4196 ASSERT(bma->got.br_state == XFS_EXT_NORM || in xfs_bmapi_allocate()
4197 bma->got.br_state == XFS_EXT_UNWRITTEN); in xfs_bmapi_allocate()
4269 xfs_iext_get_extent(ifp, &bma->icur, &bma->got); in xfs_bmapi_convert_unwritten()
4401 if (!xfs_iext_lookup_extent(ip, ifp, bno, &bma.icur, &bma.got)) in xfs_bmapi_write()
4414 if (eof || bma.got.br_startoff > bno) { in xfs_bmapi_write()
4424 } else if (isnullstartblock(bma.got.br_startblock)) { in xfs_bmapi_write()
4469 xfs_bmapi_trim_map(mval, &bma.got, &bno, len, obno, in xfs_bmapi_write()
4491 bma.prev = bma.got; in xfs_bmapi_write()
4492 if (!xfs_iext_next_extent(ifp, &bma.icur, &bma.got)) in xfs_bmapi_write()
4558 if (!xfs_iext_lookup_extent(ip, ifp, offset_fsb, &bma.icur, &bma.got) || in xfs_bmapi_convert_delalloc()
4559 bma.got.br_startoff > offset_fsb) { in xfs_bmapi_convert_delalloc()
4574 if (!isnullstartblock(bma.got.br_startblock)) { in xfs_bmapi_convert_delalloc()
4575 xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags, in xfs_bmapi_convert_delalloc()
4584 bma.offset = bma.got.br_startoff; in xfs_bmapi_convert_delalloc()
4585 bma.length = max_t(xfs_filblks_t, bma.got.br_blockcount, in xfs_bmapi_convert_delalloc()
4617 if (WARN_ON_ONCE(!xfs_valid_startblock(ip, bma.got.br_startblock))) in xfs_bmapi_convert_delalloc()
4623 ASSERT(!isnullstartblock(bma.got.br_startblock)); in xfs_bmapi_convert_delalloc()
4624 xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags, in xfs_bmapi_convert_delalloc()
4661 struct xfs_bmbt_irec got; in xfs_bmapi_remap() local
4687 if (xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) { in xfs_bmapi_remap()
4689 ASSERT(got.br_startoff > bno); in xfs_bmapi_remap()
4690 ASSERT(got.br_startoff - bno >= len); in xfs_bmapi_remap()
4701 got.br_startoff = bno; in xfs_bmapi_remap()
4702 got.br_startblock = startblock; in xfs_bmapi_remap()
4703 got.br_blockcount = len; in xfs_bmapi_remap()
4705 got.br_state = XFS_EXT_UNWRITTEN; in xfs_bmapi_remap()
4707 got.br_state = XFS_EXT_NORM; in xfs_bmapi_remap()
4710 &cur, &got, &logflags, flags); in xfs_bmapi_remap()
4819 struct xfs_bmbt_irec *got, in xfs_bmap_del_extent_delay() argument
4836 got_endoff = got->br_startoff + got->br_blockcount; in xfs_bmap_del_extent_delay()
4837 da_old = startblockval(got->br_startblock); in xfs_bmap_del_extent_delay()
4841 ASSERT(got->br_startoff <= del->br_startoff); in xfs_bmap_del_extent_delay()
4858 if (got->br_startoff == del->br_startoff) in xfs_bmap_del_extent_delay()
4875 got->br_startoff = del_endoff; in xfs_bmap_del_extent_delay()
4876 got->br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_delay()
4878 got->br_blockcount), da_old); in xfs_bmap_del_extent_delay()
4879 got->br_startblock = nullstartblock((int)da_new); in xfs_bmap_del_extent_delay()
4880 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_delay()
4886 got->br_blockcount = got->br_blockcount - del->br_blockcount; in xfs_bmap_del_extent_delay()
4888 got->br_blockcount), da_old); in xfs_bmap_del_extent_delay()
4889 got->br_startblock = nullstartblock((int)da_new); in xfs_bmap_del_extent_delay()
4890 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_delay()
4902 got->br_blockcount = del->br_startoff - got->br_startoff; in xfs_bmap_del_extent_delay()
4903 got_indlen = xfs_bmap_worst_indlen(ip, got->br_blockcount); in xfs_bmap_del_extent_delay()
4912 got->br_startblock = nullstartblock((int)got_indlen); in xfs_bmap_del_extent_delay()
4915 new.br_state = got->br_state; in xfs_bmap_del_extent_delay()
4918 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_delay()
4942 struct xfs_bmbt_irec *got, in xfs_bmap_del_extent_cow() argument
4954 got_endoff = got->br_startoff + got->br_blockcount; in xfs_bmap_del_extent_cow()
4957 ASSERT(got->br_startoff <= del->br_startoff); in xfs_bmap_del_extent_cow()
4959 ASSERT(!isnullstartblock(got->br_startblock)); in xfs_bmap_del_extent_cow()
4961 if (got->br_startoff == del->br_startoff) in xfs_bmap_del_extent_cow()
4978 got->br_startoff = del_endoff; in xfs_bmap_del_extent_cow()
4979 got->br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_cow()
4980 got->br_startblock = del->br_startblock + del->br_blockcount; in xfs_bmap_del_extent_cow()
4981 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_cow()
4987 got->br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_cow()
4988 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_cow()
4994 got->br_blockcount = del->br_startoff - got->br_startoff; in xfs_bmap_del_extent_cow()
4998 new.br_state = got->br_state; in xfs_bmap_del_extent_cow()
5001 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_cow()
5028 struct xfs_bmbt_irec got; /* current extent entry */ in xfs_bmap_del_extent_real() local
5029 xfs_fileoff_t got_endoff; /* first offset past got */ in xfs_bmap_del_extent_real()
5047 xfs_iext_get_extent(ifp, icur, &got); in xfs_bmap_del_extent_real()
5048 ASSERT(got.br_startoff <= del->br_startoff); in xfs_bmap_del_extent_real()
5050 got_endoff = got.br_startoff + got.br_blockcount; in xfs_bmap_del_extent_real()
5052 ASSERT(!isnullstartblock(got.br_startblock)); in xfs_bmap_del_extent_real()
5066 del->br_startoff > got.br_startoff && del_endoff < got_endoff) in xfs_bmap_del_extent_real()
5088 error = xfs_bmbt_lookup_eq(cur, &got, &i); in xfs_bmap_del_extent_real()
5095 if (got.br_startoff == del->br_startoff) in xfs_bmap_del_extent_real()
5123 got.br_startoff = del_endoff; in xfs_bmap_del_extent_real()
5124 got.br_startblock = del_endblock; in xfs_bmap_del_extent_real()
5125 got.br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_real()
5126 xfs_iext_update_extent(ip, state, icur, &got); in xfs_bmap_del_extent_real()
5131 error = xfs_bmbt_update(cur, &got); in xfs_bmap_del_extent_real()
5139 got.br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_real()
5140 xfs_iext_update_extent(ip, state, icur, &got); in xfs_bmap_del_extent_real()
5145 error = xfs_bmbt_update(cur, &got); in xfs_bmap_del_extent_real()
5154 old = got; in xfs_bmap_del_extent_real()
5156 got.br_blockcount = del->br_startoff - got.br_startoff; in xfs_bmap_del_extent_real()
5157 xfs_iext_update_extent(ip, state, icur, &got); in xfs_bmap_del_extent_real()
5161 new.br_state = got.br_state; in xfs_bmap_del_extent_real()
5166 error = xfs_bmbt_update(cur, &got); in xfs_bmap_del_extent_real()
5186 error = xfs_bmbt_lookup_eq(cur, &got, &i); in xfs_bmap_del_extent_real()
5270 struct xfs_bmbt_irec got; /* current extent record */ in __xfs_bunmapi() local
5310 if (!xfs_iext_lookup_extent_before(ip, ifp, &end, &icur, &got)) { in __xfs_bunmapi()
5341 if (got.br_startoff > end && in __xfs_bunmapi()
5342 !xfs_iext_prev_extent(ifp, &icur, &got)) { in __xfs_bunmapi()
5351 got.br_startoff + got.br_blockcount - 1); in __xfs_bunmapi()
5358 del = got; in __xfs_bunmapi()
5361 if (got.br_startoff < start) { in __xfs_bunmapi()
5363 del.br_blockcount -= start - got.br_startoff; in __xfs_bunmapi()
5365 del.br_startblock += start - got.br_startoff; in __xfs_bunmapi()
5391 if (end < got.br_startoff && in __xfs_bunmapi()
5392 !xfs_iext_prev_extent(ifp, &icur, &got)) { in __xfs_bunmapi()
5444 if (got.br_startoff > end && in __xfs_bunmapi()
5445 !xfs_iext_prev_extent(ifp, &icur, &got)) { in __xfs_bunmapi()
5495 &got, &del); in __xfs_bunmapi()
5512 if (!xfs_iext_get_extent(ifp, &icur, &got) || in __xfs_bunmapi()
5513 (got.br_startoff > end && in __xfs_bunmapi()
5514 !xfs_iext_prev_extent(ifp, &icur, &got))) { in __xfs_bunmapi()
5589 struct xfs_bmbt_irec *got, /* current extent to shift */ in xfs_bmse_can_merge() argument
5594 startoff = got->br_startoff - shift; in xfs_bmse_can_merge()
5601 (left->br_startblock + left->br_blockcount != got->br_startblock) || in xfs_bmse_can_merge()
5602 (left->br_state != got->br_state) || in xfs_bmse_can_merge()
5603 (left->br_blockcount + got->br_blockcount > XFS_MAX_BMBT_EXTLEN)) in xfs_bmse_can_merge()
5625 struct xfs_bmbt_irec *got, /* extent to shift */ in xfs_bmse_merge() argument
5636 blockcount = left->br_blockcount + got->br_blockcount; in xfs_bmse_merge()
5640 ASSERT(xfs_bmse_can_merge(left, got, shift)); in xfs_bmse_merge()
5657 error = xfs_bmbt_lookup_eq(cur, got, &i); in xfs_bmse_merge()
5692 xfs_rmap_unmap_extent(tp, ip, whichfork, got); in xfs_bmse_merge()
5693 memcpy(&new, got, sizeof(new)); in xfs_bmse_merge()
5705 struct xfs_bmbt_irec *got, in xfs_bmap_shift_update_extent() argument
5711 struct xfs_bmbt_irec prev = *got; in xfs_bmap_shift_update_extent()
5716 got->br_startoff = startoff; in xfs_bmap_shift_update_extent()
5725 error = xfs_bmbt_update(cur, got); in xfs_bmap_shift_update_extent()
5733 got); in xfs_bmap_shift_update_extent()
5737 xfs_rmap_map_extent(tp, ip, whichfork, got); in xfs_bmap_shift_update_extent()
5753 struct xfs_bmbt_irec got, prev; in xfs_bmap_collapse_extents() local
5778 if (!xfs_iext_lookup_extent(ip, ifp, *next_fsb, &icur, &got)) { in xfs_bmap_collapse_extents()
5782 if (XFS_IS_CORRUPT(mp, isnullstartblock(got.br_startblock))) { in xfs_bmap_collapse_extents()
5787 new_startoff = got.br_startoff - offset_shift_fsb; in xfs_bmap_collapse_extents()
5794 if (xfs_bmse_can_merge(&prev, &got, offset_shift_fsb)) { in xfs_bmap_collapse_extents()
5796 offset_shift_fsb, &icur, &got, &prev, in xfs_bmap_collapse_extents()
5803 if (got.br_startoff < offset_shift_fsb) { in xfs_bmap_collapse_extents()
5809 error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got, in xfs_bmap_collapse_extents()
5815 if (!xfs_iext_next_extent(ifp, &icur, &got)) { in xfs_bmap_collapse_extents()
5820 *next_fsb = got.br_startoff; in xfs_bmap_collapse_extents()
5836 struct xfs_bmbt_irec got; in xfs_bmap_can_insert_extents() local
5846 error = xfs_bmap_last_extent(NULL, ip, XFS_DATA_FORK, &got, &is_empty); in xfs_bmap_can_insert_extents()
5847 if (!error && !is_empty && got.br_startoff >= off && in xfs_bmap_can_insert_extents()
5848 ((got.br_startoff + shift) & BMBT_STARTOFF_MASK) < got.br_startoff) in xfs_bmap_can_insert_extents()
5868 struct xfs_bmbt_irec got, next; in xfs_bmap_insert_extents() local
5895 if (!xfs_iext_get_extent(ifp, &icur, &got) || in xfs_bmap_insert_extents()
5896 stop_fsb > got.br_startoff) { in xfs_bmap_insert_extents()
5901 if (!xfs_iext_lookup_extent(ip, ifp, *next_fsb, &icur, &got)) { in xfs_bmap_insert_extents()
5906 if (XFS_IS_CORRUPT(mp, isnullstartblock(got.br_startblock))) { in xfs_bmap_insert_extents()
5911 if (XFS_IS_CORRUPT(mp, stop_fsb > got.br_startoff)) { in xfs_bmap_insert_extents()
5916 new_startoff = got.br_startoff + offset_shift_fsb; in xfs_bmap_insert_extents()
5918 if (new_startoff + got.br_blockcount > next.br_startoff) { in xfs_bmap_insert_extents()
5929 if (xfs_bmse_can_merge(&got, &next, offset_shift_fsb)) in xfs_bmap_insert_extents()
5933 error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got, in xfs_bmap_insert_extents()
5938 if (!xfs_iext_prev_extent(ifp, &icur, &got) || in xfs_bmap_insert_extents()
5939 stop_fsb >= got.br_startoff + got.br_blockcount) { in xfs_bmap_insert_extents()
5944 *next_fsb = got.br_startoff; in xfs_bmap_insert_extents()
5968 struct xfs_bmbt_irec got; in xfs_bmap_split_extent() local
5971 xfs_fsblock_t gotblkcnt; /* new block count for got */ in xfs_bmap_split_extent()
5993 if (!xfs_iext_lookup_extent(ip, ifp, split_fsb, &icur, &got) || in xfs_bmap_split_extent()
5994 got.br_startoff >= split_fsb) in xfs_bmap_split_extent()
5997 gotblkcnt = split_fsb - got.br_startoff; in xfs_bmap_split_extent()
5999 new.br_startblock = got.br_startblock + gotblkcnt; in xfs_bmap_split_extent()
6000 new.br_blockcount = got.br_blockcount - gotblkcnt; in xfs_bmap_split_extent()
6001 new.br_state = got.br_state; in xfs_bmap_split_extent()
6006 error = xfs_bmbt_lookup_eq(cur, &got, &i); in xfs_bmap_split_extent()
6015 got.br_blockcount = gotblkcnt; in xfs_bmap_split_extent()
6017 &got); in xfs_bmap_split_extent()
6021 error = xfs_bmbt_update(cur, &got); in xfs_bmap_split_extent()