From: Eric Sandeen <sandeen@sandeen.net>
To: Dave Chinner <david@fromorbit.com>, xfs@oss.sgi.com
Subject: Re: [PATCH 2/4] xfs: growfs not aware of sb_meta_uuid
Date: Mon, 03 Aug 2015 09:18:01 -0700 [thread overview]
Message-ID: <55BF9439.8010003@sandeen.net> (raw)
In-Reply-To: <1438587625-31437-3-git-send-email-david@fromorbit.com>
On 8/3/15 12:40 AM, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> Adding this simple change to xfstests:common/rc::_scratch_mkfs_xfs:
>
> + if [ $mkfs_status -eq 0 ]; then
> + xfs_admin -U generate $SCRATCH_DEV > /dev/null
> + fi
>
> triggers all sorts of errors in xfstests. xfs/104 is an example,
> where growfs fails with a UUID mismatch corruption detected by
> xfs_agf_write_verify() when trying to write the first new AG
> headers.
>
> Fix this problem by making sure we copy the sb_meta_uuid into new
> metadata written by growfs.
>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
Ok, at least this one has a plausible story; I did have this
in my tree, and must have somehow (re?)sent outdated patches. :(
Yeah, it was in all the series I sent up until the last re-send,
damn.
I'll re-check those prior patches against what we end up with,
to make sure everything is in sync.
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> ---
> fs/xfs/xfs_fsops.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
> index 9b3438a..ee3aaa0a 100644
> --- a/fs/xfs/xfs_fsops.c
> +++ b/fs/xfs/xfs_fsops.c
> @@ -250,7 +250,7 @@ xfs_growfs_data_private(
> agf->agf_freeblks = cpu_to_be32(tmpsize);
> agf->agf_longest = cpu_to_be32(tmpsize);
> if (xfs_sb_version_hascrc(&mp->m_sb))
> - uuid_copy(&agf->agf_uuid, &mp->m_sb.sb_uuid);
> + uuid_copy(&agf->agf_uuid, &mp->m_sb.sb_meta_uuid);
>
> error = xfs_bwrite(bp);
> xfs_buf_relse(bp);
> @@ -273,7 +273,7 @@ xfs_growfs_data_private(
> if (xfs_sb_version_hascrc(&mp->m_sb)) {
> agfl->agfl_magicnum = cpu_to_be32(XFS_AGFL_MAGIC);
> agfl->agfl_seqno = cpu_to_be32(agno);
> - uuid_copy(&agfl->agfl_uuid, &mp->m_sb.sb_uuid);
> + uuid_copy(&agfl->agfl_uuid, &mp->m_sb.sb_meta_uuid);
> }
>
> agfl_bno = XFS_BUF_TO_AGFL_BNO(mp, bp);
> @@ -309,7 +309,7 @@ xfs_growfs_data_private(
> agi->agi_newino = cpu_to_be32(NULLAGINO);
> agi->agi_dirino = cpu_to_be32(NULLAGINO);
> if (xfs_sb_version_hascrc(&mp->m_sb))
> - uuid_copy(&agi->agi_uuid, &mp->m_sb.sb_uuid);
> + uuid_copy(&agi->agi_uuid, &mp->m_sb.sb_meta_uuid);
> if (xfs_sb_version_hasfinobt(&mp->m_sb)) {
> agi->agi_free_root = cpu_to_be32(XFS_FIBT_BLOCK(mp));
> agi->agi_free_level = cpu_to_be32(1);
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2015-08-03 16:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-03 7:40 [PATCH 0/4] xfs: sb_meta_uuid fixes Dave Chinner
2015-08-03 7:40 ` [PATCH 1/4] xfs: fix sb_meta_uuid usage Dave Chinner
2015-08-03 16:12 ` Eric Sandeen
2015-08-03 16:27 ` Eric Sandeen
2015-08-03 7:40 ` [PATCH 2/4] xfs: growfs not aware of sb_meta_uuid Dave Chinner
2015-08-03 16:18 ` Eric Sandeen [this message]
2015-08-03 7:40 ` [PATCH 3/4] xfs: log recovery needs to validate against sb_meta_uuid Dave Chinner
2015-08-03 16:41 ` Eric Sandeen
2015-08-03 21:42 ` Eric Sandeen
2015-08-03 7:40 ` [PATCH 4/4] xfs: dquots should be stamped with sb_meta_uuid Dave Chinner
2015-08-03 16:23 ` Eric Sandeen
2015-08-03 16:26 ` Eric Sandeen
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=55BF9439.8010003@sandeen.net \
--to=sandeen@sandeen.net \
--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