summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-07-21build: rm `package.version` from Cargo.tomlThomas Mühlbacher
This sets the version, that can be read at build time using the environment variable `CARGO_PKG_VERSION`, to the default value (`0.0.0`). Setting `package.version` in the Cargo manifest is mandatory for publishing to crates.io. We're not publishing the crate currently, and there isn't an obvious case for doing so in the future that comes to mind. Our sources are not using the version from cargo currently. `clap` and some other dependencies may use them by default but still we don't use that version in any outputs. Therefore, we should be fine without it. Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-07-21chore: rm leftover gitignore entriesThomas Mühlbacher
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-07-20Rename option commandsKent Overstreet
set-option -> set-fs-option setattr -> set-file-option Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-07-20mount: Fall back to read-only on -EROFSKent Overstreet
this is the mount helper's job, and since we're the mount helper... fixes: xfstests generic/050 Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-07-18bump version to 1.9.5Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-07-18mount: Close devices before doing mountKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-07-18Update bcachefs sources to 1592eaa60418 bcachefs: Btree path tracepointsKent Overstreet
2024-07-17ci: bump upload-artifact actionAlexander Fougner
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2024-07-17ci: fix build for older debian depsAlexander Fougner
also drop ubuntu 20.04 from build matrix, include 24.04 instead which is soon to go stable. Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2024-07-15kill old python testsKent Overstreet
these were never used, kill a dependency Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-07-15logging: kill quiet optionv1.9.4Kent Overstreet
no logging by default, enabled with -v logging by default broke fstests Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-07-15update debian/ from upstreamKent Overstreet
'make deb' works Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-07-15cmd_set_option: Can now set device optionsKent Overstreet
This allows data_allowed (and others) to be set on an offline filesystem. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-07-15Update bcachefs sources to 4a7a003763f5 bcachefs: Opt_durability can now be ↵Kent Overstreet
set via bch2_opt_set_sb()
2024-07-14fix silly clippy warningKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-07-14mount: replace rpassword with rustix::termiosLauri Tirkkonen
because rpassword unconditionally open()s /dev/tty, it fails with ENXIO on the console without workarounds like busybox's cttyhack. in contrast, bcachefs unlock works fine on console, so change the passphrase prompt logic in mount to be closer to what it is in unlock. Signed-off-by: Lauri Tirkkonen <lauri@hacktheplanet.fi> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-07-14include debuginfo in bcachefs binary by defaultThomas Bertschinger
The debuginfo is used by the "bcachefs debug" and "bcachefs list_bkeys" commands. Rust 1.77 [1] changed Cargo's release profile to strip debuginfo by default, but we always want it included. [1] https://github.com/rust-lang/cargo/pull/13257 Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-07-14Update bcachefs sources to 4d1d53862afb bcachefs: show none if label is not setKent Overstreet
2024-07-12Update bcachefs sources to 47d1e7a86242 bcachefs: drop packed, aligned from ↵v1.9.3Kent Overstreet
bkey_inode_buf Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-07-12provide atomic64_try_cmpxchg() for 32bitKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-07-12add i686-linux to nix flakeKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-07-12raid/cpu: Use memcpy() instead of type punningTavian Barnes
The vendor may not be suitably aligned for uint32_t *. Signed-off-by: Tavian Barnes <tavianator@tavianator.com>
2024-07-05Update bcachefs sources to 2be6fc9b111c bcachefs: bch2_gc_btree() should not ↵Kent Overstreet
use btree_root_lock Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-06-29Merge pull request #309 from tmuehlbacher/improve-logging-exitingkoverstreet
Improve logging and exiting
2024-06-29Be explicit about which fsck implementation we're runningKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-06-28Update bcachefs sources to 9404a01d3dc5 bcachefs: Make read_only a mount ↵v1.9.2Kent Overstreet
option again, but hidden Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-06-29feat: use `ExitCode` over `std::process:exit()`Thomas Mühlbacher
Should provide us with better outputs on process failure, also makes unwinding better and is generally recommended over `exit()`. Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-06-28feat: add `--quiet` cli argumentThomas Mühlbacher
To silence log outputs on the CLI. Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-06-28feat: use env_loggerThomas Mühlbacher
Instead of the custom logger impl, which limits the features we can easily provide for users. This introduces the `BCACHEFS_LOG` environment variable for setting the log verbosity. Setting `BCACHEFS_LOG=trace`, e.g. in a test environment, will yield all log messages. Also I think it's reasonable to print INFO level logs by default. Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-06-28Merge pull request #305 from Artturin/use-ar-varkoverstreet
Use the AR variable in Makefile
2024-06-26feat(key): make `UnlockPolicy::Fail` more usefulThomas Mühlbacher
We already can check if an fs is encrypted with `bcachefs unlock -c`. With this option we can now instead check if we have a key but not actually mount by not specifying a mount point. e.g. ```sh if bcachefs mount -k fail "$blkdev"`; then echo "device is unlocked!" fi ``` Not sure what the original intent for this was. For scenarios where encryption is simply not supported on principle? Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-06-26refactor(key): split up unlocking functionsThomas Mühlbacher
This is more similar to the existing C code, which is already in nice small chunks. Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-06-26refactor: simplify branches for parsing devThomas Mühlbacher
Less repetition and no nested if/else. Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-06-26feat(mount): make unlock policy optional/explictThomas Mühlbacher
This changes the semantics of some arguments related to unlocking and slightly changes the unlocking logic. Also update help formatting/text. Instead of defaulting to `UnlockPolicy::Ask`, the argument becomes optional. That means if it is specified, the user really wants that specific policy. Similar to how `passphrase_file` also works. This also extends `UnlockPolicy` to override `isatty` detection. Fixes: #292 Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-06-26refactor(mount): rename `opt` => `cli`Thomas Mühlbacher
The term option is already used for mount options and the `Option` type. In other modules it's just called `cli`, so let's do that here as well. Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-06-26refactor: rm function param only used for log msgThomas Mühlbacher
We lose that bit of info but it's weird to require a parameter simply because we want to use it for a log message. Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-06-24Use the AR variable in MakefileArtturin
For cross-compiling
2024-06-20key: use c_long type for keyctl_search() helper fnDavid Disseldorp
The keyctl_search() C function returns a long, which is already reflected in the KeyHandle._id type. The search_keyring() helper function currently returns a Result<i64>, which breaks 32-bit builds for e.g. armv7l: error[E0308]: mismatched types --> src/key.rs:121:16 | 121 | Ok(key_id) | -- ^^^^^^ expected `i64`, found `i32` | | | arguments to this enum variant are incorrect ... error[E0308]: mismatched types --> src/key.rs:135:24 | 135 | _id: id, | ^^ expected `i32`, found `i64` Fix this by changing search_keyring() to return a Result<c_long>. Fixes: f72ded6a ("fix(key): search for key in all relevant keyrings") Signed-off-by: David Disseldorp <ddiss@suse.de> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-06-19v1.9.1v1.9.1Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-06-19Merge commit '41df701a089fbf19fe16d65fbb6df46854b1f3df' of ↵Kent Overstreet
https://github.com/tmuehlbacher/bcachefs-tools
2024-06-19update Cargo.lock versionKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-06-19Update version to 1.9.0v1.9.0Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-06-18fix(logger): log to stderrThomas Mühlbacher
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-06-18fix(key): search for key in all relevant keyringsThomas Mühlbacher
Previously, using `bcachefs unlock -k session` would still cause mount to ask for a passphrase. Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-06-18fix(key): remove any newlines from passphraseThomas Mühlbacher
To match the behavior of the C code and because there may be newlines under some conditions. Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-06-18chore(editorconfig): extend for sh scriptsThomas Mühlbacher
To match with what's already in the repo. Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-06-17Merge pull request #302 from koverstreet/update_flake_lock_actionkoverstreet
flake.lock: Update
2024-06-17flake.lock: Updategithub-actions[bot]
Flake lock file updates: • Updated input 'crane': 'github:ipetkov/crane/17d9e9dedd58dde2c562a4296934c6d6a0844534?narHash=sha256-hGLeRxSEeFz9WvmQ4s4AuMJ5InLSZvoczDdXkWSFi1A%3D' (2024-06-09) → 'github:ipetkov/crane/0095fd8ea00ae0a9e6014f39c375e40c2fbd3386?narHash=sha256-UKrfy/46YF2TRnxTtKCYzqf2f5ZPRRWwKCCJb7O5X8U%3D' (2024-06-15) • Updated input 'nixpkgs': 'github:nixos/nixpkgs/051f920625ab5aabe37c920346e3e69d7d34400e?narHash=sha256-4q0s6m0GUcN7q%2BY2DqD27iLvbcd1G50T2lv08kKxkSI%3D' (2024-06-07) → 'github:nixos/nixpkgs/e9ee548d90ff586a6471b4ae80ae9cfcbceb3420?narHash=sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY%3D' (2024-06-13) • Updated input 'treefmt-nix': 'github:numtide/treefmt-nix/4fc1c45a5f50169f9f29f6a98a438fb910b834ed?narHash=sha256-npYqVg%2BWk4oxnWrnVG7416fpfrlRhp/lQ6wQ4DHI8YE%3D' (2024-06-08) → 'github:numtide/treefmt-nix/68eb1dc333ce82d0ab0c0357363ea17c31ea1f81?narHash=sha256-ULzoKzEaBOiLRtjeY3YoGFJMwWSKRYOic6VNw2UyTls%3D' (2024-06-16)
2024-06-17Merge pull request #301 from tmuehlbacher/fix-nix-installkoverstreet
fix(nix): install paths from pkg-config properly
2024-06-17Update bcachefs sources to 792ca5ba3c9a bcachefs: kill key cache arg to ↵Kent Overstreet
bch2_assert_pos_locked()