summaryrefslogtreecommitdiff
path: root/c_src
AgeCommit message (Collapse)Author
19 hourscmd_list_journal: new optionsHEADmasterKent Overstreet
-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>
6 dayscmd_fsck: Online fsck can now specify a mountpointKent Overstreet
If the specified path is a directory, we'll try to run online fsck on the filesystem mounted at that path. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 dayscmd_image_createKent Overstreet
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>
11 dayscmd_strip_allocKent Overstreet
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>
11 daysbch2_format_for_device_add()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-06-13cmd_list_journal: More filtering tweaksKent Overstreet
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>
2025-06-07cmd_list_journal: Fix assertion popKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-06-07cmd_device: Device add now updates blkid cacheKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-06-05cmd_fsck: -p is also a noopKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-06-05cmd_fsck: make sure to modprobe if we might need kernel fsckKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-06-02cmd_list_journal: Improved matchingKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-06-01cmd_list_journal: Improved matchingKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-05-28cmd_fs_top(): skip non firing counters, add column for totalKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-05-25cmd_list_journal: handle jset_entries with bad lengthsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-05-25Fix infinite loop in cmd_list_journalKent Overstreet
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>
2025-05-21cmd_dump: Don't use noexcl by defaultKent Overstreet
This has been leading to too many people taking metadata dumps of rw mounted filesystems. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-05-15suppress warn_unused_resultKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-05-15Fix human readable units for compressed dataMark Bryars
It was forcing human readable units even without the -h flag, so use the functions that respect that configuration.
2025-05-08Update bcachefs sources to db6b78d0e5ef bcachefs: Extend bucket_size to 32 bitsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-05-08cmd_recover_super: Add a mode for recovering from another member deviceKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-05-08cmd_super.cKent Overstreet
Move some things out of cmd_format.c Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-05-03Set BCH_FEATURE_incompat_version_field if supportedKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
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-26copy_data should be staticKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-21format_opts.no_sb_at_endKent Overstreet
Add an option for controlling whether we create a third redundant superblock at the end of the device. For image files that are going to immediately be resized, we want to skip this. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-21linux shim: implement BLK_OPEN_CREATKent Overstreet
this allows O_CREAT to be passed through, for the new image creation tool. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-21fixup! posix_to_bcachefs: Process dirents in sorted orderKent Overstreet
2025-04-21Update bcachefs sources to c9d875f9be1f bcachefs: Casefold is now a regular ↵Kent Overstreet
opts.h option Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-21fd fixesKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-18format: Ensure we pick power of two bucket sizev1.25.2Kent Overstreet
Non power of two bucket sizes are allowed - but not preferred. We were accidentally picking bucket sizes that weren't blocksize aligned - ouch. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-17Update bcachefs sources to 65456ba56b93 bcachefs: Fix struct with flex ↵Kent Overstreet
member ABI warning
2025-04-15fixup! Add support for FS_IOC_GETFSSYSFSPATHKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-15Fix bchu_fs_open_by_dev()Kent Overstreet
- we can now correctly open by parsing sysfs, instead of falling back to reading the superblock and grabbing the UUID - non-UUID filesystem names now work Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-15cmd_migrate: adjust space reserved for new fs metadataKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-13Add support for FS_IOC_GETFSSYSFSPATHKent Overstreet
With single device mode we won't always show up in sysfs by UUID, but the new VFS ioctl handles this nicely. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-13Update bcachefs sources to 2f9361370129 bcachefs: Improve opts.degradedKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-13cmd_migrate: use correct bucket sizeKent Overstreet
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-04-13reshuffle device_cmds(), data_cmds()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-13cmd_format: --source, --no_initialize are incompatibleKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-13cmd_format: Don't initialize in verbose modeKent Overstreet
Verbose is excessive here. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-13cmd_format: make build_fs() staticKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-13posix_to_bcachefs: Process dirents in sorted orderKent Overstreet
This improves reproducability when producing images. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-03-31format: Ensure bcachefs module is loaded before checking versionKent Overstreet
this prevents accidentally formatting with a version unsupported by the running kernel Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-03-31bcachefs-tools: add fs_usage & return -EINVAL when no matching subcommandIntegral
Add the missing usage function for "fs" subcommand; when no matching subcommand exists, print the usage and return -EINVAL. Signed-off-by: Integral <integral@archlinuxcn.org> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-03-30list_journal: fix transaction filter extent matchingKent Overstreet
Giving a single pos for the transaction filter now correctly matches against extents. 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-28bcachefs-tools: hide FUSE in usage when BCACHEFS_FUSE disabledIntegral
When BCACHEFS_FUSE is disabled or not defined, FUSE section shouldn't be displayed in bcachefs usage (--help). Signed-off-by: Integral <integral@archlinuxcn.org> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>