From: Theodore Ts'o Date: Tue, 7 Aug 2012 17:46:13 +0000 (-0400) Subject: libext2fs: refactor the quota feature flag in the supported flags mask X-Git-Tag: v1.42.5.wc2~3 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=2aac47776f596b60f2bc515ae41a3363f6f249ea;p=tools%2Fe2fsprogs.git libext2fs: refactor the quota feature flag in the supported flags mask Handle EXT4_FEATURE_RO_COMPAT_QUOTA the same way we handle INCOMPAT features, so we don't have to have two definitions for EXT2_LIB_FEATURE_RO_COMPAT_SUPP depending on whether or not CONFIG_QUOTA is enabled or not. Signed-off-by: "Theodore Ts'o" --- diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h index e241183..9927875 100644 --- a/lib/ext2fs/ext2fs.h +++ b/lib/ext2fs/ext2fs.h @@ -572,6 +572,12 @@ typedef struct ext2_icount *ext2_icount_t; #define EXT4_LIB_INCOMPAT_MMP (0) #endif +#ifdef CONFIG_QUOTA +#define EXT4_LIB_RO_COMPAT_QUOTA EXT4_FEATURE_RO_COMPAT_QUOTA +#else +#define EXT4_LIB_RO_COMPAT_QUOTA (0) +#endif + #define EXT2_LIB_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE|\ EXT2_LIB_INCOMPAT_COMPRESSION|\ EXT3_FEATURE_INCOMPAT_JOURNAL_DEV|\ @@ -581,17 +587,7 @@ typedef struct ext2_icount *ext2_icount_t; EXT4_FEATURE_INCOMPAT_FLEX_BG|\ EXT4_LIB_INCOMPAT_MMP|\ EXT4_FEATURE_INCOMPAT_64BIT) -#ifdef CONFIG_QUOTA -#define EXT2_LIB_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER|\ - EXT4_FEATURE_RO_COMPAT_HUGE_FILE|\ - EXT2_FEATURE_RO_COMPAT_LARGE_FILE|\ - EXT4_FEATURE_RO_COMPAT_DIR_NLINK|\ - EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE|\ - EXT4_FEATURE_RO_COMPAT_GDT_CSUM|\ - EXT4_FEATURE_RO_COMPAT_BIGALLOC|\ - EXT4_FEATURE_RO_COMPAT_QUOTA|\ - EXT4_FEATURE_RO_COMPAT_METADATA_CSUM) -#else + #define EXT2_LIB_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER|\ EXT4_FEATURE_RO_COMPAT_HUGE_FILE|\ EXT2_FEATURE_RO_COMPAT_LARGE_FILE|\ @@ -599,8 +595,8 @@ typedef struct ext2_icount *ext2_icount_t; EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE|\ EXT4_FEATURE_RO_COMPAT_GDT_CSUM|\ EXT4_FEATURE_RO_COMPAT_BIGALLOC|\ + EXT4_LIB_RO_COMPAT_QUOTA|\ EXT4_FEATURE_RO_COMPAT_METADATA_CSUM) -#endif /* * These features are only allowed if EXT2_FLAG_SOFTSUPP_FEATURES is passed