summaryrefslogtreecommitdiff
path: root/c_src
AgeCommit message (Collapse)Author
2025-07-15posix_to_bcachefs: fix inode.bi_sectors updatesKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-15cmd_image_update: Fix truncate call at the start of updateKent Overstreet
We don't want to make the image smaller until we've finished updating. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-13fix fuse buildKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-13Merge pull request #391 from prey169/masterkoverstreet
Format filesystem with encryption using a passphase file
2025-07-12cmd_attr: Add --options=- and --remove-all to unset optionsJérôme Poulin
Signed-off-by: Jérôme Poulin <jeromepoulin@gmail.com>
2025-07-12cmd_image_updateKent Overstreet
New tool: 'bcachefs image update', for updating images produced by 'bcachefs image create': this tool will update images while making the minimal changes to the on disk image, to make tools like casync more efficient. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-12cmd_image: finish_image()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-12posix_to_bcachefs: create_or_update_link()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-12posix_to_bcachefs: cleanupKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-12posix_to_bcachefs: sync file data, not just copyKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-12posix_to_bcachefs: create_or_update_file()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-12posix_to_bcachefs: delete_non_matching_dirents()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-12cmd_image: hook up c->loglevelKent Overstreet
Quieter output. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-07cmd_image: Flush journal before moving btreeKent Overstreet
We need the key cache to be flushed before moving btree nodes - key cache flushing won't obey the target we're moving btree nodes to. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-07cmd_data: scrub is bcachefs data scrub, not bcachefs data job scrubKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-07bpos_parse(): parse symbolic constantsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-06bcachefs recovery-passesKent Overstreet
New subcommand for scheduling or descheduling recovery passes on an unmounted filesystem. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-06Add missing newline to bcachefs --helpKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-05cmd_migrate: Fix small UAFKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-04cmd_device_evacuate: --forceKent Overstreet
We now take the --force option, like set-state, if the array will become degraded. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-04getopt() -> getopt_long()Kent Overstreet
Kill all remaining getopt() uses - all options can now be passed as longopts. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-03Added the ability to format a filesystem with encryption, using a passphrase ↵prey169
key located within a file
2025-07-03kill_btree_node: We can now kill nodes on a specific deviceKent Overstreet
For improved btree node scan tests. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-02cmd_list_journal: By default, print all contiguous entriesKent Overstreet
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>
2025-06-30cmd_list_journal: new optionsKent 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>
2025-06-25cmd_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>
2025-06-20cmd_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>
2025-06-20cmd_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>
2025-06-20bch2_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>