• Home
  • Raw
  • Download

Lines Matching refs:got

1211 	struct xfs_bmbt_irec	got;  in xfs_bmap_first_unused()  local
1229 for_each_xfs_iext(ifp, &icur, &got) { in xfs_bmap_first_unused()
1233 if (got.br_startoff >= lowest + len && in xfs_bmap_first_unused()
1234 got.br_startoff - max >= len) in xfs_bmap_first_unused()
1236 lastaddr = got.br_startoff + got.br_blockcount; in xfs_bmap_first_unused()
1258 struct xfs_bmbt_irec got; in xfs_bmap_last_before() local
1278 if (!xfs_iext_lookup_extent_before(ip, ifp, last_block, &icur, &got)) in xfs_bmap_last_before()
1392 struct xfs_bmbt_irec *new = &bma->got; in xfs_bmap_add_extent_delay_real()
3121 if (!isnullstartblock(ap->got.br_startblock)) { in xfs_bmap_adjacent()
3125 adjust = gotdiff = ap->got.br_startoff - ap->offset; in xfs_bmap_adjacent()
3130 gotbno = ap->got.br_startblock; in xfs_bmap_adjacent()
3383 if (xfs_bmap_extsize_align(mp, &ap->got, &ap->prev, align, 0, in xfs_bmap_compute_alignments()
3761 struct xfs_bmbt_irec *got, in xfs_bmapi_trim_map() argument
3770 got->br_startoff + got->br_blockcount <= obno) { in xfs_bmapi_trim_map()
3771 *mval = *got; in xfs_bmapi_trim_map()
3772 if (isnullstartblock(got->br_startblock)) in xfs_bmapi_trim_map()
3782 if (isnullstartblock(got->br_startblock)) in xfs_bmapi_trim_map()
3785 mval->br_startblock = got->br_startblock + in xfs_bmapi_trim_map()
3786 (*bno - got->br_startoff); in xfs_bmapi_trim_map()
3795 got->br_blockcount - (*bno - got->br_startoff)); in xfs_bmapi_trim_map()
3796 mval->br_state = got->br_state; in xfs_bmapi_trim_map()
3870 struct xfs_bmbt_irec got; in xfs_bmapi_read() local
3898 if (!xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) in xfs_bmapi_read()
3906 got.br_startoff = end; in xfs_bmapi_read()
3907 if (got.br_startoff > bno) { in xfs_bmapi_read()
3912 XFS_FILBLKS_MIN(len, got.br_startoff - bno); in xfs_bmapi_read()
3922 xfs_bmapi_trim_map(mval, &got, &bno, len, obno, end, n, flags); in xfs_bmapi_read()
3930 if (!xfs_iext_next_extent(ifp, &icur, &got)) in xfs_bmapi_read()
3957 struct xfs_bmbt_irec *got, in xfs_bmapi_reserve_delalloc() argument
3974 alen = XFS_FILBLKS_MIN(alen, got->br_startoff - aoff); in xfs_bmapi_reserve_delalloc()
3986 error = xfs_bmap_extsize_align(mp, got, &prev, extsz, 0, eof, in xfs_bmapi_reserve_delalloc()
4019 got->br_startoff = aoff; in xfs_bmapi_reserve_delalloc()
4020 got->br_startblock = nullstartblock(indlen); in xfs_bmapi_reserve_delalloc()
4021 got->br_blockcount = alen; in xfs_bmapi_reserve_delalloc()
4022 got->br_state = XFS_EXT_NORM; in xfs_bmapi_reserve_delalloc()
4024 xfs_bmap_add_extent_hole_delay(ip, whichfork, icur, got); in xfs_bmapi_reserve_delalloc()
4100 bma->length = (xfs_extlen_t)bma->got.br_blockcount; in xfs_bmapi_allocate()
4101 bma->offset = bma->got.br_startoff; in xfs_bmapi_allocate()
4108 bma->got.br_startoff - bma->offset); in xfs_bmapi_allocate()
4146 bma->got.br_startoff = bma->offset; in xfs_bmapi_allocate()
4147 bma->got.br_startblock = bma->blkno; in xfs_bmapi_allocate()
4148 bma->got.br_blockcount = bma->length; in xfs_bmapi_allocate()
4149 bma->got.br_state = XFS_EXT_NORM; in xfs_bmapi_allocate()
4152 bma->got.br_state = XFS_EXT_UNWRITTEN; in xfs_bmapi_allocate()
4158 whichfork, &bma->icur, &bma->cur, &bma->got, in xfs_bmapi_allocate()
4170 xfs_iext_get_extent(ifp, &bma->icur, &bma->got); in xfs_bmapi_allocate()
4172 ASSERT(bma->got.br_startoff <= bma->offset); in xfs_bmapi_allocate()
4173 ASSERT(bma->got.br_startoff + bma->got.br_blockcount >= in xfs_bmapi_allocate()
4175 ASSERT(bma->got.br_state == XFS_EXT_NORM || in xfs_bmapi_allocate()
4176 bma->got.br_state == XFS_EXT_UNWRITTEN); in xfs_bmapi_allocate()
4248 xfs_iext_get_extent(ifp, &bma->icur, &bma->got); in xfs_bmapi_convert_unwritten()
4380 if (!xfs_iext_lookup_extent(ip, ifp, bno, &bma.icur, &bma.got)) in xfs_bmapi_write()
4393 if (eof || bma.got.br_startoff > bno) { in xfs_bmapi_write()
4403 } else if (isnullstartblock(bma.got.br_startblock)) { in xfs_bmapi_write()
4448 xfs_bmapi_trim_map(mval, &bma.got, &bno, len, obno, in xfs_bmapi_write()
4470 bma.prev = bma.got; in xfs_bmapi_write()
4471 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, 0, 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, in xfs_bmapi_convert_delalloc()
4595 if (WARN_ON_ONCE(!xfs_valid_startblock(ip, bma.got.br_startblock))) in xfs_bmapi_convert_delalloc()
4601 ASSERT(!isnullstartblock(bma.got.br_startblock)); in xfs_bmapi_convert_delalloc()
4602 xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags); in xfs_bmapi_convert_delalloc()
4638 struct xfs_bmbt_irec got; in xfs_bmapi_remap() local
4664 if (xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) { in xfs_bmapi_remap()
4666 ASSERT(got.br_startoff > bno); in xfs_bmapi_remap()
4667 ASSERT(got.br_startoff - bno >= len); in xfs_bmapi_remap()
4678 got.br_startoff = bno; in xfs_bmapi_remap()
4679 got.br_startblock = startblock; in xfs_bmapi_remap()
4680 got.br_blockcount = len; in xfs_bmapi_remap()
4682 got.br_state = XFS_EXT_UNWRITTEN; in xfs_bmapi_remap()
4684 got.br_state = XFS_EXT_NORM; in xfs_bmapi_remap()
4687 &cur, &got, &logflags, flags); in xfs_bmapi_remap()
4796 struct xfs_bmbt_irec *got, in xfs_bmap_del_extent_delay() argument
4813 got_endoff = got->br_startoff + got->br_blockcount; in xfs_bmap_del_extent_delay()
4814 da_old = startblockval(got->br_startblock); in xfs_bmap_del_extent_delay()
4818 ASSERT(got->br_startoff <= del->br_startoff); in xfs_bmap_del_extent_delay()
4839 if (got->br_startoff == del->br_startoff) in xfs_bmap_del_extent_delay()
4856 got->br_startoff = del_endoff; in xfs_bmap_del_extent_delay()
4857 got->br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_delay()
4859 got->br_blockcount), da_old); in xfs_bmap_del_extent_delay()
4860 got->br_startblock = nullstartblock((int)da_new); in xfs_bmap_del_extent_delay()
4861 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_delay()
4867 got->br_blockcount = got->br_blockcount - del->br_blockcount; in xfs_bmap_del_extent_delay()
4869 got->br_blockcount), da_old); in xfs_bmap_del_extent_delay()
4870 got->br_startblock = nullstartblock((int)da_new); in xfs_bmap_del_extent_delay()
4871 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_delay()
4883 got->br_blockcount = del->br_startoff - got->br_startoff; in xfs_bmap_del_extent_delay()
4884 got_indlen = xfs_bmap_worst_indlen(ip, got->br_blockcount); in xfs_bmap_del_extent_delay()
4893 got->br_startblock = nullstartblock((int)got_indlen); in xfs_bmap_del_extent_delay()
4896 new.br_state = got->br_state; in xfs_bmap_del_extent_delay()
4899 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_delay()
4923 struct xfs_bmbt_irec *got, in xfs_bmap_del_extent_cow() argument
4935 got_endoff = got->br_startoff + got->br_blockcount; in xfs_bmap_del_extent_cow()
4938 ASSERT(got->br_startoff <= del->br_startoff); in xfs_bmap_del_extent_cow()
4940 ASSERT(!isnullstartblock(got->br_startblock)); in xfs_bmap_del_extent_cow()
4942 if (got->br_startoff == del->br_startoff) in xfs_bmap_del_extent_cow()
4959 got->br_startoff = del_endoff; in xfs_bmap_del_extent_cow()
4960 got->br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_cow()
4961 got->br_startblock = del->br_startblock + del->br_blockcount; in xfs_bmap_del_extent_cow()
4962 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_cow()
4968 got->br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_cow()
4969 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_cow()
4975 got->br_blockcount = del->br_startoff - got->br_startoff; in xfs_bmap_del_extent_cow()
4979 new.br_state = got->br_state; in xfs_bmap_del_extent_cow()
4982 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_cow()
5010 struct xfs_bmbt_irec got; /* current extent entry */ in xfs_bmap_del_extent_real() local
5027 xfs_iext_get_extent(ifp, icur, &got); in xfs_bmap_del_extent_real()
5028 ASSERT(got.br_startoff <= del->br_startoff); in xfs_bmap_del_extent_real()
5030 got_endoff = got.br_startoff + got.br_blockcount; in xfs_bmap_del_extent_real()
5032 ASSERT(!isnullstartblock(got.br_startblock)); in xfs_bmap_del_extent_real()
5047 del->br_startoff > got.br_startoff && del_endoff < got_endoff) in xfs_bmap_del_extent_real()
5082 error = xfs_bmbt_lookup_eq(cur, &got, &i); in xfs_bmap_del_extent_real()
5091 if (got.br_startoff == del->br_startoff) in xfs_bmap_del_extent_real()
5121 got.br_startoff = del_endoff; in xfs_bmap_del_extent_real()
5122 got.br_startblock = del_endblock; in xfs_bmap_del_extent_real()
5123 got.br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_real()
5124 xfs_iext_update_extent(ip, state, icur, &got); in xfs_bmap_del_extent_real()
5129 error = xfs_bmbt_update(cur, &got); in xfs_bmap_del_extent_real()
5137 got.br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_real()
5138 xfs_iext_update_extent(ip, state, icur, &got); in xfs_bmap_del_extent_real()
5143 error = xfs_bmbt_update(cur, &got); in xfs_bmap_del_extent_real()
5152 old = got; in xfs_bmap_del_extent_real()
5154 got.br_blockcount = del->br_startoff - got.br_startoff; in xfs_bmap_del_extent_real()
5155 xfs_iext_update_extent(ip, state, icur, &got); in xfs_bmap_del_extent_real()
5159 new.br_state = got.br_state; in xfs_bmap_del_extent_real()
5164 error = xfs_bmbt_update(cur, &got); in xfs_bmap_del_extent_real()
5184 error = xfs_bmbt_lookup_eq(cur, &got, &i); in xfs_bmap_del_extent_real()
5272 struct xfs_bmbt_irec got; /* current extent record */ in __xfs_bunmapi() local
5313 if (!xfs_iext_lookup_extent_before(ip, ifp, &end, &icur, &got)) { in __xfs_bunmapi()
5344 if (got.br_startoff > end && in __xfs_bunmapi()
5345 !xfs_iext_prev_extent(ifp, &icur, &got)) { in __xfs_bunmapi()
5354 got.br_startoff + got.br_blockcount - 1); in __xfs_bunmapi()
5361 del = got; in __xfs_bunmapi()
5364 if (got.br_startoff < start) { in __xfs_bunmapi()
5366 del.br_blockcount -= start - got.br_startoff; in __xfs_bunmapi()
5368 del.br_startblock += start - got.br_startoff; in __xfs_bunmapi()
5394 if (end < got.br_startoff && in __xfs_bunmapi()
5395 !xfs_iext_prev_extent(ifp, &icur, &got)) { in __xfs_bunmapi()
5446 if (got.br_startoff > end && in __xfs_bunmapi()
5447 !xfs_iext_prev_extent(ifp, &icur, &got)) { in __xfs_bunmapi()
5497 &got, &del); in __xfs_bunmapi()
5514 if (!xfs_iext_get_extent(ifp, &icur, &got) || in __xfs_bunmapi()
5515 (got.br_startoff > end && in __xfs_bunmapi()
5516 !xfs_iext_prev_extent(ifp, &icur, &got))) { in __xfs_bunmapi()
5591 struct xfs_bmbt_irec *got, /* current extent to shift */ in xfs_bmse_can_merge() argument
5596 startoff = got->br_startoff - shift; in xfs_bmse_can_merge()
5603 (left->br_startblock + left->br_blockcount != got->br_startblock) || in xfs_bmse_can_merge()
5604 (left->br_state != got->br_state) || in xfs_bmse_can_merge()
5605 (left->br_blockcount + got->br_blockcount > XFS_MAX_BMBT_EXTLEN)) in xfs_bmse_can_merge()
5627 struct xfs_bmbt_irec *got, /* extent to shift */ in xfs_bmse_merge() argument
5638 blockcount = left->br_blockcount + got->br_blockcount; in xfs_bmse_merge()
5642 ASSERT(xfs_bmse_can_merge(left, got, shift)); in xfs_bmse_merge()
5659 error = xfs_bmbt_lookup_eq(cur, got, &i); in xfs_bmse_merge()
5694 xfs_rmap_unmap_extent(tp, ip, whichfork, got); in xfs_bmse_merge()
5695 memcpy(&new, got, sizeof(new)); in xfs_bmse_merge()
5707 struct xfs_bmbt_irec *got, in xfs_bmap_shift_update_extent() argument
5713 struct xfs_bmbt_irec prev = *got; in xfs_bmap_shift_update_extent()
5718 got->br_startoff = startoff; in xfs_bmap_shift_update_extent()
5727 error = xfs_bmbt_update(cur, got); in xfs_bmap_shift_update_extent()
5735 got); in xfs_bmap_shift_update_extent()
5739 xfs_rmap_map_extent(tp, ip, whichfork, got); in xfs_bmap_shift_update_extent()
5755 struct xfs_bmbt_irec got, prev; in xfs_bmap_collapse_extents() local
5780 if (!xfs_iext_lookup_extent(ip, ifp, *next_fsb, &icur, &got)) { in xfs_bmap_collapse_extents()
5784 if (XFS_IS_CORRUPT(mp, isnullstartblock(got.br_startblock))) { in xfs_bmap_collapse_extents()
5789 new_startoff = got.br_startoff - offset_shift_fsb; in xfs_bmap_collapse_extents()
5796 if (xfs_bmse_can_merge(&prev, &got, offset_shift_fsb)) { in xfs_bmap_collapse_extents()
5798 offset_shift_fsb, &icur, &got, &prev, in xfs_bmap_collapse_extents()
5805 if (got.br_startoff < offset_shift_fsb) { in xfs_bmap_collapse_extents()
5811 error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got, in xfs_bmap_collapse_extents()
5817 if (!xfs_iext_next_extent(ifp, &icur, &got)) { in xfs_bmap_collapse_extents()
5822 *next_fsb = got.br_startoff; in xfs_bmap_collapse_extents()
5838 struct xfs_bmbt_irec got; in xfs_bmap_can_insert_extents() local
5848 error = xfs_bmap_last_extent(NULL, ip, XFS_DATA_FORK, &got, &is_empty); in xfs_bmap_can_insert_extents()
5849 if (!error && !is_empty && got.br_startoff >= off && in xfs_bmap_can_insert_extents()
5850 ((got.br_startoff + shift) & BMBT_STARTOFF_MASK) < got.br_startoff) in xfs_bmap_can_insert_extents()
5870 struct xfs_bmbt_irec got, next; in xfs_bmap_insert_extents() local
5897 if (!xfs_iext_get_extent(ifp, &icur, &got) || in xfs_bmap_insert_extents()
5898 stop_fsb > got.br_startoff) { in xfs_bmap_insert_extents()
5903 if (!xfs_iext_lookup_extent(ip, ifp, *next_fsb, &icur, &got)) { in xfs_bmap_insert_extents()
5908 if (XFS_IS_CORRUPT(mp, isnullstartblock(got.br_startblock))) { in xfs_bmap_insert_extents()
5913 if (XFS_IS_CORRUPT(mp, stop_fsb > got.br_startoff)) { in xfs_bmap_insert_extents()
5918 new_startoff = got.br_startoff + offset_shift_fsb; in xfs_bmap_insert_extents()
5920 if (new_startoff + got.br_blockcount > next.br_startoff) { in xfs_bmap_insert_extents()
5931 if (xfs_bmse_can_merge(&got, &next, offset_shift_fsb)) in xfs_bmap_insert_extents()
5935 error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got, in xfs_bmap_insert_extents()
5940 if (!xfs_iext_prev_extent(ifp, &icur, &got) || in xfs_bmap_insert_extents()
5941 stop_fsb >= got.br_startoff + got.br_blockcount) { in xfs_bmap_insert_extents()
5946 *next_fsb = got.br_startoff; in xfs_bmap_insert_extents()
5970 struct xfs_bmbt_irec got; in xfs_bmap_split_extent() local
5995 if (!xfs_iext_lookup_extent(ip, ifp, split_fsb, &icur, &got) || in xfs_bmap_split_extent()
5996 got.br_startoff >= split_fsb) in xfs_bmap_split_extent()
5999 gotblkcnt = split_fsb - got.br_startoff; in xfs_bmap_split_extent()
6001 new.br_startblock = got.br_startblock + gotblkcnt; in xfs_bmap_split_extent()
6002 new.br_blockcount = got.br_blockcount - gotblkcnt; in xfs_bmap_split_extent()
6003 new.br_state = got.br_state; in xfs_bmap_split_extent()
6008 error = xfs_bmbt_lookup_eq(cur, &got, &i); in xfs_bmap_split_extent()
6017 got.br_blockcount = gotblkcnt; in xfs_bmap_split_extent()
6019 &got); in xfs_bmap_split_extent()
6023 error = xfs_bmbt_update(cur, &got); in xfs_bmap_split_extent()