summaryrefslogtreecommitdiff
path: root/cmd_format.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2017-04-02 19:43:35 -0800
committerKent Overstreet <kent.overstreet@gmail.com>2017-04-02 19:43:35 -0800
commit2831b89a7c8ba9262a00ec6d70d1355c02f84a67 (patch)
treea5f853d851ccfa5f4141b0f8eaa682a0fb649cf7 /cmd_format.c
parent6d8881705872edbc2c8fe539312aa40eaa8f281d (diff)
More cmd_migrate improvements
Factor out bch2_pick_bucket_size() from the format code, and pick the bucket size before picking the superblock location - that way we can ensure the superblock gets its own bucket and doesn't trigger warnings due to the allocation code noticing different types of data in the same bucket.
Diffstat (limited to 'cmd_format.c')
-rw-r--r--cmd_format.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd_format.c b/cmd_format.c
index fbf8bddd..ae6dd33d 100644
--- a/cmd_format.c
+++ b/cmd_format.c
@@ -263,10 +263,10 @@ int cmd_format(int argc, char *argv[])
dev->fd = open_for_format(dev->path, force);
struct bch_sb *sb =
- bcache_format(opts, devices.item, darray_size(devices));
+ bch2_format(opts, devices.item, darray_size(devices));
if (!quiet)
- bcache_super_print(sb, HUMAN_READABLE);
+ bch2_super_print(sb, HUMAN_READABLE);
free(sb);
if (opts.passphrase) {
@@ -284,7 +284,7 @@ int cmd_show_super(int argc, char *argv[])
if (argc != 2)
die("please supply a single device");
- sb = bcache_super_read(argv[1]);
- bcache_super_print(sb, HUMAN_READABLE);
+ sb = bch2_super_read(argv[1]);
+ bch2_super_print(sb, HUMAN_READABLE);
return 0;
}