Re: REVIEW: Fix for incore extent corruption.

Eric Sandeen
2008-09-19T06:22:15Z

Lachlan McIlroy wrote:
> Here's a patch to remove xfs_iext_irec_compact_full() like Russell
> did in his original patch - are you guys happy with this?
>
> I'm putting it through it's paces now and so far it looks good.

I'll have to think more about it, honestly. Probably fine, but I've not
looked at all the surrounding code, I was so far just looking for the
original bug.

(FWIW, compact_full *does* get called reasonably frequently, but the
memmove case is what's hard to hit...)

-Eric

> --- a/fs/xfs/xfs_inode.c 2008-09-19 13:08:08.000000000 +1000
> +++ b/fs/xfs/xfs_inode.c 2008-09-19 13:16:34.000000000 +1000
> @@ -4157,7 +4166,7 @@ xfs_iext_indirect_to_direct(
> ASSERT(nextents <= XFS_LINEAR_EXTS);
> size = nextents * sizeof(xfs_bmbt_rec_t);
>
> - xfs_iext_irec_compact_full(ifp);
> + xfs_iext_irec_compact_pages(ifp);
> ASSERT(ifp->if_real_bytes == XFS_IEXT_BUFSZ);
>
> ep = ifp->if_u1.if_ext_irec->er_extbuf;

...