summaryrefslogtreecommitdiff
path: root/c_src/cmd_fsck.c
AgeCommit message (Collapse)Author
2025-05-02fix fsck return code for in-kernel fsckKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-29Don't use xclose() in splice_fd_to_stdinout()Kent Overstreet
The splice fd might have been closed, and a double-close here shouldn't be a concern because we're not doing any interesting multithreaded things and it's local to this function. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-28Update bcachefs sources to f0ebca18293c bcachefs: bch2_fs_open() now takes a ↵Kent Overstreet
darray Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-13xclose()Kent Overstreet
Add a helper to check for close errrors - especially bad file descriptors, that can be a fun source of heisenbugs. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-03-28cmd_fs_usage: Fix kernel version checkKent Overstreet
This needed an access() check, like the other uses, instead of exiting if it can't be read. Factor out a small common helper for this. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-03-26fsck: Kill -R, --reconstruct_allocKent Overstreet
We don't want users hitting this accidentally, and if needed for some strange reason (it shouldn't be), it can still be specified via -o. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-03-25Update bcachefs sources to 1392e502d48b bcachefs: Add an "ignore unknown" ↵Kent Overstreet
option to bch2_parse_mount_opts() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-03-19cmd_fsck: just exit if passed -aKent Overstreet
-a is used when called from system to mean "automatic invocation, run check only if you think you need it". Since we have self healing and online fsck, we never need run fsck automatically at boot time. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-11-28fix online fsck optionsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-10-20cmd_fsck: Add -K flag (don't run kernel fsck)Kent Overstreet
This was added previously, but not added to the getopt string. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-10-12cmd_fsck: Create loopback device for kernel fsck when necessaryKent Overstreet
fstests generic/648 now passes Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-08-09fsck: modprobe before doing version checkKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-06-29Be explicit about which fsck implementation we're runningKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-06-03Update bcachefs sources to f81dc88f0c80 bcachefs: bch2_btree_insert() - add ↵Kent Overstreet
btree iter flags Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-05-29cmd_fsck: Fix check for running online fsckKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-05-25check errno to determine fsck ioctl errorThomas Bertschinger
The error code is in errno, not the return value. Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-05-04BCACHEFS_KERNEL_ONLYKent Overstreet
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>
2024-04-25fix splice_fd_to_stdinout() when stdin is closedKent Overstreet
We need to check when stdin has been closed - otherwise we'll spin because select() will return immediately. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-02-17cmd_fsck: Collect return code of kernel fsck with close()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-02-13fix build on old gccv1.6.1Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-02-13fsck: Fall back to userland fsck when probed for kernel fsckv1.6Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-02-12fsck: Automatically use kernel fsck when better version matchKent Overstreet
To avoid expensive version upgrades and downgrades - use the kernel version of fsck when it's availale and a better match. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-16move Rust sources to top level, C sources into c_srcThomas Bertschinger
This moves the Rust sources out of rust_src/ and into the top level. Running the bcachefs executable out of the development tree is now: $ ./target/release/bcachefs command or $ cargo run --profile release -- command instead of "./bcachefs command". Building and installing is still: $ make && make install Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>