Re: [PATCH 2/2] ext4: clean up feature flag checking and usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux