1912 Commits

Author SHA1 Message Date
Frederik Schwan
00ad9b1ed1 add dkms support
Some checks failed
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: Frederik Schwan <frederik@tty42.de>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-11 16:33:53 -04:00
Kent Overstreet
b271bb146e Version is now pulled from Cargo.toml
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-10 23:18:40 -04:00
Kent Overstreet
13c8026c10 cmd_list_journal: Transaction filtering now works correctly
Some checks failed
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
Previously, we'd skip all transactions after the first non-transaction
entry - oops.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-09 18:13:24 -04:00
Kent Overstreet
aa5bd95e3c Update bcachefs sources to 292344971769 bcachefs: Read retries are after checksum errors now REQ_FUA
Some checks failed
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
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-07 20:43:23 -04:00
koverstreet
aea2000239
Merge pull request #403 from koverstreet/update_flake_lock_action
flake.lock: Update
2025-09-07 20:39:08 -04:00
Kent Overstreet
1c551b0fbf fix shrinker_free()
Some checks failed
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-09-06 23:28:17 -04:00
Nikita Ofitserov
a1e870abb7 cmd_migrate: Prevent spurious "Superblock modified by another process" errors
This is only a workaround for the superblock writing process always reading back the
first sb in the layout and checking its sequence number.
Zeroing it out ensures a harmless warning instead of an error.

Signed-off-by: Nikita Ofitserov <himikof@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-06 17:56:19 -04:00
Nikita Ofitserov
b1021e7b39 cmd_migrate: Make fsck after migrate-superblock debug-only
There is no reason to run a fsck there for common use, as the FS is now
modified only by calling consistency-preserving APIs.

Also switch the debug-only fsck to nochanges mode for easier debugging.

Signed-off-by: Nikita Ofitserov <himikof@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-06 17:56:19 -04:00
Nikita Ofitserov
805319c0ef cmd_migrate: Open the device in exclusive mode for migrate-superblock
Signed-off-by: Nikita Ofitserov <himikof@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-06 17:56:19 -04:00
Nikita Ofitserov
85184478aa cmd_migrate: Small fixes
Ensure that the space for the future default sb layout is not used during the migration process.

Signed-off-by: Nikita Ofitserov <himikof@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-06 17:56:19 -04:00
Nikita Ofitserov
020763ad66 cmd_migrate: Reimplement cmd_migrate_superblock
Now the FS is first started RW, then new superblock is written and metadata updated.
This ensures that all recovery/upgrades/downgrades are performed at the beginning.

Signed-off-by: Nikita Ofitserov <himikof@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-06 17:56:19 -04:00
Nikita Ofitserov
277ddb57ef cmd_migrate: Introduce add_default_sb_layout helper
Signed-off-by: Nikita Ofitserov <himikof@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-06 17:56:19 -04:00
Nikita Ofitserov
ed95a9f311 cmd_migrate: Introduce mark_nouse_range helper
Signed-off-by: Nikita Ofitserov <himikof@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-06 17:56:19 -04:00
Kent Overstreet
31c7a7398a format: Do a 'udevadm trigger' after formatting
Some checks failed
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
This causes the new filesystem UUID to be picked up; without this, mount
can fail if it's a multidevice filesystem.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-06 01:43:44 -04:00
Kent Overstreet
e65dd86e41 bcachefs undump
Some checks failed
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
Add our own version of 'qemu-img convert', which doesn't have the l1
table size limit or require fixing our missing reflink table.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-01 15:11:56 -04:00
github-actions[bot]
3706007a81 flake.lock: Update
Flake lock file updates:

• Updated input 'crane':
    'github:ipetkov/crane/544d09fecc8c2338542c57f3f742f1a0c8c71e13?narHash=sha256-g5uP3jIj%2BSTUcfTJDKYopxnSijs2agRg13H0SGL5iE4%3D' (2025-07-19)
  → 'github:ipetkov/crane/25bd41b24426c7734278c2ff02e53258851db914?narHash=sha256-FCRRAzSaL/%2BumLIm3RU3O/%2BfJ2ssaPHseI2SSFL8yZU%3D' (2025-08-23)
• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/77826244401ea9de6e3bac47c2db46005e1f30b5?narHash=sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ%3D' (2025-07-01)
  → 'github:hercules-ci/flake-parts/af66ad14b28a127c5c0f3bbb298218fc63528a18?narHash=sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8%3D' (2025-08-06)
• Updated input 'flake-parts/nixpkgs-lib':
    'github:nix-community/nixpkgs.lib/14a40a1d7fb9afa4739275ac642ed7301a9ba1ab?narHash=sha256-urW/Ylk9FIfvXfliA1ywh75yszAbiTEVgpPeinFyVZo%3D' (2025-06-29)
  → 'github:nix-community/nixpkgs.lib/0f36c44e01a6129be94e3ade315a5883f0228a6e?narHash=sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA%3D' (2025-07-27)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/c87b95e25065c028d31a94f06a62927d18763fdf?narHash=sha256-NS6BLD0lxOrnCiEOcvQCDVPXafX1/ek1dfJHX1nUIzc%3D' (2025-07-19)
  → 'github:nixos/nixpkgs/d7600c775f877cd87b4f5a831c28aa94137377aa?narHash=sha256-tlOn88coG5fzdyqz6R93SQL5Gpq%2Bm/DsWpekNFhqPQk%3D' (2025-08-30)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/95719de18aefa63a624bf75a1ff98744b089ec12?narHash=sha256-qRRP3QavbwW0o%2BLOh31QNEfCgPlzK5SKlWALUJL6T7E%3D' (2025-07-20)
  → 'github:oxalica/rust-overlay/f46d294b87ebb9f7124f1ce13aa2a5f5acc0f3eb?narHash=sha256-ciwAdgtlAN1PCaidWK6RuWsTBL8DVuyDCGM%2BX3ein5Q%3D' (2025-08-31)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/421b56313c65a0815a52b424777f55acf0b56ddf?narHash=sha256-tzbhc4XttkyEhswByk5R38l%2BztN9UDbnj0cTcP6Hp9A%3D' (2025-07-20)
  → 'github:numtide/treefmt-nix/1aabc6c05ccbcbf4a635fb7a90400e44282f61c4?narHash=sha256-F1oFfV51AE259I85av%2BMAia221XwMHCOtZCMcZLK2Jk%3D' (2025-08-31)
2025-09-01 01:25:40 +00:00
Kent Overstreet
da8f1d04e3 Plumb subvol v2 ioctls with proper error messages
Some checks failed
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
update-flake-lock / lockfile (push) Has been cancelled
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-28 20:06:04 -04:00
Kent Overstreet
f296464b1c __errmsg_ioctl()
less macro-ing

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-28 20:06:04 -04:00
Kent Overstreet
a59519d72a Update bcachefs sources to f5a0255e6524 bcachefs: v2 versions of subvolume ioctls 2025-08-28 13:40:49 -04:00
Kent Overstreet
77ca58e3a7 posix_to_bcachefs.c: Use rhashtable for tracking hardlinks
Some checks failed
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
bcachefs uses 64 bit inode numbers by default, which overflow genradix
keys when we multiply the inode number by the object size for the actual
genradix lookup.

Switch to a rhashtable, and only index files that actually have
hardlinks.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-28 13:40:49 -04:00
NewbieOrange
34f9eeba1d mount: try to mount even if module is not loaded
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-27 19:22:37 -04:00
Kent Overstreet
90cbe3f3b4 Update bcachefs sources to 753b29cc7989 bcachefs: opts.data_allowed should be OPT_FORMAT 2025-08-27 18:47:54 -04:00
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
916b8959fe Update bcachefs sources to bd062cbcd84d bcachefs: Add v2 ioctls that return error strings 2025-08-18 13:02:45 -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
905297ad0f Update bcachefs sources to d863521e4078 bcachefs: BCH_IOCTL_DISK_SET_STATE_v2
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-18 00:17:11 -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
Some checks failed
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
6900dbe0a5 Logging: version_upgrade incompat->incompatible
Some checks failed
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-12 21:23:54 -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
Some checks failed
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
Some checks failed
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
Some checks failed
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
bf5ff08924 Update bcachefs sources to 933c0b52a810 bcachefs: error_throw counter 2025-08-03 21:33:32 -04:00
Kent Overstreet
06e5ad9a7e cmd_fs_usage: print bucket size
Some checks failed
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
59c53fff2d Update bcachefs sources to 62ab4bbc5290 bcachefs: bcachefs_metadata_version_extent_snapshot_whiteouts
Some checks failed
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-03 12:15:55 -04:00
Kent Overstreet
128e5e23d3 Update bcachefs sources to 68b6a68ecf72 bcachefs: bch2_fs_opt_version_init()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-08-02 21:12:25 -04:00
Kent Overstreet
a15e15326b Update bcachefs sources to fc21725d2621 workqueue: Basic memory allocation profiling support
Some checks failed
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
2025-08-02 15:06:19 -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