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.
Previously, we defaulted to only printing dirty journal entries (which
means nothing would be printed after a clean shutdown) - this is usually
not what we want.
Now, we default to printing the biggest range that has no gaps or
missing entries.
-a, --all
now means print all entries, not just contiguous entries
And we now have
-d, --dirty-only
for the the previous default behaviour.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-D, --datetime
Print out one line per journal entry, with datetime it was written
-L, --log-only
Only print entries containing log messages
-F, --flush-only
Only print flush commits
Additionally, we now print a line for missing journal entry ranges.
These make it easier to get an overall picture of what happened in the
journal - in particular, seeing how far back we can rewind before we
have gaps.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
New options:
-B: show blacklisted entries: previously show by default, but
highlighted
-l: Show log-only entries, i.e. recovery, snapshot deletion messages
-o: Print entry offset for each subentry
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
list_journal can print the entire contents of the journal, and non-dirty
entries don't get validated, so we have to account for that.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
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>
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>