summaryrefslogtreecommitdiff
path: root/libbcachefs.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-03-21 16:12:26 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2021-03-21 16:21:51 -0400
commitd3dc47271bc7a82b96e6441129058831835c0677 (patch)
tree147a295b1f447c1ccbb0a0ad9ad0533da057e257 /libbcachefs.c
parent8a69e01aeb2fab6ca9a12cf11e7bad49951db4d4 (diff)
Add format options for --no-initialize and specifying the metadata version
These are only to be used for tests.
Diffstat (limited to 'libbcachefs.c')
-rw-r--r--libbcachefs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbcachefs.c b/libbcachefs.c
index 518c9624..9e7bc7d4 100644
--- a/libbcachefs.c
+++ b/libbcachefs.c
@@ -202,8 +202,8 @@ struct bch_sb *bch2_format(struct bch_opt_strs fs_opt_strs,
if (bch2_sb_realloc(&sb, 0))
die("insufficient memory");
- sb.sb->version = le16_to_cpu(bcachefs_metadata_version_current);
- sb.sb->version_min = le16_to_cpu(bcachefs_metadata_version_current);
+ sb.sb->version = le16_to_cpu(opts.version);
+ sb.sb->version_min = le16_to_cpu(opts.version);
sb.sb->magic = BCACHE_MAGIC;
sb.sb->block_size = cpu_to_le16(fs_opts.block_size);
sb.sb->user_uuid = opts.uuid;