Age | Commit message (Collapse) | Author |
|
This lets us print out a more useful error.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Currently, when no targets are provided for "bcachefs subvolume create" or
"bcachefs subvolume delete", it will exit silently with code 0. Make targets
(arguments) required to solve this problem.
This patch solves issue https://github.com/koverstreet/bcachefs/issues/766.
Signed-off-by: Integral <integral@archlinuxcn.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
This fixes the migrate test - we need to handle the sb=# option.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
According to the MSRV in Cargo.toml, we can use this now.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
mount: print a helpful error message
|
|
Signed-off-by: Malte Schröder <malte.schroeder@tnxip.de>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Just returning a failure exit status makes it hard to tell what the
actual issue was. Instead, the mount command now also provides some
textual output.
See https://github.com/koverstreet/bcachefs-tools/issues/308 for an
example where mount does not provide any helpful output, even with
BCACHEFS_LOG=trace enabled.
Signed-off-by: Florian Schmaus <flo@geekplace.eu>
|
|
This causes xfstests generic/741 to pass
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
When mounting a multi device filesystem we have to scan for component
devices from the UUID, but we don't want to scan if it's a single device
filesystem; if the same filesystem is exposed via multiple device nodes
(e.g. dm faulty testing), the scan can pick up the wrong node.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
This would allow to supply the password via the plymouth password input.
If systemd-ask-password does not exist or fails to start, falls back to
the old-style password request.
Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
this is the mount helper's job, and since we're the mount helper...
fixes: xfstests generic/050
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
no logging by default, enabled with -v
logging by default broke fstests
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Should provide us with better outputs on process failure, also makes
unwinding better and is generally recommended over `exit()`.
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
To silence log outputs on the CLI.
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
Instead of the custom logger impl, which limits the features we can
easily provide for users.
This introduces the `BCACHEFS_LOG` environment variable for setting the
log verbosity. Setting `BCACHEFS_LOG=trace`, e.g. in a test environment,
will yield all log messages.
Also I think it's reasonable to print INFO level logs by default.
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
Less repetition and no nested if/else.
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
This changes the semantics of some arguments related to unlocking and
slightly changes the unlocking logic. Also update help formatting/text.
Instead of defaulting to `UnlockPolicy::Ask`, the argument becomes
optional. That means if it is specified, the user really wants that
specific policy. Similar to how `passphrase_file` also works.
This also extends `UnlockPolicy` to override `isatty` detection.
Fixes: #292
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
The term option is already used for mount options and the `Option` type.
In other modules it's just called `cli`, so let's do that here as well.
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
We lose that bit of info but it's weird to require a parameter simply
because we want to use it for a log message.
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
Which is probably not the case when you want to create a subvolume in
that path.
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
`Path::parent()` returns `Some("")` for relative paths with a single
component. The simplest fix is to just canonicalize the paths first.
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
fix: evaluate KeyHandle Result
|
|
Prefer using `ptr::addr_of!()` and `pointer::cast()` instead of raw `as`
where clippy complains and other type casting lints.
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
This one is sort of bad to have missed, ouch.
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
- Introduce `KeyHandle` and `Passphrase` types
- Refactor the functions into associated functions
- Add `zeroizing` crate to handle passphrase memory safely
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
`bch2_sb_is_encrypted_and_locked()` simply does not check if the fs is
locked. The name is misleading.
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Note that we're using struct/enum align options, which require nightly.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
let's always first check if there is already a key in the keyring
available before we try to get the key from some more involved means.
Fixes: #261
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
Only bkeys of the specified type will be printed.
Also, this reworks the error type in bch_bindgen to be able to
represent other kinds of error than just "invalid btree id".
Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Signed-off-by: Tony Asleson <tasleson@redhat.com>
|
|
If the user passes a single device node during the mount and
we have no information for it in the udev db, we read up the
super block. When we do this, if the FS only has 1 block device
we will simply go ahead and do the mount instead of walking
all the block devices and reading up super blocks looking for
devices with a matching FS UUID.
Signed-off-by: Tony Asleson <tasleson@redhat.com>
|
|
Introduce an env. variable for users that have a broken blkid which
renders the udev db as incomplete. Only checks for the existence
of the variable, not its value.
Signed-off-by: Tony Asleson <tasleson@redhat.com>
|