16 Commits

Author SHA1 Message Date
Kent Overstreet
d125e14f14 reconcile wait: kick reconcile
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-11-21 00:27:39 -05:00
Kent Overstreet
ceadc9b393 reconcile_wait: don't wait on pending by default
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-11-20 18:09:02 -05:00
Kent Overstreet
61d52f85f1 update reconcile_status() for separate data/metadata
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-11-17 10:23:52 -05:00
Kent Overstreet
63a9fe9b02 make reconcile_status less silly
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-11-13 14:49:48 -05:00
Kent Overstreet
0f78d027d3 New reconcile commands
- bcachefs reconcile status
- bcachefs reconcile wait

These obsolete the commands

- bcachefs data rereplicate
- bcachefs data drop_extra_replicas
- bcachefs data job drop_extra_replicas
- bcachefs data job migrate

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-11-12 17:54:30 -05:00
Manuel Mendez
d48719f752 c_src: Consistently use no_argument instead of 0 2025-10-07 16:23:06 -04:00
Manuel Mendez
7873eb976e c_src: Align and standardize help outputs
While adding scrub to data in last commit I noticed that the help output
where all over the place, both "physically" on the console and also
things like inconsistent case and newlines before "Report bugs to ...",
so I decided to fix all that up.
2025-10-07 16:22:50 -04:00
Manuel Mendez
eb75b55d59 cmd_data: Add scrub to help output 2025-10-07 16:19:13 -04:00
Kent Overstreet
145ffa823b Update bcachefs sources to b31b8a82b13e bcachefs: fix ctime update on unlink
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-10-06 17:18:03 -04:00
Kent Overstreet
4eefef7868 scrub: Return code now indicates corrected/uncorrected errors
Matches error codes of fsck for corrected/uncorrected errors.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-15 12:34:13 -04:00
Kent Overstreet
03d7318c31 cmd_data: scrub is bcachefs data scrub, not bcachefs data job scrub
Some checks failed
build / bcachefs-tools-deb (ubuntu-22.04) (push) Has been cancelled
build / bcachefs-tools-deb (ubuntu-24.04) (push) Has been cancelled
build / bcachefs-tools-rpm (push) Has been cancelled
build / bcachefs-tools-msrv (push) Has been cancelled
Nix Flake actions / nix-matrix (push) Has been cancelled
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Has been cancelled
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-07 16:22:38 -04:00
Kent Overstreet
e7cc6bb9cf getopt() -> getopt_long()
Kill all remaining getopt() uses - all options can now be passed as
longopts.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-04 12:47:30 -04:00
Kent Overstreet
e99da4dddb xclose()
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-04-13 21:10:24 -04:00
Kent Overstreet
7b35cb1e4a reshuffle device_cmds(), data_cmds()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-13 21:10:24 -04:00
Kent Overstreet
3fcc955d00 Scrub
Implement 'bcachefs data scrub', frontend for
BCH_IOCTL_DATA.BCH_DATA_OP_scrub.

Takes a path to a device, mountpoint, or filesystem uuid. Can be run on
a specific device by passing a device, or if run on a filesystem scrubs
all devices in parallel.

Metadata only scrubbing is supported via -m.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-02-03 14:08:49 -05:00
Thomas Bertschinger
f5baaf48e3 move Rust sources to top level, C sources into c_src
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>
2024-01-16 01:47:05 -05:00