Commit Graph

1081 Commits

Author SHA1 Message Date
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
Kent Overstreet
ba88873432 Update bcachefs sources to 01d7ad6d95 bcachefs: snapshot_to_text() includes snapshot tree 2023-06-13 15:06:46 -04:00
Kent Overstreet
17d1c4f4fe Update bcachefs sources to ed6b7f81a7 six locks: Disable percpu read lock mode in userspace
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-06-10 22:15:00 -04:00
Kent Overstreet
7a66cf70c5 cmd_fs_usage: Implement --help
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-06-10 20:59:22 -04:00
Bernhard M. Wiedemann
f43c9702e0 Sort input file list
so that libbcachefs.so builds in a reproducible way
in spite of non-deterministic filesystem readdir order.

See https://reproducible-builds.org/ for why this is good.
2023-06-08 15:07:48 +02:00
Kent Overstreet
8642d4ae10 Update bcachefs sources to 7c0fe6f104 bcachefs: Fix bch2_fsck_ask_yn()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-06-04 18:10:29 -04:00
Kent Overstreet
1f78fed469 Update bcachefs sources to 31c09369cd six locks: Fix an unitialized var
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-05-25 22:25:34 -04:00
Kent Overstreet
b8b8dcfaed Update bcachefs sources to 799716df00 bcachefs: Delete an incorrect bch2_trans_unlock()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-05-19 09:50:24 -04:00
Kent Overstreet
5ef62f56ab Update bcachefs sources to 400f275d46 bcachefs: Fix check_overlapping_extents() 2023-05-13 00:13:57 -04:00
Kent Overstreet
6e89763956 Update bcachefs sources to 5074caad6a fixup! bcachefs: BTREE_ID_snapshot_tree 2023-05-08 04:20:52 -04:00
Kent Overstreet
c08971632c Update bcachefs sources to e990c131de fixup! bcachefs: BTREE_ID_snapshot_tree
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-05-08 03:43:26 -04:00
Kent Overstreet
6b1f79d5df Update bcachefs sources to 6a20aede29 bcachefs: Fix quotas + snapshots
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-05-02 00:41:47 -04:00
TruongSinh Tran-Nguyen
c1a8e27a3f chore(rust): add opt_get! and expose some FMODE_* as Rust const
In an effort to rewrite `bch2_read_super` from C to Rust,
it is neccessary to have `opt_get!` macro defined, and some
FMODE_* consts (defined as macro in `include/linux/blkdev.h`)
defined as Rust const.

Bindgen is currently unable to exapnd C functional macro [1],
this this commit use the workaround as introduced in [2].

[1] https://github.com/rust-lang/rust-bindgen/issues/753
[2] https://github.com/rust-lang/rust-bindgen/issues/753#issuecomment-608546390

Signed-off-by: TruongSinh Tran-Nguyen <i@truongsinh.pro>
2023-04-27 19:23:17 -04:00
TruongSinh Tran-Nguyen
9ee211eaca feat(cmd_mount): Add support for magic keyword OLD_BLKID_UUID
This commit enhances mount sub command by allowing it to accept
`OLD_BLKID_UUID=xxx` as the device, enabling whole fs mounting without relying
on colon-separated devices.

Using colon-separated devices in fstab is discouraged due to potential device
reference issues after reboot. Additionally, using `UUID=xxx` in fstab or with
`mount -t bcachefs` is currently infeasible as it depends on blkid, which prior
to v2.39, does not recognize bcachefs. This update enables mounting via fstab
using `OLD_BLKID_UUID=xxx` as obtained from `bcachefs show-super` "External
UUID".

Signed-off-by: TruongSinh Tran-Nguyen <i@truongsinh.pro>
2023-04-26 17:46:23 -04:00
TruongSinh Tran-Nguyen
47ec3ed6ed chore: logger for idiomatic style and expanded logging levels
Improve the Rust logger by adhering to idiomatic Rust conventions and
incorporating additional logging levels: warn, debug, and trace.

Signed-off-by: TruongSinh Tran-Nguyen <i@truongsinh.pro>
2023-04-26 17:46:23 -04:00
Mikulas Patocka
4f6b28f54f A small compile fix
Hi

Here I'm sending a small compile fix for bcachefs-tools.

Without this patch, I get this error:

cargo  build --release --manifest-path rust-src/Cargo.toml
   Compiling bch_bindgen v0.1.0
(/usr/src/git/bcachefs-tools/rust-src/bch_bindgen)
error: failed to run custom build command for `bch_bindgen v0.1.0
(/usr/src/git/bcachefs-tools/rust-src/bch_bindgen)`

Caused by:
  process didn't exit successfully:
`/usr/src/git/bcachefs-tools/rust-src/target/release/build/bch_bindgen-733e88995ce9eab7/build-script-build`
(exit status: 101)
  --- stderr
  warning: optimization flag '-fkeep-inline-functions' is not supported
[-Wignored-optimization-argument]
  ../../include/linux/bit_spinlock.h:20:3: error: call to undeclared
function 'futex'; ISO C99 and later do not support implicit function
declarations [-Wimplicit-function-declaration]
  ../../include/linux/bit_spinlock.h:28:2: error: call to undeclared
function 'futex'; ISO C99 and later do not support implicit function
declarations [-Wimplicit-function-declaration]
  ../../include/linux/bit_spinlock.h:39:2: error: call to undeclared
function 'futex'; ISO C99 and later do not support implicit function
declarations [-Wimplicit-function-declaration]

The futex() function is declared in
	/usr/include/x86_64-linux-gnu/urcu/futex.h
It is not declared in linux/futex.h, so we need to include urcu/futex.h

Mikulas

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-04-26 10:44:49 -04:00
Kent Overstreet
693e278c14 Update bcachefs sources to fd6fb298aa bcachefs: Make sure hash info gets initialized in fsck
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-04-25 14:35:59 -04:00
Kent Overstreet
fbe4e11c26 Update bcachefs sources to 2115a2ffde bcachefs: Kill bch2_verify_bucket_evacuated() 2023-04-21 04:02:48 -04:00
Kent Overstreet
0f37f9f05f Add a NO_RUST option
For systems without working rust/llvm/bindgen, add an option for
building without Rust. This will be less of an option in the future, as
more code gets rewritten in Rust.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-04-20 12:36:16 -04:00
Kent Overstreet
700afe1939 Delete pytest
These tests have never been useful; drop them.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2023-04-20 12:18:59 -04:00
Kent Overstreet
9690f78356 Update bcachefs sources to fd381c355c bcachefs: Fix a null ptr deref in fsck check_extents() 2023-04-16 21:50:37 -04:00
Kent Overstreet
42edda8db6 Update bcachefs sources to 22ccceee15 bcachefs: Fix a slab-out-of-bounds 2023-04-16 07:14:41 -04:00
Kent Overstreet
807b250927 Update bcachefs sources to 504729f99c bcachefs: Allow answering y or n to all fsck errors of given type
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-04-15 14:41:11 -04:00
Kent Overstreet
7f102ee83d Update bcachefs sources to 8fd009dd76 bcachefs: Rip out code for storing backpointers in alloc keys
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-03-31 18:02:57 -04:00
Kent Overstreet
d22c79d2ff Fix build dependencies
Incremental builds are fast again

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-03-19 15:32:43 -04:00
Alexander Fougner
eb13ae8d5e Add packaging workflow
Package and publish deb+rpm for easy testing

Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-03-19 19:24:28 +01:00
Kent Overstreet
ec28e6bfa2 Update bcachefs sources to 0342eebf85 bcachefs: Improve the backpointer to missing extent message 2023-03-15 08:59:01 -04:00
Kent Overstreet
fa35853772 Update bcachefs sources to 72405e7ff8 bcachefs: Fix bch2_check_extents_to_backpointers() 2023-03-14 12:56:38 -04:00
Alexander Fougner
46ba4fb48c Add manpage for mount command
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-03-08 21:00:51 +01:00
Alexander Fougner
84d11b8745 Remove cmd_assemble docs
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-03-08 21:00:51 +01:00
Kent Overstreet
d1def9a4b1 linux shim: Fix dropped O_DIRECT flag
A recent libbcachefs update accidentally committed a change that dropped
the O_DIRECT flag - we definitely didn't want to do that.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-03-08 10:30:16 -05:00
Eric Sandeen
3deb1e0b17 add rpm make target and fix up spec file
Add a new make target to build an rpm. This uses rpmbuild --build-in-place,
so no SRPM is created.

Also clean up the specfile to remove manually-added Requires: that will
be auto-generated, add a couple new BuildRequires: and use macros for
file locations.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
2023-03-08 10:26:44 -05:00
Alexander Fougner
ea8adaf1cc Update docs
- add some project info for the main readme
- migrate readmes to markdown for improved formatting
- The main binary now requires the Rust toolchain, so make note of it
  in the build instructions.

Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-03-07 12:46:53 -05:00