From 2831b89a7c8ba9262a00ec6d70d1355c02f84a67 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sun, 2 Apr 2017 19:43:35 -0800 Subject: 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. --- cmd_format.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cmd_format.c') 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; } -- cgit v1.2.3