Whamcloud - gitweb
libext2fs: refactor the quota feature flag in the supported flags mask
authorTheodore Ts'o <tytso@mit.edu>
Tue, 7 Aug 2012 17:46:13 +0000 (13:46 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 7 Aug 2012 17:46:13 +0000 (13:46 -0400)
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" <tytso@mit.edu>
lib/ext2fs/ext2fs.h

index e241183..9927875 100644 (file)
@@ -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