mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-23 00:00:02 +03:00
BCACHEFS_KERNEL_ONLY
Add an environment variable that indicates we prefer to run bcachefs code in the kernel, not userspace - this is for the test environment where it's easier to debug kernel code. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
2b8a0f0caf
commit
52904aa886
@ -128,6 +128,9 @@ int cmd_format(int argc, char *argv[])
|
||||
bch2_cmdline_opts_get(&argc, argv, OPT_FORMAT);
|
||||
struct bch_opts fs_opts = bch2_parse_opts(fs_opt_strs);
|
||||
|
||||
if (getenv("BCACHEFS_KERNEL_ONLY"))
|
||||
initialize = false;
|
||||
|
||||
while ((opt = getopt_long(argc, argv,
|
||||
"-L:U:g:fqhv",
|
||||
format_opts,
|
||||
|
@ -171,6 +171,9 @@ int cmd_fsck(int argc, char *argv[])
|
||||
int opt, ret = 0;
|
||||
struct printbuf opts_str = PRINTBUF;
|
||||
|
||||
if (getenv("BCACHEFS_KERNEL_ONLY"))
|
||||
kernel = true;
|
||||
|
||||
append_opt(&opts_str, "degraded");
|
||||
append_opt(&opts_str, "fsck");
|
||||
append_opt(&opts_str, "fix_errors=ask");
|
||||
|
Loading…
Reference in New Issue
Block a user