All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH 3/3] mkfs: do not allow both "dev" and "name" subopts for log or realtime
Date: Tue, 2 Jan 2018 09:44:14 -0800	[thread overview]
Message-ID: <20180102174414.GC4857@magnolia> (raw)
In-Reply-To: <6ea46cfb-357b-17c4-fc5f-65598431526f@sandeen.net>

On Sun, Dec 24, 2017 at 11:12:13AM -0800, Eric Sandeen wrote:
> Today we can specify i.e. both logdev= and name= ;
> it works, with last-parsed-wins behavior:
> 
> mkfs.xfs -f -l logdev=/dev/sda1,name=/dev/sda2 /dev/sda3
> 
> Make these conflict to resolve ambiguity; do the same for
> the realtime subvol.
> 
> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

> ---
> 
> diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
> index 035af03..5ae67d5 100644
> --- a/mkfs/xfs_mkfs.c
> +++ b/mkfs/xfs_mkfs.c
> @@ -507,6 +507,7 @@ struct opt_params lopts = {
>  		},
>  		{ .index = L_DEV,
>  		  .conflicts = { { &lopts, L_AGNUM },
> +				 { &lopts, L_NAME },
>  				 { &lopts, L_INTERNAL },
>  				 { &lopts, LAST_CONFLICT } },
>  		  .defaultval = SUBOPT_NEEDS_VAL,
> @@ -529,6 +530,7 @@ struct opt_params lopts = {
>  		},
>  		{ .index = L_NAME,
>  		  .conflicts = { { &lopts, L_AGNUM },
> +				 { &lopts, L_DEV },
>  				 { &lopts, L_INTERNAL },
>  				 { &lopts, LAST_CONFLICT } },
>  		  .defaultval = SUBOPT_NEEDS_VAL,
> @@ -599,7 +601,8 @@ struct opt_params ropts = {
>  		  .defaultval = SUBOPT_NEEDS_VAL,
>  		},
>  		{ .index = R_DEV,
> -		  .conflicts = { { &ropts, LAST_CONFLICT } },
> +		  .conflicts = { { &ropts, R_NAME },
> +			         { &ropts, LAST_CONFLICT } },
>  		  .defaultval = SUBOPT_NEEDS_VAL,
>  		},
>  		{ .index = R_FILE,
> @@ -609,7 +612,8 @@ struct opt_params ropts = {
>  		  .conflicts = { { &ropts, LAST_CONFLICT } },
>  		},
>  		{ .index = R_NAME,
> -		  .conflicts = { { &ropts, LAST_CONFLICT } },
> +		  .conflicts = { { &ropts, R_DEV },
> +			         { &ropts, LAST_CONFLICT } },
>  		  .defaultval = SUBOPT_NEEDS_VAL,
>  		},
>  		{ .index = R_NOALIGN,
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2018-01-02 17:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-24 19:05 [PATCH 0/3] xfsprogs: misc xfsprogs cleanups Eric Sandeen
2017-12-24 19:09 ` [PATCH 1/3] mkfs: un-document removed logarithm based CLI options Eric Sandeen
2018-01-02 17:40   ` Darrick J. Wong
2017-12-24 19:10 ` [PATCH 2/3] mkfs: pass switch case value directly into getnum/getstr Eric Sandeen
2018-01-02 17:41   ` Darrick J. Wong
2017-12-24 19:12 ` [PATCH 3/3] mkfs: do not allow both "dev" and "name" subopts for log or realtime Eric Sandeen
2018-01-02 17:44   ` Darrick J. Wong [this message]

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=20180102174414.GC4857@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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.