aboutsummaryrefslogtreecommitdiffstats
path: root/utils.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-03-23 19:20:37 +0100
committerDavid Sterba <dsterba@suse.cz>2015-04-07 19:24:35 +0200
commit7ea86ad28239cfb444cb13951bc536223c9d3da2 (patch)
tree2e20590b744cc79e6560554aa4572e050fb44029 /utils.h
parenta297698edce56d13628411203c7c9287c78ec990 (diff)
downloadbtrfs-progs-7ea86ad28239cfb444cb13951bc536223c9d3da2.tar.gz
btrfs-progs-7ea86ad28239cfb444cb13951bc536223c9d3da2.tar.xz
btrfs-progs-7ea86ad28239cfb444cb13951bc536223c9d3da2.zip
btrfs-progs: move feature parsing from mkfs to utils
We'll use them in convert as well. Move defines and the interface functions to utils.*. Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index 073632a..4903976 100644
--- a/utils.h
+++ b/utils.h
@@ -26,6 +26,11 @@
#define BTRFS_MKFS_SYSTEM_GROUP_SIZE (4 * 1024 * 1024)
#define BTRFS_MKFS_SMALL_VOLUME_SIZE (1024 * 1024 * 1024)
#define BTRFS_MKFS_DEFAULT_NODE_SIZE 16384
+#define BTRFS_MKFS_DEFAULT_FEATURES \
+ (BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF \
+ | BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA)
+
+#define BTRFS_FEATURE_LIST_ALL (1ULL << 63)
#define BTRFS_SCAN_MOUNTED (1ULL << 0)
#define BTRFS_SCAN_LBLKID (1ULL << 1)
@@ -80,6 +85,10 @@ void set_argv0(char **argv);
void units_set_mode(unsigned *units, unsigned mode);
void units_set_base(unsigned *units, unsigned base);
+void btrfs_list_all_fs_features(void);
+char* btrfs_parse_fs_features(char *namelist, u64 *flags);
+void btrfs_process_fs_features(u64 flags);
+
int make_btrfs(int fd, const char *device, const char *label,
char *fs_uuid, u64 blocks[6], u64 num_bytes, u32 nodesize,
u32 sectorsize, u32 stripesize, u64 features);