diff options
author | Christoph Hellwig <hch@infradead.org> | 2007-08-16 02:23:40 -0400 |
---|---|---|
committer | Tim Shimmin <tes@chook.melbourne.sgi.com> | 2007-10-15 02:25:51 -0400 |
commit | a6f64d4aea0d0c8483e910c7dd2d1ee48e42245c (patch) | |
tree | f3fb20bb6d816f6d674bd4c8bfa687b013443eaf /fs/xfs/xfs_bmap.c | |
parent | d580ef6eaae6eaaef1e06c7d689fc9949faee9da (diff) |
[XFS] split ondisk vs incore versions of xfs_bmbt_rec_t
currently xfs_bmbt_rec_t is used both for ondisk extents as well as
host-endian ones. This patch adds a new xfs_bmbt_rec_host_t for the native
endian ones and cleans up the fallout. There have been various endianess
issues in the tracing / debug printf code that are fixed by this patch.
SGI-PV: 968563
SGI-Modid: xfs-linux-melb:xfs-kern:29318a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_bmap.c')
-rw-r--r-- | fs/xfs/xfs_bmap.c | 75 |
1 files changed, 29 insertions, 46 deletions
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index aa19e1fee11f..bbef39432be2 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c | |||
@@ -248,7 +248,7 @@ xfs_bmap_local_to_extents( | |||
248 | * Else, *lastxp will be set to the index of the found | 248 | * Else, *lastxp will be set to the index of the found |
249 | * entry; *gotp will contain the entry. | 249 | * entry; *gotp will contain the entry. |
250 | */ | 250 | */ |
251 | STATIC xfs_bmbt_rec_t * /* pointer to found extent entry */ | 251 | STATIC xfs_bmbt_rec_host_t * /* pointer to found extent entry */ |
252 | xfs_bmap_search_extents( | 252 | xfs_bmap_search_extents( |
253 | xfs_inode_t *ip, /* incore inode pointer */ | 253 | xfs_inode_t *ip, /* incore inode pointer */ |
254 | xfs_fileoff_t bno, /* block number searched for */ | 254 | xfs_fileoff_t bno, /* block number searched for */ |
@@ -273,21 +273,6 @@ xfs_bmap_isaeof( | |||
273 | 273 | ||
274 | #ifdef XFS_BMAP_TRACE | 274 | #ifdef XFS_BMAP_TRACE |
275 | /* | 275 | /* |
276 | * Add a bmap trace buffer entry. Base routine for the others. | ||
277 | */ | ||
278 | STATIC void | ||
279 | xfs_bmap_trace_addentry( | ||
280 | int opcode, /* operation */ | ||
281 | const char *fname, /* function name */ | ||
282 | char *desc, /* operation description */ | ||
283 | xfs_inode_t *ip, /* incore inode pointer */ | ||
284 | xfs_extnum_t idx, /* index of entry(ies) */ | ||
285 | xfs_extnum_t cnt, /* count of entries, 1 or 2 */ | ||
286 | xfs_bmbt_rec_t *r1, /* first record */ | ||
287 | xfs_bmbt_rec_t *r2, /* second record or null */ | ||
288 | int whichfork); /* data or attr fork */ | ||
289 | |||
290 | /* | ||
291 | * Add bmap trace entry prior to a call to xfs_iext_remove. | 276 | * Add bmap trace entry prior to a call to xfs_iext_remove. |
292 | */ | 277 | */ |
293 | STATIC void | 278 | STATIC void |
@@ -714,7 +699,7 @@ xfs_bmap_add_extent_delay_real( | |||
714 | { | 699 | { |
715 | xfs_btree_cur_t *cur; /* btree cursor */ | 700 | xfs_btree_cur_t *cur; /* btree cursor */ |
716 | int diff; /* temp value */ | 701 | int diff; /* temp value */ |
717 | xfs_bmbt_rec_t *ep; /* extent entry for idx */ | 702 | xfs_bmbt_rec_host_t *ep; /* extent entry for idx */ |
718 | int error; /* error return value */ | 703 | int error; /* error return value */ |
719 | int i; /* temp state */ | 704 | int i; /* temp state */ |
720 | xfs_ifork_t *ifp; /* inode fork pointer */ | 705 | xfs_ifork_t *ifp; /* inode fork pointer */ |
@@ -1270,7 +1255,7 @@ xfs_bmap_add_extent_unwritten_real( | |||
1270 | xfs_extdelta_t *delta) /* Change made to incore extents */ | 1255 | xfs_extdelta_t *delta) /* Change made to incore extents */ |
1271 | { | 1256 | { |
1272 | xfs_btree_cur_t *cur; /* btree cursor */ | 1257 | xfs_btree_cur_t *cur; /* btree cursor */ |
1273 | xfs_bmbt_rec_t *ep; /* extent entry for idx */ | 1258 | xfs_bmbt_rec_host_t *ep; /* extent entry for idx */ |
1274 | int error; /* error return value */ | 1259 | int error; /* error return value */ |
1275 | int i; /* temp state */ | 1260 | int i; /* temp state */ |
1276 | xfs_ifork_t *ifp; /* inode fork pointer */ | 1261 | xfs_ifork_t *ifp; /* inode fork pointer */ |
@@ -1823,7 +1808,7 @@ xfs_bmap_add_extent_hole_delay( | |||
1823 | xfs_extdelta_t *delta, /* Change made to incore extents */ | 1808 | xfs_extdelta_t *delta, /* Change made to incore extents */ |
1824 | int rsvd) /* OK to allocate reserved blocks */ | 1809 | int rsvd) /* OK to allocate reserved blocks */ |
1825 | { | 1810 | { |
1826 | xfs_bmbt_rec_t *ep; /* extent record for idx */ | 1811 | xfs_bmbt_rec_host_t *ep; /* extent record for idx */ |
1827 | xfs_ifork_t *ifp; /* inode fork pointer */ | 1812 | xfs_ifork_t *ifp; /* inode fork pointer */ |
1828 | xfs_bmbt_irec_t left; /* left neighbor extent entry */ | 1813 | xfs_bmbt_irec_t left; /* left neighbor extent entry */ |
1829 | xfs_filblks_t newlen=0; /* new indirect size */ | 1814 | xfs_filblks_t newlen=0; /* new indirect size */ |
@@ -2012,7 +1997,7 @@ xfs_bmap_add_extent_hole_real( | |||
2012 | xfs_extdelta_t *delta, /* Change made to incore extents */ | 1997 | xfs_extdelta_t *delta, /* Change made to incore extents */ |
2013 | int whichfork) /* data or attr fork */ | 1998 | int whichfork) /* data or attr fork */ |
2014 | { | 1999 | { |
2015 | xfs_bmbt_rec_t *ep; /* pointer to extent entry ins. point */ | 2000 | xfs_bmbt_rec_host_t *ep; /* pointer to extent entry ins. point */ |
2016 | int error; /* error return value */ | 2001 | int error; /* error return value */ |
2017 | int i; /* temp state */ | 2002 | int i; /* temp state */ |
2018 | xfs_ifork_t *ifp; /* inode fork pointer */ | 2003 | xfs_ifork_t *ifp; /* inode fork pointer */ |
@@ -3070,7 +3055,7 @@ xfs_bmap_del_extent( | |||
3070 | xfs_fileoff_t del_endoff; /* first offset past del */ | 3055 | xfs_fileoff_t del_endoff; /* first offset past del */ |
3071 | int delay; /* current block is delayed allocated */ | 3056 | int delay; /* current block is delayed allocated */ |
3072 | int do_fx; /* free extent at end of routine */ | 3057 | int do_fx; /* free extent at end of routine */ |
3073 | xfs_bmbt_rec_t *ep; /* current extent entry pointer */ | 3058 | xfs_bmbt_rec_host_t *ep; /* current extent entry pointer */ |
3074 | int error; /* error return value */ | 3059 | int error; /* error return value */ |
3075 | int flags; /* inode logging flags */ | 3060 | int flags; /* inode logging flags */ |
3076 | xfs_bmbt_irec_t got; /* current extent entry */ | 3061 | xfs_bmbt_irec_t got; /* current extent entry */ |
@@ -3418,7 +3403,7 @@ xfs_bmap_extents_to_btree( | |||
3418 | xfs_bmbt_rec_t *arp; /* child record pointer */ | 3403 | xfs_bmbt_rec_t *arp; /* child record pointer */ |
3419 | xfs_bmbt_block_t *block; /* btree root block */ | 3404 | xfs_bmbt_block_t *block; /* btree root block */ |
3420 | xfs_btree_cur_t *cur; /* bmap btree cursor */ | 3405 | xfs_btree_cur_t *cur; /* bmap btree cursor */ |
3421 | xfs_bmbt_rec_t *ep; /* extent record pointer */ | 3406 | xfs_bmbt_rec_host_t *ep; /* extent record pointer */ |
3422 | int error; /* error return value */ | 3407 | int error; /* error return value */ |
3423 | xfs_extnum_t i, cnt; /* extent record index */ | 3408 | xfs_extnum_t i, cnt; /* extent record index */ |
3424 | xfs_ifork_t *ifp; /* inode fork pointer */ | 3409 | xfs_ifork_t *ifp; /* inode fork pointer */ |
@@ -3590,7 +3575,7 @@ xfs_bmap_local_to_extents( | |||
3590 | if (ifp->if_bytes) { | 3575 | if (ifp->if_bytes) { |
3591 | xfs_alloc_arg_t args; /* allocation arguments */ | 3576 | xfs_alloc_arg_t args; /* allocation arguments */ |
3592 | xfs_buf_t *bp; /* buffer for extent block */ | 3577 | xfs_buf_t *bp; /* buffer for extent block */ |
3593 | xfs_bmbt_rec_t *ep; /* extent record pointer */ | 3578 | xfs_bmbt_rec_host_t *ep;/* extent record pointer */ |
3594 | 3579 | ||
3595 | args.tp = tp; | 3580 | args.tp = tp; |
3596 | args.mp = ip->i_mount; | 3581 | args.mp = ip->i_mount; |
@@ -3655,7 +3640,7 @@ done: | |||
3655 | * entry (null if none). Else, *lastxp will be set to the index | 3640 | * entry (null if none). Else, *lastxp will be set to the index |
3656 | * of the found entry; *gotp will contain the entry. | 3641 | * of the found entry; *gotp will contain the entry. |
3657 | */ | 3642 | */ |
3658 | xfs_bmbt_rec_t * /* pointer to found extent entry */ | 3643 | xfs_bmbt_rec_host_t * /* pointer to found extent entry */ |
3659 | xfs_bmap_search_multi_extents( | 3644 | xfs_bmap_search_multi_extents( |
3660 | xfs_ifork_t *ifp, /* inode fork pointer */ | 3645 | xfs_ifork_t *ifp, /* inode fork pointer */ |
3661 | xfs_fileoff_t bno, /* block number searched for */ | 3646 | xfs_fileoff_t bno, /* block number searched for */ |
@@ -3664,7 +3649,7 @@ xfs_bmap_search_multi_extents( | |||
3664 | xfs_bmbt_irec_t *gotp, /* out: extent entry found */ | 3649 | xfs_bmbt_irec_t *gotp, /* out: extent entry found */ |
3665 | xfs_bmbt_irec_t *prevp) /* out: previous extent entry found */ | 3650 | xfs_bmbt_irec_t *prevp) /* out: previous extent entry found */ |
3666 | { | 3651 | { |
3667 | xfs_bmbt_rec_t *ep; /* extent record pointer */ | 3652 | xfs_bmbt_rec_host_t *ep; /* extent record pointer */ |
3668 | xfs_extnum_t lastx; /* last extent index */ | 3653 | xfs_extnum_t lastx; /* last extent index */ |
3669 | 3654 | ||
3670 | /* | 3655 | /* |
@@ -3706,7 +3691,7 @@ xfs_bmap_search_multi_extents( | |||
3706 | * Else, *lastxp will be set to the index of the found | 3691 | * Else, *lastxp will be set to the index of the found |
3707 | * entry; *gotp will contain the entry. | 3692 | * entry; *gotp will contain the entry. |
3708 | */ | 3693 | */ |
3709 | STATIC xfs_bmbt_rec_t * /* pointer to found extent entry */ | 3694 | STATIC xfs_bmbt_rec_host_t * /* pointer to found extent entry */ |
3710 | xfs_bmap_search_extents( | 3695 | xfs_bmap_search_extents( |
3711 | xfs_inode_t *ip, /* incore inode pointer */ | 3696 | xfs_inode_t *ip, /* incore inode pointer */ |
3712 | xfs_fileoff_t bno, /* block number searched for */ | 3697 | xfs_fileoff_t bno, /* block number searched for */ |
@@ -3717,7 +3702,7 @@ xfs_bmap_search_extents( | |||
3717 | xfs_bmbt_irec_t *prevp) /* out: previous extent entry found */ | 3702 | xfs_bmbt_irec_t *prevp) /* out: previous extent entry found */ |
3718 | { | 3703 | { |
3719 | xfs_ifork_t *ifp; /* inode fork pointer */ | 3704 | xfs_ifork_t *ifp; /* inode fork pointer */ |
3720 | xfs_bmbt_rec_t *ep; /* extent record pointer */ | 3705 | xfs_bmbt_rec_host_t *ep; /* extent record pointer */ |
3721 | 3706 | ||
3722 | XFS_STATS_INC(xs_look_exlist); | 3707 | XFS_STATS_INC(xs_look_exlist); |
3723 | ifp = XFS_IFORK_PTR(ip, fork); | 3708 | ifp = XFS_IFORK_PTR(ip, fork); |
@@ -3757,11 +3742,11 @@ xfs_bmap_trace_addentry( | |||
3757 | xfs_inode_t *ip, /* incore inode pointer */ | 3742 | xfs_inode_t *ip, /* incore inode pointer */ |
3758 | xfs_extnum_t idx, /* index of entry(ies) */ | 3743 | xfs_extnum_t idx, /* index of entry(ies) */ |
3759 | xfs_extnum_t cnt, /* count of entries, 1 or 2 */ | 3744 | xfs_extnum_t cnt, /* count of entries, 1 or 2 */ |
3760 | xfs_bmbt_rec_t *r1, /* first record */ | 3745 | xfs_bmbt_rec_host_t *r1, /* first record */ |
3761 | xfs_bmbt_rec_t *r2, /* second record or null */ | 3746 | xfs_bmbt_rec_host_t *r2, /* second record or null */ |
3762 | int whichfork) /* data or attr fork */ | 3747 | int whichfork) /* data or attr fork */ |
3763 | { | 3748 | { |
3764 | xfs_bmbt_rec_t tr2; | 3749 | xfs_bmbt_rec_host_t tr2; |
3765 | 3750 | ||
3766 | ASSERT(cnt == 1 || cnt == 2); | 3751 | ASSERT(cnt == 1 || cnt == 2); |
3767 | ASSERT(r1 != NULL); | 3752 | ASSERT(r1 != NULL); |
@@ -3842,8 +3827,8 @@ xfs_bmap_trace_insert( | |||
3842 | xfs_bmbt_irec_t *r2, /* inserted record 2 or null */ | 3827 | xfs_bmbt_irec_t *r2, /* inserted record 2 or null */ |
3843 | int whichfork) /* data or attr fork */ | 3828 | int whichfork) /* data or attr fork */ |
3844 | { | 3829 | { |
3845 | xfs_bmbt_rec_t tr1; /* compressed record 1 */ | 3830 | xfs_bmbt_rec_host_t tr1; /* compressed record 1 */ |
3846 | xfs_bmbt_rec_t tr2; /* compressed record 2 if needed */ | 3831 | xfs_bmbt_rec_host_t tr2; /* compressed record 2 if needed */ |
3847 | 3832 | ||
3848 | xfs_bmbt_set_all(&tr1, r1); | 3833 | xfs_bmbt_set_all(&tr1, r1); |
3849 | if (cnt == 2) { | 3834 | if (cnt == 2) { |
@@ -4316,7 +4301,6 @@ xfs_bmap_first_unused( | |||
4316 | xfs_fileoff_t *first_unused, /* unused block */ | 4301 | xfs_fileoff_t *first_unused, /* unused block */ |
4317 | int whichfork) /* data or attr fork */ | 4302 | int whichfork) /* data or attr fork */ |
4318 | { | 4303 | { |
4319 | xfs_bmbt_rec_t *ep; /* pointer to an extent entry */ | ||
4320 | int error; /* error return value */ | 4304 | int error; /* error return value */ |
4321 | int idx; /* extent record index */ | 4305 | int idx; /* extent record index */ |
4322 | xfs_ifork_t *ifp; /* inode fork pointer */ | 4306 | xfs_ifork_t *ifp; /* inode fork pointer */ |
@@ -4340,7 +4324,7 @@ xfs_bmap_first_unused( | |||
4340 | lowest = *first_unused; | 4324 | lowest = *first_unused; |
4341 | nextents = ifp->if_bytes / (uint)sizeof(xfs_bmbt_rec_t); | 4325 | nextents = ifp->if_bytes / (uint)sizeof(xfs_bmbt_rec_t); |
4342 | for (idx = 0, lastaddr = 0, max = lowest; idx < nextents; idx++) { | 4326 | for (idx = 0, lastaddr = 0, max = lowest; idx < nextents; idx++) { |
4343 | ep = xfs_iext_get_ext(ifp, idx); | 4327 | xfs_bmbt_rec_host_t *ep = xfs_iext_get_ext(ifp, idx); |
4344 | off = xfs_bmbt_get_startoff(ep); | 4328 | off = xfs_bmbt_get_startoff(ep); |
4345 | /* | 4329 | /* |
4346 | * See if the hole before this extent will work. | 4330 | * See if the hole before this extent will work. |
@@ -4371,7 +4355,7 @@ xfs_bmap_last_before( | |||
4371 | { | 4355 | { |
4372 | xfs_fileoff_t bno; /* input file offset */ | 4356 | xfs_fileoff_t bno; /* input file offset */ |
4373 | int eof; /* hit end of file */ | 4357 | int eof; /* hit end of file */ |
4374 | xfs_bmbt_rec_t *ep; /* pointer to last extent */ | 4358 | xfs_bmbt_rec_host_t *ep; /* pointer to last extent */ |
4375 | int error; /* error return value */ | 4359 | int error; /* error return value */ |
4376 | xfs_bmbt_irec_t got; /* current extent value */ | 4360 | xfs_bmbt_irec_t got; /* current extent value */ |
4377 | xfs_ifork_t *ifp; /* inode fork pointer */ | 4361 | xfs_ifork_t *ifp; /* inode fork pointer */ |
@@ -4417,7 +4401,7 @@ xfs_bmap_last_offset( | |||
4417 | xfs_fileoff_t *last_block, /* last block */ | 4401 | xfs_fileoff_t *last_block, /* last block */ |
4418 | int whichfork) /* data or attr fork */ | 4402 | int whichfork) /* data or attr fork */ |
4419 | { | 4403 | { |
4420 | xfs_bmbt_rec_t *ep; /* pointer to last extent */ | 4404 | xfs_bmbt_rec_host_t *ep; /* pointer to last extent */ |
4421 | int error; /* error return value */ | 4405 | int error; /* error return value */ |
4422 | xfs_ifork_t *ifp; /* inode fork pointer */ | 4406 | xfs_ifork_t *ifp; /* inode fork pointer */ |
4423 | xfs_extnum_t nextents; /* number of extent entries */ | 4407 | xfs_extnum_t nextents; /* number of extent entries */ |
@@ -4454,7 +4438,7 @@ xfs_bmap_one_block( | |||
4454 | xfs_inode_t *ip, /* incore inode */ | 4438 | xfs_inode_t *ip, /* incore inode */ |
4455 | int whichfork) /* data or attr fork */ | 4439 | int whichfork) /* data or attr fork */ |
4456 | { | 4440 | { |
4457 | xfs_bmbt_rec_t *ep; /* ptr to fork's extent */ | 4441 | xfs_bmbt_rec_host_t *ep; /* ptr to fork's extent */ |
4458 | xfs_ifork_t *ifp; /* inode fork pointer */ | 4442 | xfs_ifork_t *ifp; /* inode fork pointer */ |
4459 | int rval; /* return value */ | 4443 | int rval; /* return value */ |
4460 | xfs_bmbt_irec_t s; /* internal version of extent */ | 4444 | xfs_bmbt_irec_t s; /* internal version of extent */ |
@@ -4549,7 +4533,7 @@ xfs_bmap_read_extents( | |||
4549 | * Loop over all leaf nodes. Copy information to the extent records. | 4533 | * Loop over all leaf nodes. Copy information to the extent records. |
4550 | */ | 4534 | */ |
4551 | for (;;) { | 4535 | for (;;) { |
4552 | xfs_bmbt_rec_t *frp, *trp; | 4536 | xfs_bmbt_rec_t *frp; |
4553 | xfs_fsblock_t nextbno; | 4537 | xfs_fsblock_t nextbno; |
4554 | xfs_extnum_t num_recs; | 4538 | xfs_extnum_t num_recs; |
4555 | xfs_extnum_t start; | 4539 | xfs_extnum_t start; |
@@ -4581,7 +4565,7 @@ xfs_bmap_read_extents( | |||
4581 | frp = XFS_BTREE_REC_ADDR(xfs_bmbt, block, 1); | 4565 | frp = XFS_BTREE_REC_ADDR(xfs_bmbt, block, 1); |
4582 | start = i; | 4566 | start = i; |
4583 | for (j = 0; j < num_recs; j++, i++, frp++) { | 4567 | for (j = 0; j < num_recs; j++, i++, frp++) { |
4584 | trp = xfs_iext_get_ext(ifp, i); | 4568 | xfs_bmbt_rec_host_t *trp = xfs_iext_get_ext(ifp, i); |
4585 | trp->l0 = INT_GET(frp->l0, ARCH_CONVERT); | 4569 | trp->l0 = INT_GET(frp->l0, ARCH_CONVERT); |
4586 | trp->l1 = INT_GET(frp->l1, ARCH_CONVERT); | 4570 | trp->l1 = INT_GET(frp->l1, ARCH_CONVERT); |
4587 | } | 4571 | } |
@@ -4631,7 +4615,7 @@ xfs_bmap_trace_exlist( | |||
4631 | xfs_extnum_t cnt, /* count of entries in the list */ | 4615 | xfs_extnum_t cnt, /* count of entries in the list */ |
4632 | int whichfork) /* data or attr fork */ | 4616 | int whichfork) /* data or attr fork */ |
4633 | { | 4617 | { |
4634 | xfs_bmbt_rec_t *ep; /* current extent record */ | 4618 | xfs_bmbt_rec_host_t *ep; /* current extent record */ |
4635 | xfs_extnum_t idx; /* extent record index */ | 4619 | xfs_extnum_t idx; /* extent record index */ |
4636 | xfs_ifork_t *ifp; /* inode fork pointer */ | 4620 | xfs_ifork_t *ifp; /* inode fork pointer */ |
4637 | xfs_bmbt_irec_t s; /* file extent record */ | 4621 | xfs_bmbt_irec_t s; /* file extent record */ |
@@ -4727,7 +4711,7 @@ xfs_bmapi( | |||
4727 | xfs_btree_cur_t *cur; /* bmap btree cursor */ | 4711 | xfs_btree_cur_t *cur; /* bmap btree cursor */ |
4728 | xfs_fileoff_t end; /* end of mapped file region */ | 4712 | xfs_fileoff_t end; /* end of mapped file region */ |
4729 | int eof; /* we've hit the end of extents */ | 4713 | int eof; /* we've hit the end of extents */ |
4730 | xfs_bmbt_rec_t *ep; /* extent record pointer */ | 4714 | xfs_bmbt_rec_host_t *ep; /* extent record pointer */ |
4731 | int error; /* error return */ | 4715 | int error; /* error return */ |
4732 | xfs_bmbt_irec_t got; /* current file extent record */ | 4716 | xfs_bmbt_irec_t got; /* current file extent record */ |
4733 | xfs_ifork_t *ifp; /* inode fork pointer */ | 4717 | xfs_ifork_t *ifp; /* inode fork pointer */ |
@@ -5378,7 +5362,7 @@ xfs_bunmapi( | |||
5378 | xfs_btree_cur_t *cur; /* bmap btree cursor */ | 5362 | xfs_btree_cur_t *cur; /* bmap btree cursor */ |
5379 | xfs_bmbt_irec_t del; /* extent being deleted */ | 5363 | xfs_bmbt_irec_t del; /* extent being deleted */ |
5380 | int eof; /* is deleting at eof */ | 5364 | int eof; /* is deleting at eof */ |
5381 | xfs_bmbt_rec_t *ep; /* extent record pointer */ | 5365 | xfs_bmbt_rec_host_t *ep; /* extent record pointer */ |
5382 | int error; /* error return value */ | 5366 | int error; /* error return value */ |
5383 | xfs_extnum_t extno; /* extent number in list */ | 5367 | xfs_extnum_t extno; /* extent number in list */ |
5384 | xfs_bmbt_irec_t got; /* current extent record */ | 5368 | xfs_bmbt_irec_t got; /* current extent record */ |
@@ -6004,7 +5988,7 @@ xfs_bmap_isaeof( | |||
6004 | { | 5988 | { |
6005 | int error; /* error return value */ | 5989 | int error; /* error return value */ |
6006 | xfs_ifork_t *ifp; /* inode fork pointer */ | 5990 | xfs_ifork_t *ifp; /* inode fork pointer */ |
6007 | xfs_bmbt_rec_t *lastrec; /* extent record pointer */ | 5991 | xfs_bmbt_rec_host_t *lastrec; /* extent record pointer */ |
6008 | xfs_extnum_t nextents; /* number of file extents */ | 5992 | xfs_extnum_t nextents; /* number of file extents */ |
6009 | xfs_bmbt_irec_t s; /* expanded extent record */ | 5993 | xfs_bmbt_irec_t s; /* expanded extent record */ |
6010 | 5994 | ||
@@ -6048,7 +6032,7 @@ xfs_bmap_eof( | |||
6048 | xfs_fsblock_t blockcount; /* extent block count */ | 6032 | xfs_fsblock_t blockcount; /* extent block count */ |
6049 | int error; /* error return value */ | 6033 | int error; /* error return value */ |
6050 | xfs_ifork_t *ifp; /* inode fork pointer */ | 6034 | xfs_ifork_t *ifp; /* inode fork pointer */ |
6051 | xfs_bmbt_rec_t *lastrec; /* extent record pointer */ | 6035 | xfs_bmbt_rec_host_t *lastrec; /* extent record pointer */ |
6052 | xfs_extnum_t nextents; /* number of file extents */ | 6036 | xfs_extnum_t nextents; /* number of file extents */ |
6053 | xfs_fileoff_t startoff; /* extent starting file offset */ | 6037 | xfs_fileoff_t startoff; /* extent starting file offset */ |
6054 | 6038 | ||
@@ -6495,10 +6479,9 @@ xfs_bmap_count_leaves( | |||
6495 | int *count) | 6479 | int *count) |
6496 | { | 6480 | { |
6497 | int b; | 6481 | int b; |
6498 | xfs_bmbt_rec_t *frp; | ||
6499 | 6482 | ||
6500 | for (b = 0; b < numrecs; b++) { | 6483 | for (b = 0; b < numrecs; b++) { |
6501 | frp = xfs_iext_get_ext(ifp, idx + b); | 6484 | xfs_bmbt_rec_host_t *frp = xfs_iext_get_ext(ifp, idx + b); |
6502 | *count += xfs_bmbt_get_blockcount(frp); | 6485 | *count += xfs_bmbt_get_blockcount(frp); |
6503 | } | 6486 | } |
6504 | return 0; | 6487 | return 0; |