Angelo Bulfone
4b97a99fa2
Allow block sizes smaller than backing medium
2025-08-27 18:47:54 -04:00
Kent Overstreet
9d90c968b1
Compat code for errmsg ioctls
...
Fall back to pre errmsg ioctls on old kernels.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-27 18:47:54 -04:00
Kent Overstreet
c12d7b3315
Commands called with no arguments now print usage
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-27 18:47:54 -04:00
Kent Overstreet
45b2f382db
errmsg_ioctl() - resize, resize_journal
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-18 13:04:19 -04:00
Kent Overstreet
760d43376c
errmsg_ioctl() - v2 ioctls that return error messages
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-18 12:55:28 -04:00
Kent Overstreet
ca482e7fd8
Update bcachefs sources to 62003adb7cbd bcachefs: Add v2 ioctls that return error strings
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-18 12:49:11 -04:00
Kent Overstreet
459060f763
nul-terminate readlink() output
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-18 11:57:37 -04:00
Kent Overstreet
53e144e93b
implement BCH_IOCTL_DISK_SET_STATE_v2
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-18 11:47:26 -04:00
Kent Overstreet
8c009da94e
cmd_fs_usage: Improve device summary
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-18 11:19:30 -04:00
Kent Overstreet
3b61ec3dba
replicas_summary_to_text()
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-18 11:06:49 -04:00
Kent Overstreet
c1c4d03aa6
cmd_fs_usage: Summary of replicas info
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-18 00:13:33 -04:00
Kent Overstreet
f968aa040b
dev_name.state
...
Get memebr state when we're getting device names.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-17 18:27:05 -04:00
Kent Overstreet
4226cd1854
bcachefs image create now takes --version
...
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-08-16 17:55:36 -04:00
Kent Overstreet
02f0965054
document bcachefs format --version
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-16 17:52:58 -04:00
Zoom
833b0acac7
Docs: setattr>set-file-option, line break in fs usage
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-12 21:23:49 -04:00
Kent Overstreet
530e8ade4e
device_scan now uses no_version_check
...
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
Fix a compatibility issue - old tools can now mount newer filesystems
with incompatible features, even if they can't do anything else with
them.
cmd_show_super now uses no_version_check as well.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-08 19:35:16 -04:00
Kent Overstreet
28db8e8e79
Update bcachefs sources to 8ffa87fa39d7 bcachefs: Fix journal stuck message
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-08 19:32:43 -04:00
Kent Overstreet
06c8b3dd63
cmd_fs_usage: BCH_DATA_unstriped isn't a real bucket type
...
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
BCH_DATA_unstriped tracks unstriped data in stripe member buckets, it
double counts a portion of BCH_DATA_stripe.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-06 13:09:03 -04:00
Kent Overstreet
6abef4e0ed
cmd_fs_usage: --fields, --all
...
Nix Flake actions / nix-matrix (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 / ${{ matrix.name }} (${{ matrix.system }}) (push) Has been cancelled
cmd_fs_usage now prints only base info by default, btree and device
accounting can be printed with flags
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-04 17:33:17 -04:00
Kent Overstreet
06e5ad9a7e
cmd_fs_usage: print bucket size
...
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
Also: fragmented now includes empty buckets (for BCH_DATA_stripe).
And some cleanup.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-03 17:21:37 -04:00
Kent Overstreet
6704e252ef
cmd_show_super: Look up and print names of member devices
...
bch2_sb_to_text_with_names(): print device paths and models of each
member.
Fixes: https://github.com/koverstreet/bcachefs/issues/801
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-02 13:22:13 -04:00
Kent Overstreet
6eda7d1831
get_or_split_cmdline_devs() now scans for component devices
...
Fix accidental splitbrain issues caused by writing to only some of a
filesystem's devices: now, all subcommands that take member devices will
scan for all members before opening.
Fixes: https://github.com/koverstreet/bcachefs/issues/924
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-01 18:35:33 -04:00
Kent Overstreet
e6a98de61a
Update bcachefs sources to 86a9bf9142f7 bcachefs: Read retries are after checksum errors now REQ_FUA
...
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-08-01 11:13:48 -04:00
Kent Overstreet
e0b9c3da02
document cmd_fsck --no-kernel
...
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-25 00:17:55 -04:00
Kent Overstreet
43bca0cd63
Enforce a soft minimum limit of 64k for bucket size
...
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 / ${{ matrix.name }} (${{ matrix.system }}) (push) Has been cancelled
Nix Flake actions / nix-matrix (push) Has been cancelled
< 64k buckets don't work reliably anymore, we deadlock in the journal
when we try to write too big of a journal entry.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-24 12:02:22 -04:00
Kent Overstreet
5023292623
bcachefs: Fixes for bucket size calculations
...
Nix Flake actions / nix-matrix (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 / ${{ matrix.name }} (${{ matrix.system }}) (push) Has been cancelled
Make sure bucket size >= btree_node_size when adding a device, and
cmd_image_update needs to make sure the metadata device is big enough
for the minimum number of buckets.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-20 22:48:44 -04:00
Kent Overstreet
11f3aee1e6
cmd_dump: --sanitize
...
build / bcachefs-tools-rpm (push) Has been cancelled
build / bcachefs-tools-deb (ubuntu-24.04) (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
update-flake-lock / lockfile (push) Has been cancelled
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-20 13:04:59 -04:00
Kent Overstreet
c00f25b3cc
cmd_dump: split out dump_fs()
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-20 12:21:03 -04:00
Kent Overstreet
191d5b4b09
ranges_sort()
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-20 11:56:42 -04:00
Kent Overstreet
fdf2819481
cmd_dump improvements
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-20 11:56:42 -04:00
Kent Overstreet
54be622b28
qcow2: Refactor to prep for sanitizing
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-20 11:56:42 -04:00
Kent Overstreet
2f28824c2b
qcow2: qcow2_write_(buf|ranges)
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-20 11:56:42 -04:00
Kent Overstreet
ffe083c31d
Fix clang build errors
...
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-17 17:38:44 -04:00
Kent Overstreet
ac9ca56637
posix_to_bcachefs: plumb verbosity
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-15 18:39:45 -04:00
Kent Overstreet
97b8348d28
posix_to_bcachefs: fix inode.bi_sectors updates
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-15 18:39:45 -04:00
Kent Overstreet
5f92627783
cmd_image_update: Fix truncate call at the start of update
...
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
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-15 16:54:11 -04:00
Kent Overstreet
36a3634c5e
fix fuse build
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-13 10:02:53 -04:00
koverstreet
73740b9cf2
Merge pull request #391 from prey169/master
...
Format filesystem with encryption using a passphase file
2025-07-13 08:05:00 -05:00
Jérôme Poulin
5dd10a17e9
cmd_attr: Add --options=- and --remove-all to unset options
...
Signed-off-by: Jérôme Poulin <jeromepoulin@gmail.com>
2025-07-12 22:20:17 -04:00
Kent Overstreet
3321afc8b6
cmd_image_update
...
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-12 19:49:55 -04:00
Kent Overstreet
c1a25673e9
cmd_image: finish_image()
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-12 19:49:41 -04:00
Kent Overstreet
d0e71900a3
posix_to_bcachefs: create_or_update_link()
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-12 19:49:41 -04:00
Kent Overstreet
b02c3e9682
posix_to_bcachefs: cleanup
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-12 19:49:41 -04:00
Kent Overstreet
c074341f16
posix_to_bcachefs: sync file data, not just copy
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-12 19:49:41 -04:00
Kent Overstreet
3830cc296a
posix_to_bcachefs: create_or_update_file()
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-12 19:49:41 -04:00
Kent Overstreet
6795cb6d0c
posix_to_bcachefs: delete_non_matching_dirents()
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-12 19:49:41 -04:00
Kent Overstreet
f9d8d2c51d
cmd_image: hook up c->loglevel
...
Quieter output.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-12 19:49:41 -04:00
Kent Overstreet
a0f12e09b6
cmd_image: Flush journal before moving btree
...
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-07 19:54:48 -04:00
Kent Overstreet
03d7318c31
cmd_data: scrub is bcachefs data scrub, not bcachefs data job scrub
...
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
39c00050d2
bpos_parse(): parse symbolic constants
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-07-07 16:14:18 -04:00