Age | Commit message (Collapse) | Author |
|
Add our own version of 'qemu-img convert', which doesn't have the l1
table size limit or require fixing our missing reflink table.
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>
|
|
Fix a compatibility issue - old tools can now mount newer filesystems
with incompatible features, even if they can't do anything else with
them.
cmd_show_super now uses no_version_check as well.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
bch2_sb_to_text_with_names(): print device paths and models of each
member.
Fixes: https://github.com/koverstreet/bcachefs/issues/801
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Fix accidental splitbrain issues caused by writing to only some of a
filesystem's devices: now, all subcommands that take member devices will
scan for all members before opening.
Fixes: https://github.com/koverstreet/bcachefs/issues/924
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Pull out the code for scanning for component devices into a separate
module with a nicer interface.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Rust has this in the standard library - nice.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
New subcommand for scheduling or descheduling recovery passes on an
unmounted filesystem.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
This lets us print out a more useful error.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Add a tool for creating small image files.
Data is written out in a reproducible order, sequentially from the
start of the device.
Metadata is initially written to a temporary device, then after writing
out data, the metadata we want to keep (alloc info is left out by
default) is migrated to the real device.
Then, the image file is trimmed to minimum size and the temporary
metadata device dropped.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Add a command for stripping allocation info for a filesystem.
This is primarily to test codepaths used by the new image creation tool.
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>
|
|
New tool for scanning for backup superblocks, to recover when the
primary superblock + sb layout have been overwritten.
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>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
This requires something other than literally zero code to replace, but
is another opportunity to deny packagers the fun of experimenting with
replacing crate versions with incompatible patched crate versions.
|
|
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>
|
|
Ask for password via systemd-ask-password
|
|
Fixes Rust panics if some C command (like fsck) returns a value bigger
than 255. The process exit code will be mangled but what can we do, it's
less confusing than a panic (that unfortunately doesn't print the return
value).
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
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>
|
|
Same as it was in most previous releases. Without this, you may not see
any output for certain errors.
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
This mostly tries to be similar to the default `env_logger` format but
instead of using the more vague target in the log message, we instead
put the file name and line number in the log.
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
set-option -> set-fs-option
setattr -> set-file-option
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
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>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
because rpassword unconditionally open()s /dev/tty, it fails with ENXIO
on the console without workarounds like busybox's cttyhack. in contrast,
bcachefs unlock works fine on console, so change the passphrase prompt
logic in mount to be closer to what it is in unlock.
Signed-off-by: Lauri Tirkkonen <lauri@hacktheplanet.fi>
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>
|
|
We already can check if an fs is encrypted with `bcachefs unlock -c`.
With this option we can now instead check if we have a key but not
actually mount by not specifying a mount point. e.g.
```sh
if bcachefs mount -k fail "$blkdev"`; then
echo "device is unlocked!"
fi
```
Not sure what the original intent for this was. For scenarios where
encryption is simply not supported on principle?
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
|
|
This is more similar to the existing C code, which is already in nice
small chunks.
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>
|