Lines Matching full:got
1252 struct xfs_bmbt_irec got; in xfs_bmap_first_unused() local
1270 for_each_xfs_iext(ifp, &icur, &got) { in xfs_bmap_first_unused()
1274 if (got.br_startoff >= lowest + len && in xfs_bmap_first_unused()
1275 got.br_startoff - max >= len) in xfs_bmap_first_unused()
1277 lastaddr = got.br_startoff + got.br_blockcount; in xfs_bmap_first_unused()
1299 struct xfs_bmbt_irec got; in xfs_bmap_last_before() local
1320 if (!xfs_iext_lookup_extent_before(ip, ifp, last_block, &icur, &got)) in xfs_bmap_last_before()
1436 struct xfs_bmbt_irec *new = &bma->got; in xfs_bmap_add_extent_delay_real()
3212 if (!isnullstartblock(ap->got.br_startblock)) { in xfs_bmap_adjacent()
3216 adjust = gotdiff = ap->got.br_startoff - ap->offset; in xfs_bmap_adjacent()
3221 gotbno = ap->got.br_startblock; in xfs_bmap_adjacent()
3307 * use the best as the minimum, otherwise we've got the maxlen we in xfs_bmap_select_minlen()
3426 if (xfs_bmap_extsize_align(mp, &ap->got, &ap->prev, align, 0, in xfs_bmap_compute_alignments()
3829 struct xfs_bmbt_irec *got, in xfs_bmapi_trim_map() argument
3838 got->br_startoff + got->br_blockcount <= obno) { in xfs_bmapi_trim_map()
3839 *mval = *got; in xfs_bmapi_trim_map()
3840 if (isnullstartblock(got->br_startblock)) in xfs_bmapi_trim_map()
3850 if (isnullstartblock(got->br_startblock)) in xfs_bmapi_trim_map()
3853 mval->br_startblock = got->br_startblock + in xfs_bmapi_trim_map()
3854 (*bno - got->br_startoff); in xfs_bmapi_trim_map()
3856 * Return the minimum of what we got and what we asked for for in xfs_bmapi_trim_map()
3863 got->br_blockcount - (*bno - got->br_startoff)); in xfs_bmapi_trim_map()
3864 mval->br_state = got->br_state; in xfs_bmapi_trim_map()
3938 struct xfs_bmbt_irec got; in xfs_bmapi_read() local
3970 if (!xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) in xfs_bmapi_read()
3978 got.br_startoff = end; in xfs_bmapi_read()
3979 if (got.br_startoff > bno) { in xfs_bmapi_read()
3984 XFS_FILBLKS_MIN(len, got.br_startoff - bno); in xfs_bmapi_read()
3994 xfs_bmapi_trim_map(mval, &got, &bno, len, obno, end, n, flags); in xfs_bmapi_read()
4002 if (!xfs_iext_next_extent(ifp, &icur, &got)) in xfs_bmapi_read()
4013 * On entry, got refers to the first extent beyond the offset of the extent to
4014 * allocate or eof is specified if no such extent exists. On return, got refers
4018 * during insertion into the inode fork. Thus, got does not reflect the current
4029 struct xfs_bmbt_irec *got, in xfs_bmapi_reserve_delalloc() argument
4051 alen = XFS_FILBLKS_MIN(alen, got->br_startoff - aoff); in xfs_bmapi_reserve_delalloc()
4071 error = xfs_bmap_extsize_align(mp, got, &prev, extsz, 0, eof, in xfs_bmapi_reserve_delalloc()
4108 got->br_startoff = aoff; in xfs_bmapi_reserve_delalloc()
4109 got->br_startblock = nullstartblock(indlen); in xfs_bmapi_reserve_delalloc()
4110 got->br_blockcount = alen; in xfs_bmapi_reserve_delalloc()
4111 got->br_state = XFS_EXT_NORM; in xfs_bmapi_reserve_delalloc()
4113 xfs_bmap_add_extent_hole_delay(ip, whichfork, icur, got); in xfs_bmapi_reserve_delalloc()
4217 bma->got.br_startoff = bma->offset; in xfs_bmapi_allocate()
4218 bma->got.br_startblock = bma->blkno; in xfs_bmapi_allocate()
4219 bma->got.br_blockcount = bma->length; in xfs_bmapi_allocate()
4220 bma->got.br_state = XFS_EXT_NORM; in xfs_bmapi_allocate()
4223 bma->got.br_state = XFS_EXT_UNWRITTEN; in xfs_bmapi_allocate()
4229 whichfork, &bma->icur, &bma->cur, &bma->got, in xfs_bmapi_allocate()
4239 xfs_iext_get_extent(ifp, &bma->icur, &bma->got); in xfs_bmapi_allocate()
4241 ASSERT(bma->got.br_startoff <= bma->offset); in xfs_bmapi_allocate()
4242 ASSERT(bma->got.br_startoff + bma->got.br_blockcount >= in xfs_bmapi_allocate()
4244 ASSERT(bma->got.br_state == XFS_EXT_NORM || in xfs_bmapi_allocate()
4245 bma->got.br_state == XFS_EXT_UNWRITTEN); in xfs_bmapi_allocate()
4317 xfs_iext_get_extent(ifp, &bma->icur, &bma->got); in xfs_bmapi_convert_unwritten()
4459 if (!xfs_iext_lookup_extent(ip, ifp, bno, &bma.icur, &bma.got)) in xfs_bmapi_write()
4472 if (eof || bma.got.br_startoff > bno) { in xfs_bmapi_write()
4482 } else if (isnullstartblock(bma.got.br_startblock)) { in xfs_bmapi_write()
4509 bma.got.br_blockcount - in xfs_bmapi_write()
4510 (bno - bma.got.br_startoff)); in xfs_bmapi_write()
4514 bma.got.br_startoff - bno); in xfs_bmapi_write()
4540 xfs_bmapi_trim_map(mval, &bma.got, &bno, len, obno, in xfs_bmapi_write()
4562 bma.prev = bma.got; in xfs_bmapi_write()
4563 if (!xfs_iext_next_extent(ifp, &bma.icur, &bma.got)) in xfs_bmapi_write()
4640 if (!xfs_iext_lookup_extent(ip, ifp, offset_fsb, &bma.icur, &bma.got) || in xfs_bmapi_convert_one_delalloc()
4641 bma.got.br_startoff > offset_fsb) { in xfs_bmapi_convert_one_delalloc()
4656 if (!isnullstartblock(bma.got.br_startblock)) { in xfs_bmapi_convert_one_delalloc()
4657 xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags, in xfs_bmapi_convert_one_delalloc()
4674 bma.offset = bma.got.br_startoff; in xfs_bmapi_convert_one_delalloc()
4675 bma.length = bma.got.br_blockcount; in xfs_bmapi_convert_one_delalloc()
4704 ASSERT(!isnullstartblock(bma.got.br_startblock)); in xfs_bmapi_convert_one_delalloc()
4705 xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags, in xfs_bmapi_convert_one_delalloc()
4773 struct xfs_bmbt_irec got; in xfs_bmapi_remap() local
4800 if (xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) { in xfs_bmapi_remap()
4802 ASSERT(got.br_startoff > bno); in xfs_bmapi_remap()
4803 ASSERT(got.br_startoff - bno >= len); in xfs_bmapi_remap()
4813 got.br_startoff = bno; in xfs_bmapi_remap()
4814 got.br_startblock = startblock; in xfs_bmapi_remap()
4815 got.br_blockcount = len; in xfs_bmapi_remap()
4817 got.br_state = XFS_EXT_UNWRITTEN; in xfs_bmapi_remap()
4819 got.br_state = XFS_EXT_NORM; in xfs_bmapi_remap()
4822 &cur, &got, &logflags, flags); in xfs_bmapi_remap()
4915 struct xfs_bmbt_irec *got, in xfs_bmap_del_extent_delay() argument
4932 got_endoff = got->br_startoff + got->br_blockcount; in xfs_bmap_del_extent_delay()
4933 da_old = startblockval(got->br_startblock); in xfs_bmap_del_extent_delay()
4937 ASSERT(got->br_startoff <= del->br_startoff); in xfs_bmap_del_extent_delay()
4948 if (got->br_startoff == del->br_startoff) in xfs_bmap_del_extent_delay()
4965 got->br_startoff = del_endoff; in xfs_bmap_del_extent_delay()
4966 got->br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_delay()
4968 got->br_blockcount), da_old); in xfs_bmap_del_extent_delay()
4969 got->br_startblock = nullstartblock((int)da_new); in xfs_bmap_del_extent_delay()
4970 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_delay()
4976 got->br_blockcount = got->br_blockcount - del->br_blockcount; in xfs_bmap_del_extent_delay()
4978 got->br_blockcount), da_old); in xfs_bmap_del_extent_delay()
4979 got->br_startblock = nullstartblock((int)da_new); in xfs_bmap_del_extent_delay()
4980 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_delay()
4992 got->br_blockcount = del->br_startoff - got->br_startoff; in xfs_bmap_del_extent_delay()
4993 got_indlen = xfs_bmap_worst_indlen(ip, got->br_blockcount); in xfs_bmap_del_extent_delay()
5018 got->br_startblock = nullstartblock((int)got_indlen); in xfs_bmap_del_extent_delay()
5021 new.br_state = got->br_state; in xfs_bmap_del_extent_delay()
5024 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_delay()
5049 struct xfs_bmbt_irec *got, in xfs_bmap_del_extent_cow() argument
5061 got_endoff = got->br_startoff + got->br_blockcount; in xfs_bmap_del_extent_cow()
5064 ASSERT(got->br_startoff <= del->br_startoff); in xfs_bmap_del_extent_cow()
5066 ASSERT(!isnullstartblock(got->br_startblock)); in xfs_bmap_del_extent_cow()
5068 if (got->br_startoff == del->br_startoff) in xfs_bmap_del_extent_cow()
5085 got->br_startoff = del_endoff; in xfs_bmap_del_extent_cow()
5086 got->br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_cow()
5087 got->br_startblock = del->br_startblock + del->br_blockcount; in xfs_bmap_del_extent_cow()
5088 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_cow()
5094 got->br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_cow()
5095 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_cow()
5101 got->br_blockcount = del->br_startoff - got->br_startoff; in xfs_bmap_del_extent_cow()
5105 new.br_state = got->br_state; in xfs_bmap_del_extent_cow()
5108 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_cow()
5134 struct xfs_bmbt_irec got; /* current extent entry */ in xfs_bmap_del_extent_real() local
5135 xfs_fileoff_t got_endoff; /* first offset past got */ in xfs_bmap_del_extent_real()
5153 xfs_iext_get_extent(ifp, icur, &got); in xfs_bmap_del_extent_real()
5154 ASSERT(got.br_startoff <= del->br_startoff); in xfs_bmap_del_extent_real()
5156 got_endoff = got.br_startoff + got.br_blockcount; in xfs_bmap_del_extent_real()
5158 ASSERT(!isnullstartblock(got.br_startblock)); in xfs_bmap_del_extent_real()
5172 del->br_startoff > got.br_startoff && del_endoff < got_endoff) in xfs_bmap_del_extent_real()
5184 error = xfs_bmbt_lookup_eq(cur, &got, &i); in xfs_bmap_del_extent_real()
5193 if (got.br_startoff == del->br_startoff) in xfs_bmap_del_extent_real()
5223 got.br_startoff = del_endoff; in xfs_bmap_del_extent_real()
5224 got.br_startblock = del_endblock; in xfs_bmap_del_extent_real()
5225 got.br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_real()
5226 xfs_iext_update_extent(ip, state, icur, &got); in xfs_bmap_del_extent_real()
5231 error = xfs_bmbt_update(cur, &got); in xfs_bmap_del_extent_real()
5239 got.br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_real()
5240 xfs_iext_update_extent(ip, state, icur, &got); in xfs_bmap_del_extent_real()
5245 error = xfs_bmbt_update(cur, &got); in xfs_bmap_del_extent_real()
5254 old = got; in xfs_bmap_del_extent_real()
5256 got.br_blockcount = del->br_startoff - got.br_startoff; in xfs_bmap_del_extent_real()
5257 xfs_iext_update_extent(ip, state, icur, &got); in xfs_bmap_del_extent_real()
5261 new.br_state = got.br_state; in xfs_bmap_del_extent_real()
5266 error = xfs_bmbt_update(cur, &got); in xfs_bmap_del_extent_real()
5286 error = xfs_bmbt_lookup_eq(cur, &got, &i); in xfs_bmap_del_extent_real()
5390 struct xfs_bmbt_irec got; /* current extent record */ in __xfs_bunmapi() local
5432 if (!xfs_iext_lookup_extent_before(ip, ifp, &end, &icur, &got)) { in __xfs_bunmapi()
5452 if (got.br_startoff > end && in __xfs_bunmapi()
5453 !xfs_iext_prev_extent(ifp, &icur, &got)) { in __xfs_bunmapi()
5462 got.br_startoff + got.br_blockcount - 1); in __xfs_bunmapi()
5469 del = got; in __xfs_bunmapi()
5472 if (got.br_startoff < start) { in __xfs_bunmapi()
5474 del.br_blockcount -= start - got.br_startoff; in __xfs_bunmapi()
5476 del.br_startblock += start - got.br_startoff; in __xfs_bunmapi()
5502 if (end < got.br_startoff && in __xfs_bunmapi()
5503 !xfs_iext_prev_extent(ifp, &icur, &got)) { in __xfs_bunmapi()
5555 if (got.br_startoff > end && in __xfs_bunmapi()
5556 !xfs_iext_prev_extent(ifp, &icur, &got)) { in __xfs_bunmapi()
5605 xfs_bmap_del_extent_delay(ip, whichfork, &icur, &got, &del); in __xfs_bunmapi()
5621 if (!xfs_iext_get_extent(ifp, &icur, &got) || in __xfs_bunmapi()
5622 (got.br_startoff > end && in __xfs_bunmapi()
5623 !xfs_iext_prev_extent(ifp, &icur, &got))) { in __xfs_bunmapi()
5698 struct xfs_bmbt_irec *got, /* current extent to shift */ in xfs_bmse_can_merge() argument
5703 startoff = got->br_startoff - shift; in xfs_bmse_can_merge()
5710 (left->br_startblock + left->br_blockcount != got->br_startblock) || in xfs_bmse_can_merge()
5711 (left->br_state != got->br_state) || in xfs_bmse_can_merge()
5712 (left->br_blockcount + got->br_blockcount > XFS_MAX_BMBT_EXTLEN)) in xfs_bmse_can_merge()
5734 struct xfs_bmbt_irec *got, /* extent to shift */ in xfs_bmse_merge() argument
5745 blockcount = left->br_blockcount + got->br_blockcount; in xfs_bmse_merge()
5748 ASSERT(xfs_bmse_can_merge(left, got, shift)); in xfs_bmse_merge()
5765 error = xfs_bmbt_lookup_eq(cur, got, &i); in xfs_bmse_merge()
5806 xfs_rmap_unmap_extent(tp, ip, whichfork, got); in xfs_bmse_merge()
5807 memcpy(&new, got, sizeof(new)); in xfs_bmse_merge()
5819 struct xfs_bmbt_irec *got, in xfs_bmap_shift_update_extent() argument
5825 struct xfs_bmbt_irec prev = *got; in xfs_bmap_shift_update_extent()
5830 got->br_startoff = startoff; in xfs_bmap_shift_update_extent()
5841 error = xfs_bmbt_update(cur, got); in xfs_bmap_shift_update_extent()
5849 got); in xfs_bmap_shift_update_extent()
5853 xfs_rmap_map_extent(tp, ip, whichfork, got); in xfs_bmap_shift_update_extent()
5869 struct xfs_bmbt_irec got, prev; in xfs_bmap_collapse_extents() local
5893 if (!xfs_iext_lookup_extent(ip, ifp, *next_fsb, &icur, &got)) { in xfs_bmap_collapse_extents()
5897 if (XFS_IS_CORRUPT(mp, isnullstartblock(got.br_startblock))) { in xfs_bmap_collapse_extents()
5903 new_startoff = got.br_startoff - offset_shift_fsb; in xfs_bmap_collapse_extents()
5910 if (xfs_bmse_can_merge(&prev, &got, offset_shift_fsb)) { in xfs_bmap_collapse_extents()
5912 offset_shift_fsb, &icur, &got, &prev, in xfs_bmap_collapse_extents()
5919 if (got.br_startoff < offset_shift_fsb) { in xfs_bmap_collapse_extents()
5925 error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got, in xfs_bmap_collapse_extents()
5931 if (!xfs_iext_next_extent(ifp, &icur, &got)) { in xfs_bmap_collapse_extents()
5936 *next_fsb = got.br_startoff; in xfs_bmap_collapse_extents()
5952 struct xfs_bmbt_irec got; in xfs_bmap_can_insert_extents() local
5962 error = xfs_bmap_last_extent(NULL, ip, XFS_DATA_FORK, &got, &is_empty); in xfs_bmap_can_insert_extents()
5963 if (!error && !is_empty && got.br_startoff >= off && in xfs_bmap_can_insert_extents()
5964 ((got.br_startoff + shift) & BMBT_STARTOFF_MASK) < got.br_startoff) in xfs_bmap_can_insert_extents()
5984 struct xfs_bmbt_irec got, next; in xfs_bmap_insert_extents() local
6010 if (!xfs_iext_get_extent(ifp, &icur, &got) || in xfs_bmap_insert_extents()
6011 stop_fsb > got.br_startoff) { in xfs_bmap_insert_extents()
6016 if (!xfs_iext_lookup_extent(ip, ifp, *next_fsb, &icur, &got)) { in xfs_bmap_insert_extents()
6021 if (XFS_IS_CORRUPT(mp, isnullstartblock(got.br_startblock))) { in xfs_bmap_insert_extents()
6027 if (XFS_IS_CORRUPT(mp, stop_fsb > got.br_startoff)) { in xfs_bmap_insert_extents()
6033 new_startoff = got.br_startoff + offset_shift_fsb; in xfs_bmap_insert_extents()
6035 if (new_startoff + got.br_blockcount > next.br_startoff) { in xfs_bmap_insert_extents()
6046 if (xfs_bmse_can_merge(&got, &next, offset_shift_fsb)) in xfs_bmap_insert_extents()
6050 error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got, in xfs_bmap_insert_extents()
6055 if (!xfs_iext_prev_extent(ifp, &icur, &got) || in xfs_bmap_insert_extents()
6056 stop_fsb >= got.br_startoff + got.br_blockcount) { in xfs_bmap_insert_extents()
6061 *next_fsb = got.br_startoff; in xfs_bmap_insert_extents()
6085 struct xfs_bmbt_irec got; in xfs_bmap_split_extent() local
6088 xfs_fsblock_t gotblkcnt; /* new block count for got */ in xfs_bmap_split_extent()
6111 if (!xfs_iext_lookup_extent(ip, ifp, split_fsb, &icur, &got) || in xfs_bmap_split_extent()
6112 got.br_startoff >= split_fsb) in xfs_bmap_split_extent()
6115 gotblkcnt = split_fsb - got.br_startoff; in xfs_bmap_split_extent()
6117 new.br_startblock = got.br_startblock + gotblkcnt; in xfs_bmap_split_extent()
6118 new.br_blockcount = got.br_blockcount - gotblkcnt; in xfs_bmap_split_extent()
6119 new.br_state = got.br_state; in xfs_bmap_split_extent()
6123 error = xfs_bmbt_lookup_eq(cur, &got, &i); in xfs_bmap_split_extent()
6133 got.br_blockcount = gotblkcnt; in xfs_bmap_split_extent()
6135 &got); in xfs_bmap_split_extent()
6139 error = xfs_bmbt_update(cur, &got); in xfs_bmap_split_extent()