summaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-03-23 19:31:31 +0100
committerDavid Sterba <dsterba@suse.cz>2015-06-04 19:14:54 +0200
commitc9b73b702be71bbc1a3a815a745e6e4e57eadffc (patch)
tree67ed801e53dabf979a2c6eb0be34425aa02aaada /utils.h
parent11ddfeb2611011ee682d3d0482eeef3485dc136a (diff)
btrfs-progs: convert: allow to set filesystem features
Curretnly there are no features set for the converted filesystem and it's not possible to request it like in mkfs. Add new option -O|--features, use -O list-all to show all that are supported for convert. Note: from now on, convert without any -O option will use the same defaults as mkfs. The original behaviour was rather confusing. Convert is now more verbose about the parameters of the btrfs filesytem. Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index 871cbd8c..12923de8 100644
--- a/utils.h
+++ b/utils.h
@@ -30,6 +30,19 @@
(BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF \
| BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA)
+/*
+ * Avoid multi-device features (RAID56) and mixed block groups
+ */
+#define BTRFS_CONVERT_ALLOWED_FEATURES \
+ (BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF \
+ | BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL \
+ | BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO \
+ | BTRFS_FEATURE_INCOMPAT_COMPRESS_LZOv2 \
+ | BTRFS_FEATURE_INCOMPAT_BIG_METADATA \
+ | BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF \
+ | BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA \
+ | BTRFS_FEATURE_INCOMPAT_NO_HOLES)
+
#define BTRFS_FEATURE_LIST_ALL (1ULL << 63)
#define BTRFS_SCAN_MOUNTED (1ULL << 0)