From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 1/4] xfs: Don't wrap growfs AGFL indexes
Date: Thu, 7 Apr 2016 16:50:43 -0700 [thread overview]
Message-ID: <20160407235043.GB1439@infradead.org> (raw)
In-Reply-To: <1459836310-12619-2-git-send-email-david@fromorbit.com>
On Tue, Apr 05, 2016 at 04:05:07PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> Commit 96f859d ("libxfs: pack the agfl header structure so
> XFS_AGFL_SIZE is correct") allowed the freelist to use the empty
> slot at the end of the freelist on 64 bit systems that was not
> being used due to sizeof() rounding up the structure size.
>
> This has caused versions of xfs_repair prior to 4.5.0 (which also
> has the fix) to report this as a corruption once the filesystem has
> been grown. Older kernels can also have problems (seen from a whacky
> container/vm management environment) mounting filesystems grown on a
> system with a newer kernel than the vm/container it is deployed on.
>
> To avoid this problem, change the initial free list indexes not to
> wrap across the end of the AGFL, hence avoiding the initialisation
> of agf_fllast to the last index in the AGFL.
I have to admit that it's been a while that I looked at the AGFL
code, but I simply don't understand what's happening in this patch.
Diff slightly reorder:
> - agf->agf_flfirst = 0;
> + agf->agf_flfirst = cpu_to_be32(1);
So flfirst moves from 0 to 1.
> - agf->agf_fllast = cpu_to_be32(XFS_AGFL_SIZE(mp) - 1);
> + agf->agf_fllast = 0;
And last from size - 1 to 0. In my naive reading this introduces
wrapping and doesn't remove it. What do I miss?
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2016-04-07 23:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-05 6:05 [PATCH 0/4] xfs: various fixes Dave Chinner
2016-04-05 6:05 ` [PATCH 1/4] xfs: Don't wrap growfs AGFL indexes Dave Chinner
2016-04-05 10:42 ` Carlos Maiolino
2016-04-07 23:50 ` Christoph Hellwig [this message]
2016-04-19 20:13 ` Eric Sandeen
2016-04-19 20:51 ` Darrick J. Wong
2016-04-19 22:30 ` Dave Chinner
2016-04-05 6:05 ` [PATCH 2/4] xfs: allocate log vector buffers outside CIL context lock Dave Chinner
2016-04-05 13:03 ` Carlos Maiolino
2016-04-05 6:05 ` [PATCH 3/4] xfs: byte range buffer dirty region tracking Dave Chinner
2016-04-05 6:05 ` [PATCH 4/4] xfs: reduce lock hold times in buffer writeback Dave Chinner
2016-04-05 13:19 ` Carlos Maiolino
2016-04-07 15:35 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160407235043.GB1439@infradead.org \
--to=hch@infradead.org \
--cc=david@fromorbit.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox