Brian Foster
f68e0ed16e
libbcachefs: convert sb features mask to little endian
...
bch_sb.features is an array of __le64. Convert the native endian format
of the features mask appropriately. This causes a bcachefs format to
produce an unmountable fs when run from a big endian system.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-09-19 16:15:56 -04:00
Colin Gillespie
9fe08ba354
cmd_mount: request passphrase if the existing key is revoked
...
Signed-off-by: Colin Gillespie <colin@cgillespie.xyz>
2023-09-08 04:05:39 -04:00
Colin Gillespie
8d5e53b88a
cmd_set_passphrase: revoke the invalidated key
...
After setting a new passphrase, the previous key is left untouched. This
revokes the old key, preventing future actions from using it in error.
Signed-off-by: Colin Gillespie <colin@cgillespie.xyz>
2023-09-08 04:05:36 -04:00
Christopher James Halse Rogers
28e6dea653
cmd_mount: Fix test-only mount path
...
The comman line help claims that `bcachefs mount <DEV>` without a
mount point will do a dry-run mount - all the steps required to
mount the fs, but without actually doing the final real mount.
Make the code actually do this, rather than complain that you
haven't supplied a mountpoint if you don't provide a mountpoint
Signed-off-by: Christopher James Halse Rogers <raof@ubuntu.com>
2023-09-03 18:27:10 -04:00
Torge Matthies
e0e3032926
Fix one second delay when exiting
...
Signed-off-by: Torge Matthies <openglfreak@googlemail.com>
2023-09-01 17:51:31 +02:00
Kent Overstreet
63c8f14756
Update bcachefs sources to e7f6215768 bcachefs: Fix snapshot_skiplist_good()
2023-08-28 15:20:58 -04:00
Kent Overstreet
63747ac653
Fix null ptr deref in bbpos_parse()
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-08-22 15:45:35 -04:00
Kent Overstreet
54b6beabf0
Update bcachefs sources to bed61fae3b bcachefs: Delete a faulty assertion
2023-08-18 00:07:51 -04:00
Kent Overstreet
505c326cbe
Update bcachefs sources to a8115093df bcachefs: Fix divide by zero in rebalance_work()
2023-08-17 17:11:27 -04:00
Colin Gillespie
4d04fe4262
cmd_mount: use the correct keyring key type
...
Mount is checking for and adding encryption keys using the logon key
type instead of the user key type. This was causing it to not be able to
unlock volumes on its own, and ask for a passphrase on already unlocked
volumes.
Signed-off-by: Colin Gillespie <colin@cgillespie.xyz>
2023-08-12 12:06:24 -04:00
Kent Overstreet
f3976e3733
Update bcachefs sources to b0788c47d9 bcachefs: Fix check_version_upgrade()
2023-08-11 22:25:12 -04:00
Kent Overstreet
bcee0320dc
cmd_dump: Also set read_only
...
In nochanges mode, without read_only, we can go into a fake rw mode
where we allow writes but hold them in memory.
That's not what we want for the dump tool - this fixes a bug where btree
nodes don't always get dumped correctly.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-08-11 18:32:23 -04:00
Kent Overstreet
ae23e4541f
fuse: Set fsname correctly
...
Also, add helpers for the fuse.bcachefs filesystem type; this means we
can now test the fuse version with fstests.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-08-11 18:32:23 -04:00
Linus Heckemann
0de1fb41b7
cmd_mount: don't return 0 on mount failure
...
Signed-off-by: Linus Heckemann <git@sphalerite.org>
2023-08-10 11:01:24 -04:00
Kent Overstreet
9d26fad294
fuse: Update for snapshots
...
cmd_fusermount.c builds again
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-08-08 20:29:57 -04:00
Kent Overstreet
15b24c7327
Update bcachefs sources to 717b356d1d bcachefs: Convert journal validation to bkey_invalid_flags
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-08-06 13:08:36 -04:00
Alexander Fougner
caeeba5152
ci: set and verify MSRV
...
To prevent uncontrolled usage of new rust features, directly or from
dependencies, set a minimum supported Rust version and verify it builds.
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-08-04 20:13:38 +02:00
Alexander Fougner
a3087defd8
Remove sparse protocol envvar
...
Default as of rust 1.70
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-08-04 20:13:38 +02:00
Kent Overstreet
8885dbe8df
cmd_dump: Making dumping the entire journal the default
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-08-03 17:20:13 -04:00
Kent Overstreet
bafc817a3f
Update bcachefs sources to 5b8c4a1366 bcachefs: bcachefs_metadata_version_deleted_inodes
2023-08-03 13:26:22 -04:00
Kent Overstreet
87179c7a6e
Update bcachefs sources to 33a60d9b05 bcachefs: Assorted fixes for clang
2023-08-01 22:13:03 -04:00
Kent Overstreet
2d7982de78
cmd_list_journal: Tweak extent matching
...
Extents can now additionally be matched by the end position, the same as
normal keys.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-08-01 16:57:52 -04:00
Kent Overstreet
3e39c57c70
bpos_parse() now handles symbol constants
...
We can now parse U32_MAX/U64_MAX, as printed by bch2_bpos_to_text().
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-08-01 16:57:00 -04:00
Kent Overstreet
71ed9f183b
Run shrinkers when pthread_create fails
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-07-20 21:28:03 -04:00
Kent Overstreet
ded0160563
Update bcachefs sources to 4b5917839c bcachefs: Fix a null ptr deref in check_xattr()
2023-07-20 19:37:48 -04:00
Kent Overstreet
e8e60b982d
Fix 'bcachefs fsck -y'
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-07-20 18:11:51 -04:00
Kent Overstreet
44fc32e7ef
Update bcachefs sources to ee560a3929 bcachefs: Print version, options earlier in startup path
2023-07-20 18:09:44 -04:00
Alexander Fougner
a7b0ba44f0
ci: upgrade to checkout action v3
...
v2 is deprecated
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-07-20 22:27:56 +02:00
Jörg Thalheim
faec58a713
.gitignore: replace travis with github-ci config
2023-07-20 22:27:56 +02:00
Jörg Thalheim
2bbb23812c
add dependabot config to keep github ci actions up-to-date
2023-07-20 22:27:56 +02:00
Jörg Thalheim
73dd04c059
ci: unpin nix install url
...
I don't think we no longer need this and the install-nix-action
is not compatible with it.
2023-07-20 22:27:56 +02:00
Jörg Thalheim
23c2c8832a
ci: bump install-nix-action/cachix to fix nixos build
...
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2023-07-20 22:27:56 +02:00
Kent Overstreet
c8bec83e30
Update bcachefs sources to e14d7c7195 bcachefs: Compression levels
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-07-15 17:36:15 -04:00
Demi Marie Obenour
1c156d5c46
Add additional information about encryption
...
This adds additional details about how encryption works in
bcachefs, along with a warning regarding snapshots.
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
2023-07-10 16:03:30 -04:00
Kent Overstreet
ee1d223ab2
Update bcachefs sources to 04f2d2ae5b bcachefs: Fix build error on weird gcc
2023-07-10 15:57:09 -04:00
Kent Overstreet
21ae8a4b71
Update bcachefs sources to 070ec8d07b bcachefs: Snapshot depth, skiplist fields
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-07-10 14:27:14 -04:00
Kent Overstreet
73bf371f4c
Update bcachefs sources to fb39031ade bcachefs: bch2_sb_maybe_downgrade(), bch2_sb_upgrade()
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-07-10 12:34:08 -04:00
Kent Overstreet
ffa950ce1d
Update bcachefs sources to 1e3ca87f7b bcachefs: bcachefs_metadata_version_major_minor
2023-07-10 01:44:55 -04:00
Kent Overstreet
5d507f795b
Update bcachefs sources to da7d42a9a2 bcachefs: Add new assertions for shutdown path
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-07-09 15:25:40 -04:00
Kent Overstreet
c99a444c5c
Update bcachefs sources to 25de2b00dc bcachefs: Change check for invalid key types
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-07-07 04:25:07 -04:00
Kent Overstreet
619c99de4b
get_random_u32_below()
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-06-27 19:45:40 -04:00
Kent Overstreet
cfa816bf3f
Update bcachefs sources to 84f132d569 bcachefs: fsck: Break walk_inode() up into multiple functions
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-06-27 19:38:18 -04:00
Kent Overstreet
84cb7bffe5
Update bcachefs sources to bca25b802d fixup! bcachefs: Fix bch2_check_discard_freespace_key()
2023-06-18 16:20:01 -04:00
Kent Overstreet
4d185cfa51
Update bcachefs sources to 99175e5712 bcachefs: Fix bch2_check_discard_freespace_key()
2023-06-18 14:34:05 -04:00
Kent Overstreet
0708303f49
Switch to CLOCK_MONOTONIC_COARSE
...
CLOCK_MONOTONIC requires a syscall, and is much more expensive.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-06-18 14:32:28 -04:00
Jörg Thalheim
f9a366f9a6
build.nix: add instruction to keep cargoDeps hashes up-to-date
2023-06-16 14:02:17 +02:00
Jörg Thalheim
6a1ae0e91b
nix: replace deprecated cargo/rustc aliases with new version
2023-06-16 13:57:15 +02:00
Jörg Thalheim
c6a162e4b0
flake.lock: Update
...
This is needed so that nix-update can update cargo dependencies.
Flake lock file updates:
• Updated input 'nixpkgs':
'github:nixos/nixpkgs/b1f87ca164a9684404c8829b851c3586c4d9f089' (2023-02-25)
→ 'github:nixos/nixpkgs/0eeebd64de89e4163f4d3cf34ffe925a5cf67a05' (2023-06-12)
• Updated input 'utils':
'github:numtide/flake-utils/3db36a8b464d0c4532ba1c7dda728f4576d6d073' (2023-02-13)
→ 'github:numtide/flake-utils/a1720a10a6cfe8234c0e93907ffe81be440f4cef' (2023-05-31)
• Added input 'utils/systems':
'github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e' (2023-04-09)
2023-06-16 13:56:53 +02:00
Jörg Thalheim
9090bf3c36
fix reading keys from non-tty inputs
...
read_password_from_tty doesn't have a fallback if input is a pipe.
This makes scripting and integration testing harder.
Noticed while updating our nixos integration test.
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2023-06-15 19:11:54 +02:00
Jörg Thalheim
3ab89de5fa
flake.nix: add missing bindgen output hash
...
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2023-06-15 19:11:29 +02:00