mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-04-01 00:00:03 +03:00
Be explicit about which fsck implementation we're running
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
34b5654d9e
commit
755788e2d6
@ -228,8 +228,10 @@ int cmd_fsck(int argc, char *argv[])
|
||||
darray_str devs = get_or_split_cmdline_devs(argc, argv);
|
||||
|
||||
darray_for_each(devs, i)
|
||||
if (dev_mounted(*i))
|
||||
if (dev_mounted(*i)) {
|
||||
printf("Running fsck online\n");
|
||||
return fsck_online(*i);
|
||||
}
|
||||
|
||||
int kernel_probed = kernel;
|
||||
if (kernel_probed < 0)
|
||||
@ -239,6 +241,7 @@ int cmd_fsck(int argc, char *argv[])
|
||||
struct printbuf parse_later = PRINTBUF;
|
||||
|
||||
if (kernel_probed) {
|
||||
printf("Running in-kernel offline fsck\n");
|
||||
struct bch_ioctl_fsck_offline *fsck = calloc(sizeof(*fsck) +
|
||||
sizeof(u64) * devs.nr, 1);
|
||||
|
||||
@ -260,6 +263,7 @@ int cmd_fsck(int argc, char *argv[])
|
||||
ret = splice_fd_to_stdinout(fsck_fd);
|
||||
} else {
|
||||
userland_fsck:
|
||||
printf("Running userspace offline fsck\n");
|
||||
ret = bch2_parse_mount_opts(NULL, &opts, &parse_later, opts_str.buf);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user