6 #include "libbcachefs/bcachefs_ioctl.h"
9 #include "libbcachefs.h"
11 static void data_rereplicate_usage(void)
13 puts("bcachefs data rereplicate\n"
14 "Usage: bcachefs data rereplicate filesystem\n"
16 "Walks existing data in a filesystem, writing additional copies\n"
17 "of any degraded data\n"
20 " -h, --help display this help and exit\n"
21 "Report bugs to <linux-bcache@vger.kernel.org>");
25 int cmd_data_rereplicate(int argc, char *argv[])
29 while ((opt = getopt(argc, argv, "h")) != -1)
32 data_rereplicate_usage();
36 char *fs_path = arg_pop();
38 die("Please supply a filesystem");
41 die("too many arguments");
43 return bchu_data(bcache_fs_open(fs_path), (struct bch_ioctl_data) {
44 .op = BCH_DATA_OP_REREPLICATE,