All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Dave Chinner <david@fromorbit.com>
Cc: Andreas Dilger <adilger@dilger.ca>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 2/2] ext4: clean up feature flag checking and usage
Date: Sun, 4 Oct 2015 19:12:12 -0400	[thread overview]
Message-ID: <20151004231212.GD4442@thunk.org> (raw)
In-Reply-To: <20151003223609.GK3902@dastard>

On Sun, Oct 04, 2015 at 09:36:09AM +1100, Dave Chinner wrote:
> Rather than making it hard to use cscope/ctags to find the users of
> these feature flags, wouldn't it be better to turn this around the
> other way similar to the way XFS does this? i.e.:
> 
>  -	if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_FLEX_BG))
> +	if (ext4_has_feature_flex_bg(sb))
> 
> static inline ext4_has_feature_flex_bg(struct super_block *sb)
> {
> 	return EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_FLEX_BG);
> }
> 
> That way the code doing the feature checks is clear and concise, is
> much less shouty and it's not cluttered by whether features are in
> the incompat, ro or compat matrices. As a bonus, cscope still works
> just fine.

Nice suggestion, thanks!   I agree this would be better.

     		 	     	   	- Ted

      reply	other threads:[~2015-10-04 23:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-03  9:37 [PATCH 1/2] jbd2: clean up feature flag checking and usage Andreas Dilger
2015-10-03  9:37 ` [PATCH 2/2] ext4: " Andreas Dilger
2015-10-03 22:36   ` Dave Chinner
2015-10-04 23:12     ` Theodore Ts'o [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=20151004231212.GD4442@thunk.org \
    --to=tytso@mit.edu \
    --cc=adilger@dilger.ca \
    --cc=david@fromorbit.com \
    --cc=linux-ext4@vger.kernel.org \
    /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.