1722 Commits

Author SHA1 Message Date
Omar Pakker
e2e2cb034b
Implement From<bkey_s_c> trait for BkeySC
BkeySC currently implements a From trait for the bkey_i bindgen/C struct, but not its own direct counterpart; bkey_s_c.  
This implements the From trait for bkey_s_c as well.
2025-05-20 16:50:37 +02:00
Kent Overstreet
3139850c75 suppress warn_unused_result
Some checks failed
Nix Flake actions / nix-matrix (push) Has been cancelled
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 / ${{ matrix.name }} (${{ matrix.system }}) (push) Has been cancelled
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-05-15 17:58:36 -04:00
koverstreet
689239a4bb
Merge pull request #381 from darkskiez/master
Fix human readable units for compressed data
2025-05-15 16:53:34 -05:00
Mark Bryars
cea4d4dea3 Fix human readable units for compressed data
It was forcing human readable units even without the -h flag,
so use the functions that respect that configuration.
2025-05-15 22:55:50 +02:00
Kent Overstreet
968369e0da Update bcachefs sources to db6b78d0e5ef bcachefs: Extend bucket_size to 32 bits
Some checks failed
Nix Flake actions / nix-matrix (push) Has been cancelled
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 / ${{ matrix.name }} (${{ matrix.system }}) (push) Has been cancelled
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-05-08 14:37:46 -04:00
Kent Overstreet
723b9092ac cmd_recover_super: Add a mode for recovering from another member device
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-05-08 12:26:19 -04:00
Kent Overstreet
79ec3dd3e3 cmd_super.c
Move some things out of cmd_format.c

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-05-08 11:21:53 -04:00
Kent Overstreet
51315289f2 list: Allow for lookups within a particular snapshot
Some checks are pending
build / bcachefs-tools-deb (ubuntu-22.04) (push) Waiting to run
build / bcachefs-tools-deb (ubuntu-24.04) (push) Waiting to run
build / bcachefs-tools-rpm (push) Waiting to run
build / bcachefs-tools-msrv (push) Waiting to run
Nix Flake actions / nix-matrix (push) Waiting to run
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Blocked by required conditions
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-05-07 15:52:34 -04:00
Kent Overstreet
401a20ed98 Update bcachefs sources to b4927db2cdc7 bcachefs: bcachefs_metadata_version_fast_device_removal
Some checks failed
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-05-04 15:52:42 -04:00
Kent Overstreet
6e4bda5ad5 Set BCH_FEATURE_incompat_version_field if supported
Some checks are pending
build / bcachefs-tools-deb (ubuntu-22.04) (push) Waiting to run
build / bcachefs-tools-deb (ubuntu-24.04) (push) Waiting to run
build / bcachefs-tools-rpm (push) Waiting to run
build / bcachefs-tools-msrv (push) Waiting to run
Nix Flake actions / nix-matrix (push) Waiting to run
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Blocked by required conditions
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-05-03 16:27:03 -04:00
Kent Overstreet
8376810564 Update bcachefs sources to 5a0455ae19af bcachefs: bcachefs_metadata_version_snapshot_deletion_v2
Some checks are pending
build / bcachefs-tools-deb (ubuntu-22.04) (push) Waiting to run
build / bcachefs-tools-deb (ubuntu-24.04) (push) Waiting to run
build / bcachefs-tools-rpm (push) Waiting to run
build / bcachefs-tools-msrv (push) Waiting to run
Nix Flake actions / nix-matrix (push) Waiting to run
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Blocked by required conditions
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-05-02 15:47:44 -04:00
Kent Overstreet
a4babd1d64 fix fsck return code for in-kernel fsck
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-05-02 14:33:52 -04:00
koverstreet
4013ed4dfb
Merge pull request #378 from trougnouf/patch-1
Some checks failed
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
bcachefs-principles-of-operation.tex: fix slanted quotes in verbatim
2025-04-29 16:56:57 -05:00
Kent Overstreet
5f46c4b522 Don't use xclose() in splice_fd_to_stdinout()
Some checks failed
build / bcachefs-tools-deb (ubuntu-22.04) (push) Waiting to run
build / bcachefs-tools-deb (ubuntu-24.04) (push) Waiting to run
build / bcachefs-tools-rpm (push) Waiting to run
build / bcachefs-tools-msrv (push) Waiting to run
Nix Flake actions / nix-matrix (push) Waiting to run
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Blocked by required conditions
update-flake-lock / lockfile (push) Has been cancelled
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-29 13:33:29 -04:00
Kent Overstreet
2b226902f9 Update bcachefs sources to 9b4ab159abcd bcachefs: Read retries are after checksum errors now REQ_FUA
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-29 13:15:38 -04:00
Kent Overstreet
81a3e03b27 set version to 1.25.2
Some checks are pending
build / bcachefs-tools-deb (ubuntu-22.04) (push) Waiting to run
build / bcachefs-tools-deb (ubuntu-24.04) (push) Waiting to run
build / bcachefs-tools-rpm (push) Waiting to run
build / bcachefs-tools-msrv (push) Waiting to run
Nix Flake actions / nix-matrix (push) Waiting to run
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Blocked by required conditions
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-28 16:23:25 -04:00
Kent Overstreet
6d7b47685b Update bcachefs sources to f0ebca18293c bcachefs: bch2_fs_open() now takes a darray
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-28 15:31:43 -04:00
Kent Overstreet
0589d9f3c3 Update bcachefs sources to 6e73711dc355 bcachefs: Read retries are after checksum errors now REQ_FUA 2025-04-28 12:50:37 -04:00
Kent Overstreet
e00e83b84d copy_data should be static
Some checks are pending
build / bcachefs-tools-deb (ubuntu-22.04) (push) Waiting to run
build / bcachefs-tools-deb (ubuntu-24.04) (push) Waiting to run
build / bcachefs-tools-rpm (push) Waiting to run
build / bcachefs-tools-msrv (push) Waiting to run
Nix Flake actions / nix-matrix (push) Waiting to run
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Blocked by required conditions
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-26 21:20:08 -04:00
Benoit Brummer
4cd851a9f7
bcachefs-principles-of-operation.tex: fix slanted quotes in verbatim
This makes the lines

$ getfattr -d -m '^bcachefs\.' filename
$ getfattr -d -m '^bcachefs_effective\.' filename

copy-pastable. Otherwise they get compiled as

$ getfattr -d -m ’^bcachefs\.’ filename
$ getfattr -d -m ’^bcachefs_effective\.’ filename

in the pdf.
2025-04-23 21:50:30 +02:00
Kent Overstreet
2d61df8787 bindgen: blacklist bch_ioctl_data_event
Some checks failed
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
fix 32 bit build - the rust side doesn't use this type:

error: builder for '/nix/store/zpk4nnya8qmiwgylhv5q71887kqqyp4d-bcachefs-tools-i686-unknown-linux-gnu-1.25.1+3304c90.drv' failed with exit code 2;
       last 25 log lines:
       > error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
       >      --> /build/source/target/i686-unknown-linux-gnu/release/build/bch_bindgen-c913367861ffd851/out/bcachefs.rs:27492:1
       >       |
       > 27492 | pub struct bch_ioctl_data_event {
       >       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       >       |
       > note: `bch_ioctl_data_progress` has a `#[repr(align)]` attribute
       >      --> /build/source/target/i686-unknown-linux-gnu/release/build/bch_bindgen-c913367861ffd851/out/bcachefs.rs:27373:1
       >       |
       > 27373 | pub struct bch_ioctl_data_progress {
       >       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       > note: `bch_ioctl_data_event` contains a field of type `bch_ioctl_data_event__bindgen_ty_1`
       >      --> /build/source/target/i686-unknown-linux-gnu/release/build/bch_bindgen-c913367861ffd851/out/bcachefs.rs:27496:9
       >       |
       > 27496 |     pub __bindgen_anon_1: bch_ioctl_data_event__bindgen_ty_1,
       >       |         ^^^^^^^^^^^^^^^^
       > note: ...which contains a field of type `bch_ioctl_data_progress`
       >      --> /build/source/target/i686-unknown-linux-gnu/release/build/bch_bindgen-c913367861ffd851/out/bcachefs.rs:27501:9
       >       |
       > 27501 |     pub p: bch_ioctl_data_progress,
       >       |         ^
       >
       > For more information about this error, try `rustc --explain E0588`.
       > error: could not compile `bch_bindgen` (lib) due to 1 previous error
       > make: *** [Makefile:185: bcachefs] Error 101
       For full logs, run 'nix log /nix/store/zpk4nnya8qmiwgylhv5q71887kqqyp4d-bcachefs-tools-i686-unknown-linux-gnu-1.25.1+3304c90.drv'.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-22 08:05:59 -04:00
Kent Overstreet
3304c90bec format_opts.no_sb_at_end
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-21 18:46:30 -04:00
Kent Overstreet
fee67d807b linux shim: implement BLK_OPEN_CREAT
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-21 18:46:30 -04:00
Kent Overstreet
8fae948d60 fixup! posix_to_bcachefs: Process dirents in sorted order 2025-04-21 18:46:30 -04:00
Kent Overstreet
6a83d70ef5 Update bcachefs sources to c9d875f9be1f bcachefs: Casefold is now a regular opts.h option
Some checks are pending
build / bcachefs-tools-deb (ubuntu-22.04) (push) Waiting to run
build / bcachefs-tools-deb (ubuntu-24.04) (push) Waiting to run
build / bcachefs-tools-rpm (push) Waiting to run
build / bcachefs-tools-msrv (push) Waiting to run
Nix Flake actions / nix-matrix (push) Waiting to run
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Blocked by required conditions
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-21 15:47:15 -04:00
Kent Overstreet
98f2c06d41 fd fixes
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-21 14:32:50 -04:00
Kent Overstreet
8873eb1d0b Pull in unicode support from kernel
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-20 20:29:37 -04:00
Kent Overstreet
3b819fd0d7 Update bcachefs sources to 7307b739bbe5 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-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 / ${{ matrix.name }} (${{ matrix.system }}) (push) Has been cancelled
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-19 00:12:06 -04:00
koverstreet
d681613129
Merge pull request #376 from iav/debvers
add version change for debian package
2025-04-18 23:07:25 -05:00
Igor Velkov
5551e45735
add version change for debian package
fix wrong date format in previos deb version record

Signed-off-by: Igor Velkov <iav@iav.lv>
2025-04-19 03:34:52 +03:00
Kent Overstreet
dd2c7b9b89 format: Ensure we pick power of two bucket size
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>
v1.25.2
2025-04-18 17:24:19 -04:00
Kent Overstreet
05c6cb61f9 bindgen: blacklist bch2_prt_vprintf
Some checks failed
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
va_list isn't FFI-safe.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-17 12:51:03 -04:00
Kent Overstreet
0f59cc6a9e Update bcachefs sources to 65456ba56b93 bcachefs: Fix struct with flex member ABI warning 2025-04-17 12:51:03 -04:00
Kent Overstreet
28039ec698 fix cargo clippy list
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-17 12:33:34 -04:00
Kent Overstreet
642bc34abc fixup! Add support for FS_IOC_GETFSSYSFSPATH
Some checks failed
Nix Flake actions / nix-matrix (push) Has been cancelled
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 / ${{ matrix.name }} (${{ matrix.system }}) (push) Has been cancelled
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-15 12:01:13 -04:00
Kent Overstreet
0335994507 Fix bchu_fs_open_by_dev()
- 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-15 11:28:47 -04:00
Kent Overstreet
ae29e3069f cmd_migrate: adjust space reserved for new fs metadata
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-15 11:21:47 -04:00
koverstreet
bb0107dce7
Merge pull request #375 from xarblu/user-rustflags
Some checks are pending
build / bcachefs-tools-deb (ubuntu-22.04) (push) Waiting to run
build / bcachefs-tools-deb (ubuntu-24.04) (push) Waiting to run
build / bcachefs-tools-rpm (push) Waiting to run
build / bcachefs-tools-msrv (push) Waiting to run
Nix Flake actions / nix-matrix (push) Waiting to run
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Blocked by required conditions
Preserve RUSTFLAGS from environment
2025-04-14 14:15:55 -05:00
Xarblu
96e82871a4
Preserve RUSTFLAGS from environment
Since commit 3666da87f249b23b2c1f506e0d4157fd56c543e2
the Makefile fully replaced RUSTFLAGS which users might want
to modify e.g. to use other linkers via -Clinker=*
2025-04-14 20:20:20 +02:00
Kent Overstreet
c9ee646718 Add support for FS_IOC_GETFSSYSFSPATH
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-13 21:10:24 -04:00
Kent Overstreet
844721635c Update bcachefs sources to 2f9361370129 bcachefs: Improve opts.degraded
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-13 21:10:24 -04:00
Kent Overstreet
ad3875d1d9 cmd_migrate: use correct bucket size
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-13 21:10:24 -04:00
Kent Overstreet
e99da4dddb xclose()
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-13 21:10:24 -04:00
Kent Overstreet
7b35cb1e4a reshuffle device_cmds(), data_cmds()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-13 21:10:24 -04:00
Kent Overstreet
4f5dba7a87 cmd_format: --source, --no_initialize are incompatible
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-13 21:10:24 -04:00
Kent Overstreet
007d6654bc cmd_format: Don't initialize in verbose mode
Verbose is excessive here.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-13 10:14:23 -04:00
Kent Overstreet
bd3e0742af cmd_format: make build_fs() static
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-13 10:14:23 -04:00
koverstreet
de5af03b9d Merge pull request #372 from iav/set_deb_version
Add changelog record into debian package to set .deb v1.25.1
2025-04-13 10:13:49 -04:00
Kent Overstreet
3af7cf7550 Fix build with gcc 11
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-04-13 10:13:49 -04:00
Igor Velkov
32d4213924 Add changelog record into debian package to set .deb v1.25.1
Signed-off-by: Igor Velkov <iav@iav.lv>
2025-04-13 10:13:49 -04:00