All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfs_db: modify bad_features2 when modifying features2
Date: Wed, 2 Dec 2009 10:04:23 -0500	[thread overview]
Message-ID: <20091202150422.GA16338@infradead.org> (raw)
In-Reply-To: <4B156BE3.2080107@sandeen.net>

On Tue, Dec 01, 2009 at 01:17:55PM -0600, Eric Sandeen wrote:
> +	if (xfs_sb_has_mismatched_features2(&tsb)) {
> +		dbprintf(_("Superblock has mismatched features2 fields, "
> +			   "skipping modification\n"));
> +		return 0;
> +	}

However I'm not sure if this one is an all that good idea.  It'll make
all version updates fail if we have a mismatched features2.  That way
people can't use xfs_db to fix it up which seems odd.

To me just printing the warning but not aborting would be the best way
to inform the user about it.

> +
>  	if ((version & XFS_SB_VERSION_LOGV2BIT) &&
>  					!xfs_sb_version_haslogv2(&tsb)) {
>  		tsb.sb_logsunit = 1;
> @@ -564,7 +570,8 @@ do_version(xfs_agnumber_t agno, __uint16_t version, __uint32_t features)
>  
>  	tsb.sb_versionnum = version;
>  	tsb.sb_features2 = features;
> -	fields |= XFS_SB_VERSIONNUM | XFS_SB_FEATURES2;
> +	tsb.sb_bad_features2 = features;
> +	fields |= XFS_SB_VERSIONNUM | XFS_SB_FEATURES2 | XFS_SB_BAD_FEATURES2;

This one looks good to me.

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

  reply	other threads:[~2009-12-02 15:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-01 19:17 [PATCH] xfs_db: modify bad_features2 when modifying features2 Eric Sandeen
2009-12-02 15:04 ` Christoph Hellwig [this message]
2009-12-02 15:19   ` Eric Sandeen
2009-12-02 15:40     ` 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=20091202150422.GA16338@infradead.org \
    --to=hch@infradead.org \
    --cc=sandeen@sandeen.net \
    --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.