summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2017-06-13 15:52:54 -0800
committerKent Overstreet <kent.overstreet@gmail.com>2017-06-13 15:53:11 -0800
commit851e945db88322153df06bd8a9db506217a6029f (patch)
tree187499da1aff4068ffbb4caca33b65bab9fcd3ed
parent565b4a74d6c25c78b0d2b82d9529595fc6269308 (diff)
Update for sysfs changes
-rw-r--r--cmd_device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd_device.c b/cmd_device.c
index d45d18ba..dea375b3 100644
--- a/cmd_device.c
+++ b/cmd_device.c
@@ -246,9 +246,9 @@ int cmd_device_add(int argc, char *argv[])
dev_opts.fd = open_for_format(dev_opts.path, force);
format_opts.block_size =
- read_file_u64(fs.sysfs_fd, "block_size_bytes") >> 9;
+ read_file_u64(fs.sysfs_fd, "block_size") >> 9;
format_opts.btree_node_size =
- read_file_u64(fs.sysfs_fd, "btree_node_size_bytes") >> 9;
+ read_file_u64(fs.sysfs_fd, "btree_node_size") >> 9;
struct bch_sb *sb = bch2_format(format_opts, &dev_opts, 1);
free(sb);
@@ -284,7 +284,7 @@ int cmd_device_remove(int argc, char *argv[])
{ "help", 0, NULL, 'h' },
{ NULL }
};
- int opt, flags = 0;
+ int opt, flags = BCH_FORCE_IF_DEGRADED;
while ((opt = getopt_long(argc, argv, "fh", longopts, NULL)) != -1)
switch (opt) {