Skip to content

Commit

Permalink
Be explicit about which fsck implementation we're running
Browse files Browse the repository at this point in the history
Signed-off-by: Kent Overstreet <[email protected]>
  • Loading branch information
Kent Overstreet committed Jun 29, 2024
1 parent 34b5654 commit 755788e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion c_src/cmd_fsck.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);

Expand All @@ -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;
Expand Down

0 comments on commit 755788e

Please sign in to comment.