All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: 782012@bugs.debian.org, xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfs_db: disallow sb UUID write on v5 filesystems
Date: Tue, 7 Apr 2015 09:37:14 -0400	[thread overview]
Message-ID: <20150407133714.GE23208@bfoster.bfoster> (raw)
In-Reply-To: <5522A0DB.2010309@redhat.com>

On Mon, Apr 06, 2015 at 10:06:03AM -0500, Eric Sandeen wrote:
> Do not allow xfs_db (or the xfs_admin frontend) to change the UUID
> of a V5 filesystem; this will cause UUID mismatches across the
> filesystem, and we currently have no mechanism to update them all.
> Changing only the superblock UUID makes all other metadata look
> invalid, and xfs_repair reacts by junking everything.
> 
> Addresses-Debian-Bug: 782012
> Reported-by: F. Stoyan <fstoyan@swapon.de>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
> 
> diff --git a/db/sb.c b/db/sb.c
> index 6cb665d..f31f4a2 100644
> --- a/db/sb.c
> +++ b/db/sb.c
> @@ -363,6 +363,18 @@ uuid_f(
>  			return 0;
>  		}
>  
> +		/*
> +		* For now, changing the UUID of V5 superblock filesystems is
> +		* not supported; we do not have the infrastructure to fix all
> +		* other metadata when a new superblock UUID is generated.
> +		*/

Unaligned start of comment above. :) Otherwise looks fine to me:

Reviewed-by: Brian Foster <bfoster@redhat.com>

> +		if (xfs_sb_version_hascrc(&mp->m_sb) &&
> +		    strcasecmp(argv[1], "rewrite")) {
> +			dbprintf(_("%s: only 'rewrite' supported on V5 fs\n"),
> +				progname);
> +			return 0;
> +		}
> +
>  		if (!strcasecmp(argv[1], "generate")) {
>  			platform_uuid_generate(&uu);
>  		} else if (!strcasecmp(argv[1], "nil")) {
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2015-04-07 13:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-06 15:06 [PATCH] xfs_db: disallow sb UUID write on v5 filesystems Eric Sandeen
2015-04-07 13:37 ` Brian Foster [this message]
2015-04-07 13:58 ` [PATCH V2] " 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=20150407133714.GE23208@bfoster.bfoster \
    --to=bfoster@redhat.com \
    --cc=782012@bugs.debian.org \
    --cc=sandeen@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.