• Home
  • Raw
  • Download

Lines Matching full:got

1315 	struct xfs_bmbt_irec	got;  in xfs_bmap_first_unused()  local
1337 for_each_xfs_iext(ifp, &icur, &got) { in xfs_bmap_first_unused()
1341 if (got.br_startoff >= lowest + len && in xfs_bmap_first_unused()
1342 got.br_startoff - max >= len) in xfs_bmap_first_unused()
1344 lastaddr = got.br_startoff + got.br_blockcount; in xfs_bmap_first_unused()
1366 struct xfs_bmbt_irec got; in xfs_bmap_last_before() local
1387 if (!xfs_iext_lookup_extent_before(ip, ifp, last_block, &icur, &got)) in xfs_bmap_last_before()
1534 struct xfs_bmbt_irec *new = &bma->got; in xfs_bmap_add_extent_delay_real()
3144 if (!isnullstartblock(ap->got.br_startblock)) { in xfs_bmap_adjacent()
3148 adjust = gotdiff = ap->got.br_startoff - ap->offset; in xfs_bmap_adjacent()
3153 gotbno = ap->got.br_startblock; in xfs_bmap_adjacent()
3418 error = xfs_bmap_extsize_align(mp, &ap->got, &ap->prev, in xfs_bmap_btalloc()
3708 struct xfs_bmbt_irec *got, in xfs_bmapi_trim_map() argument
3717 got->br_startoff + got->br_blockcount <= obno) { in xfs_bmapi_trim_map()
3718 *mval = *got; in xfs_bmapi_trim_map()
3719 if (isnullstartblock(got->br_startblock)) in xfs_bmapi_trim_map()
3729 if (isnullstartblock(got->br_startblock)) in xfs_bmapi_trim_map()
3732 mval->br_startblock = got->br_startblock + in xfs_bmapi_trim_map()
3733 (*bno - got->br_startoff); in xfs_bmapi_trim_map()
3735 * Return the minimum of what we got and what we asked for for in xfs_bmapi_trim_map()
3742 got->br_blockcount - (*bno - got->br_startoff)); in xfs_bmapi_trim_map()
3743 mval->br_state = got->br_state; in xfs_bmapi_trim_map()
3816 struct xfs_bmbt_irec got; in xfs_bmapi_read() local
3874 if (!xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) in xfs_bmapi_read()
3882 got.br_startoff = end; in xfs_bmapi_read()
3883 if (got.br_startoff > bno) { in xfs_bmapi_read()
3888 XFS_FILBLKS_MIN(len, got.br_startoff - bno); in xfs_bmapi_read()
3898 xfs_bmapi_trim_map(mval, &got, &bno, len, obno, end, n, flags); in xfs_bmapi_read()
3906 if (!xfs_iext_next_extent(ifp, &icur, &got)) in xfs_bmapi_read()
3917 * On entry, got refers to the first extent beyond the offset of the extent to
3918 * allocate or eof is specified if no such extent exists. On return, got refers
3922 * during insertion into the inode fork. Thus, got does not reflect the current
3933 struct xfs_bmbt_irec *got, in xfs_bmapi_reserve_delalloc() argument
3950 alen = XFS_FILBLKS_MIN(alen, got->br_startoff - aoff); in xfs_bmapi_reserve_delalloc()
3962 error = xfs_bmap_extsize_align(mp, got, &prev, extsz, 0, eof, in xfs_bmapi_reserve_delalloc()
3995 got->br_startoff = aoff; in xfs_bmapi_reserve_delalloc()
3996 got->br_startblock = nullstartblock(indlen); in xfs_bmapi_reserve_delalloc()
3997 got->br_blockcount = alen; in xfs_bmapi_reserve_delalloc()
3998 got->br_state = XFS_EXT_NORM; in xfs_bmapi_reserve_delalloc()
4000 xfs_bmap_add_extent_hole_delay(ip, whichfork, icur, got); in xfs_bmapi_reserve_delalloc()
4040 bma->length = (xfs_extlen_t)bma->got.br_blockcount; in xfs_bmapi_allocate()
4041 bma->offset = bma->got.br_startoff; in xfs_bmapi_allocate()
4047 bma->got.br_startoff - bma->offset); in xfs_bmapi_allocate()
4099 bma->got.br_startoff = bma->offset; in xfs_bmapi_allocate()
4100 bma->got.br_startblock = bma->blkno; in xfs_bmapi_allocate()
4101 bma->got.br_blockcount = bma->length; in xfs_bmapi_allocate()
4102 bma->got.br_state = XFS_EXT_NORM; in xfs_bmapi_allocate()
4116 bma->got.br_state = XFS_EXT_UNWRITTEN; in xfs_bmapi_allocate()
4122 whichfork, &bma->icur, &bma->cur, &bma->got, in xfs_bmapi_allocate()
4134 xfs_iext_get_extent(ifp, &bma->icur, &bma->got); in xfs_bmapi_allocate()
4136 ASSERT(bma->got.br_startoff <= bma->offset); in xfs_bmapi_allocate()
4137 ASSERT(bma->got.br_startoff + bma->got.br_blockcount >= in xfs_bmapi_allocate()
4139 ASSERT(bma->got.br_state == XFS_EXT_NORM || in xfs_bmapi_allocate()
4140 bma->got.br_state == XFS_EXT_UNWRITTEN); in xfs_bmapi_allocate()
4212 xfs_iext_get_extent(ifp, &bma->icur, &bma->got); in xfs_bmapi_convert_unwritten()
4321 if (!xfs_iext_lookup_extent(ip, ifp, bno, &bma.icur, &bma.got)) in xfs_bmapi_write()
4334 if (eof || bma.got.br_startoff > bno) { in xfs_bmapi_write()
4363 } else if (isnullstartblock(bma.got.br_startblock)) { in xfs_bmapi_write()
4412 xfs_bmapi_trim_map(mval, &bma.got, &bno, len, obno, in xfs_bmapi_write()
4434 bma.prev = bma.got; in xfs_bmapi_write()
4435 if (!xfs_iext_next_extent(ifp, &bma.icur, &bma.got)) in xfs_bmapi_write()
4498 struct xfs_bmbt_irec got; in xfs_bmapi_remap() local
4529 if (xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) { in xfs_bmapi_remap()
4531 ASSERT(got.br_startoff > bno); in xfs_bmapi_remap()
4532 ASSERT(got.br_startoff - bno >= len); in xfs_bmapi_remap()
4543 got.br_startoff = bno; in xfs_bmapi_remap()
4544 got.br_startblock = startblock; in xfs_bmapi_remap()
4545 got.br_blockcount = len; in xfs_bmapi_remap()
4547 got.br_state = XFS_EXT_UNWRITTEN; in xfs_bmapi_remap()
4549 got.br_state = XFS_EXT_NORM; in xfs_bmapi_remap()
4552 &cur, &got, &logflags, flags); in xfs_bmapi_remap()
4667 struct xfs_bmbt_irec *got, in xfs_bmap_del_extent_delay() argument
4684 got_endoff = got->br_startoff + got->br_blockcount; in xfs_bmap_del_extent_delay()
4685 da_old = startblockval(got->br_startblock); in xfs_bmap_del_extent_delay()
4689 ASSERT(got->br_startoff <= del->br_startoff); in xfs_bmap_del_extent_delay()
4711 if (got->br_startoff == del->br_startoff) in xfs_bmap_del_extent_delay()
4728 got->br_startoff = del_endoff; in xfs_bmap_del_extent_delay()
4729 got->br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_delay()
4731 got->br_blockcount), da_old); in xfs_bmap_del_extent_delay()
4732 got->br_startblock = nullstartblock((int)da_new); in xfs_bmap_del_extent_delay()
4733 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_delay()
4739 got->br_blockcount = got->br_blockcount - del->br_blockcount; in xfs_bmap_del_extent_delay()
4741 got->br_blockcount), da_old); in xfs_bmap_del_extent_delay()
4742 got->br_startblock = nullstartblock((int)da_new); in xfs_bmap_del_extent_delay()
4743 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_delay()
4755 got->br_blockcount = del->br_startoff - got->br_startoff; in xfs_bmap_del_extent_delay()
4756 got_indlen = xfs_bmap_worst_indlen(ip, got->br_blockcount); in xfs_bmap_del_extent_delay()
4765 got->br_startblock = nullstartblock((int)got_indlen); in xfs_bmap_del_extent_delay()
4768 new.br_state = got->br_state; in xfs_bmap_del_extent_delay()
4771 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_delay()
4793 struct xfs_bmbt_irec *got, in xfs_bmap_del_extent_cow() argument
4805 got_endoff = got->br_startoff + got->br_blockcount; in xfs_bmap_del_extent_cow()
4808 ASSERT(got->br_startoff <= del->br_startoff); in xfs_bmap_del_extent_cow()
4810 ASSERT(!isnullstartblock(got->br_startblock)); in xfs_bmap_del_extent_cow()
4812 if (got->br_startoff == del->br_startoff) in xfs_bmap_del_extent_cow()
4829 got->br_startoff = del_endoff; in xfs_bmap_del_extent_cow()
4830 got->br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_cow()
4831 got->br_startblock = del->br_startblock + del->br_blockcount; in xfs_bmap_del_extent_cow()
4832 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_cow()
4838 got->br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_cow()
4839 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_cow()
4845 got->br_blockcount = del->br_startoff - got->br_startoff; in xfs_bmap_del_extent_cow()
4849 new.br_state = got->br_state; in xfs_bmap_del_extent_cow()
4852 xfs_iext_update_extent(ip, state, icur, got); in xfs_bmap_del_extent_cow()
4880 struct xfs_bmbt_irec got; /* current extent entry */ in xfs_bmap_del_extent_real() local
4881 xfs_fileoff_t got_endoff; /* first offset past got */ in xfs_bmap_del_extent_real()
4897 xfs_iext_get_extent(ifp, icur, &got); in xfs_bmap_del_extent_real()
4898 ASSERT(got.br_startoff <= del->br_startoff); in xfs_bmap_del_extent_real()
4900 got_endoff = got.br_startoff + got.br_blockcount; in xfs_bmap_del_extent_real()
4902 ASSERT(!isnullstartblock(got.br_startblock)); in xfs_bmap_del_extent_real()
4918 del->br_startoff > got.br_startoff && del_endoff < got_endoff) in xfs_bmap_del_extent_real()
4953 error = xfs_bmbt_lookup_eq(cur, &got, &i); in xfs_bmap_del_extent_real()
4959 if (got.br_startoff == del->br_startoff) in xfs_bmap_del_extent_real()
4986 got.br_startoff = del_endoff; in xfs_bmap_del_extent_real()
4987 got.br_startblock = del_endblock; in xfs_bmap_del_extent_real()
4988 got.br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_real()
4989 xfs_iext_update_extent(ip, state, icur, &got); in xfs_bmap_del_extent_real()
4994 error = xfs_bmbt_update(cur, &got); in xfs_bmap_del_extent_real()
5002 got.br_blockcount -= del->br_blockcount; in xfs_bmap_del_extent_real()
5003 xfs_iext_update_extent(ip, state, icur, &got); in xfs_bmap_del_extent_real()
5008 error = xfs_bmbt_update(cur, &got); in xfs_bmap_del_extent_real()
5016 old = got; in xfs_bmap_del_extent_real()
5018 got.br_blockcount = del->br_startoff - got.br_startoff; in xfs_bmap_del_extent_real()
5019 xfs_iext_update_extent(ip, state, icur, &got); in xfs_bmap_del_extent_real()
5023 new.br_state = got.br_state; in xfs_bmap_del_extent_real()
5028 error = xfs_bmbt_update(cur, &got); in xfs_bmap_del_extent_real()
5048 error = xfs_bmbt_lookup_eq(cur, &got, &i); in xfs_bmap_del_extent_real()
5134 struct xfs_bmbt_irec got; /* current extent record */ in __xfs_bunmapi() local
5192 if (!xfs_iext_lookup_extent_before(ip, ifp, &end, &icur, &got)) { in __xfs_bunmapi()
5223 if (got.br_startoff > end && in __xfs_bunmapi()
5224 !xfs_iext_prev_extent(ifp, &icur, &got)) { in __xfs_bunmapi()
5233 got.br_startoff + got.br_blockcount - 1); in __xfs_bunmapi()
5240 del = got; in __xfs_bunmapi()
5253 if (got.br_startoff < start) { in __xfs_bunmapi()
5255 del.br_blockcount -= start - got.br_startoff; in __xfs_bunmapi()
5257 del.br_startblock += start - got.br_startoff; in __xfs_bunmapi()
5292 if (end < got.br_startoff && in __xfs_bunmapi()
5293 !xfs_iext_prev_extent(ifp, &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()
5393 &got, &del); in __xfs_bunmapi()
5411 if (!xfs_iext_get_extent(ifp, &icur, &got) || in __xfs_bunmapi()
5412 (got.br_startoff > end && in __xfs_bunmapi()
5413 !xfs_iext_prev_extent(ifp, &icur, &got))) { in __xfs_bunmapi()
5501 struct xfs_bmbt_irec *got, /* current extent to shift */ in xfs_bmse_can_merge() argument
5506 startoff = got->br_startoff - shift; in xfs_bmse_can_merge()
5513 (left->br_startblock + left->br_blockcount != got->br_startblock) || in xfs_bmse_can_merge()
5514 (left->br_state != got->br_state) || in xfs_bmse_can_merge()
5515 (left->br_blockcount + got->br_blockcount > MAXEXTLEN)) in xfs_bmse_can_merge()
5537 struct xfs_bmbt_irec *got, /* extent to shift */ in xfs_bmse_merge() argument
5547 blockcount = left->br_blockcount + got->br_blockcount; in xfs_bmse_merge()
5551 ASSERT(xfs_bmse_can_merge(left, got, shift)); in xfs_bmse_merge()
5569 error = xfs_bmbt_lookup_eq(cur, got, &i); in xfs_bmse_merge()
5596 error = xfs_rmap_unmap_extent(tp, ip, whichfork, got); in xfs_bmse_merge()
5599 memcpy(&new, got, sizeof(new)); in xfs_bmse_merge()
5610 struct xfs_bmbt_irec *got, in xfs_bmap_shift_update_extent() argument
5616 struct xfs_bmbt_irec prev = *got; in xfs_bmap_shift_update_extent()
5621 got->br_startoff = startoff; in xfs_bmap_shift_update_extent()
5629 error = xfs_bmbt_update(cur, got); in xfs_bmap_shift_update_extent()
5637 got); in xfs_bmap_shift_update_extent()
5643 return xfs_rmap_map_extent(tp, ip, whichfork, got); in xfs_bmap_shift_update_extent()
5658 struct xfs_bmbt_irec got, prev; in xfs_bmap_collapse_extents() local
5688 if (!xfs_iext_lookup_extent(ip, ifp, *next_fsb, &icur, &got)) { in xfs_bmap_collapse_extents()
5692 XFS_WANT_CORRUPTED_GOTO(mp, !isnullstartblock(got.br_startblock), in xfs_bmap_collapse_extents()
5695 new_startoff = got.br_startoff - offset_shift_fsb; in xfs_bmap_collapse_extents()
5702 if (xfs_bmse_can_merge(&prev, &got, offset_shift_fsb)) { in xfs_bmap_collapse_extents()
5704 offset_shift_fsb, &icur, &got, &prev, in xfs_bmap_collapse_extents()
5711 if (got.br_startoff < offset_shift_fsb) { in xfs_bmap_collapse_extents()
5717 error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got, in xfs_bmap_collapse_extents()
5723 if (!xfs_iext_next_extent(ifp, &icur, &got)) { in xfs_bmap_collapse_extents()
5728 *next_fsb = got.br_startoff; in xfs_bmap_collapse_extents()
5744 struct xfs_bmbt_irec got; in xfs_bmap_can_insert_extents() local
5754 error = xfs_bmap_last_extent(NULL, ip, XFS_DATA_FORK, &got, &is_empty); in xfs_bmap_can_insert_extents()
5755 if (!error && !is_empty && got.br_startoff >= off && in xfs_bmap_can_insert_extents()
5756 ((got.br_startoff + shift) & BMBT_STARTOFF_MASK) < got.br_startoff) in xfs_bmap_can_insert_extents()
5776 struct xfs_bmbt_irec got, next; in xfs_bmap_insert_extents() local
5808 if (!xfs_iext_get_extent(ifp, &icur, &got) || in xfs_bmap_insert_extents()
5809 stop_fsb > got.br_startoff) { in xfs_bmap_insert_extents()
5814 if (!xfs_iext_lookup_extent(ip, ifp, *next_fsb, &icur, &got)) { in xfs_bmap_insert_extents()
5819 XFS_WANT_CORRUPTED_GOTO(mp, !isnullstartblock(got.br_startblock), in xfs_bmap_insert_extents()
5822 if (stop_fsb >= got.br_startoff + got.br_blockcount) { in xfs_bmap_insert_extents()
5827 new_startoff = got.br_startoff + offset_shift_fsb; in xfs_bmap_insert_extents()
5829 if (new_startoff + got.br_blockcount > next.br_startoff) { in xfs_bmap_insert_extents()
5840 if (xfs_bmse_can_merge(&got, &next, offset_shift_fsb)) in xfs_bmap_insert_extents()
5844 error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got, in xfs_bmap_insert_extents()
5849 if (!xfs_iext_prev_extent(ifp, &icur, &got) || in xfs_bmap_insert_extents()
5850 stop_fsb >= got.br_startoff + got.br_blockcount) { in xfs_bmap_insert_extents()
5855 *next_fsb = got.br_startoff; in xfs_bmap_insert_extents()
5878 struct xfs_bmbt_irec got; in xfs_bmap_split_extent_at() local
5882 xfs_fsblock_t gotblkcnt; /* new block count for got */ in xfs_bmap_split_extent_at()
5911 if (!xfs_iext_lookup_extent(ip, ifp, split_fsb, &icur, &got) || in xfs_bmap_split_extent_at()
5912 got.br_startoff >= split_fsb) in xfs_bmap_split_extent_at()
5915 gotblkcnt = split_fsb - got.br_startoff; in xfs_bmap_split_extent_at()
5917 new.br_startblock = got.br_startblock + gotblkcnt; in xfs_bmap_split_extent_at()
5918 new.br_blockcount = got.br_blockcount - gotblkcnt; in xfs_bmap_split_extent_at()
5919 new.br_state = got.br_state; in xfs_bmap_split_extent_at()
5924 error = xfs_bmbt_lookup_eq(cur, &got, &i); in xfs_bmap_split_extent_at()
5930 got.br_blockcount = gotblkcnt; in xfs_bmap_split_extent_at()
5932 &got); in xfs_bmap_split_extent_at()
5936 error = xfs_bmbt_update(cur, &got); in xfs_bmap_split_extent_at()