From: Eric Sandeen <sandeen@sandeen.net>
To: xfs@oss.sgi.com
Subject: Re: [PATCH 3/3] xfs: test for valid remount options, error if not
Date: Mon, 15 Feb 2016 17:07:18 -0600 [thread overview]
Message-ID: <56C25A26.3030909@sandeen.net> (raw)
In-Reply-To: <20160215202521.GI14668@dastard>
On 2/15/16 2:25 PM, Dave Chinner wrote:
> I think hiding a goto like this is wrong - it forces you to go read
> the macro, making the code harder to read and follow. Really, what's
> wrong with the simple and obvious:
>
>
> if (bad option) {
> bad_option = "bad option string";
> goto out_warn;
> }
> .....
>
> out_warn:
> xfs_warn(mp, "%s options may not be changed via remount",
> bad_option);
> // free stuff
> return -EINVAL;
> }
>
> Yes, I know that this sort of logic flow hiding was done with the
> XFS_WANT_CORRUPTED macros, but they were written back in 90s on Irix
> when using macros to implement everything were all the rage.
Yeah, fair point, not sure why I did that ;) Old habits?
-Eric
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2016-02-15 23:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 23:36 [PATCH 0/3] xfs: mount option handling fixups Eric Sandeen
2016-02-10 23:38 ` [PATCH 1/3] xfs: convert mount option parsing to tokens Eric Sandeen
2016-02-15 18:54 ` Brian Foster
2016-02-15 21:20 ` [PATCH 1/3 V2] " Eric Sandeen
2016-02-17 16:54 ` Christoph Hellwig
2016-02-17 17:19 ` [PATCH 1/3 V3] " Eric Sandeen
2016-02-10 23:40 ` [PATCH 2/3] xfs: sanitize remount options Eric Sandeen
2016-02-15 18:54 ` Brian Foster
2016-02-17 4:29 ` [PATCH 2/3 V2] " Eric Sandeen
2016-02-17 16:55 ` Christoph Hellwig
2016-02-10 23:45 ` [PATCH 3/3] xfs: test for valid remount options, error if not Eric Sandeen
2016-02-15 18:54 ` Brian Foster
2016-02-15 20:25 ` Dave Chinner
2016-02-15 23:07 ` Eric Sandeen [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=56C25A26.3030909@sandeen.net \
--to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox