-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check_for_key
before ask_for_passphrase
#263
check_for_key
before ask_for_passphrase
#263
Conversation
001e3bd
to
38b0cb7
Compare
What else were you going to do? |
Mostly just wanted to test it first. Works for me though (applied on tag v1.7.0). Also thought about maybe doing some refactoring but I'll just leave it for now. |
I would suggest moving the check for an existing key to the very beginning of the process. bcachefs-tools/src/commands/cmd_mount.rs Line 248 in 59e04dd
|
let's always first check if there is already a key in the keyring available before we try to get the key from some more involved means. Fixes: koverstreet#261 Signed-off-by: Thomas Mühlbacher <[email protected]>
38b0cb7
to
f76ad4d
Compare
causes mounting encrypted devices to become stuck in a busy loop.
Ok, now mounting encrypted devices should fully work again on master. 😁 |
@reedriley @codebam can you test this? NOTE: NixOS users can easily test the fix using a overlay to fetch this patch, as shown in JohnRTitor/nix-conf@b60df8a |
Tested and working on NixOS with rc7 Edit: works with 6.9 as well |
As I have stated in NixOS/nixpkgs#310504 (comment), the recent update to 6.9 stable kernel broke this on unencrypted systems, including in my own system. @codebam have already confirmed above that this patch works on 6.9 kernel for encrypted bcachefs partitions. and I confirm now too that this patch works on my system as well. @koverstreet could you please consider checking and merging this as soon as possible? |
What symptoms did your breakage have? Updating to 6.9 (rc6 in my case) took 2.5 hours to boot the first time for me; because the 1.7 disk format changes required running check_allocs and I had a large multi-disk setup. |
I had assumed that the bcachefs-tools in nixos-unstable should be fine to use currently thanks to @reedriley including my initial patch (thanks btw!). The second commit in this PR is only for a problem that affects master. I initially had issues with 6.9 that required fscks until including 6.9-rc6 but after that it worked on my systems. @JohnRTitor can you check if you also have an error logged when you use |
I do see these errors.
|
Moved temporarily to unstable to fix NixOS#313350 Also vendor the updated patch for NixOS#309388 from koverstreet/bcachefs-tools#263
@koverstreet @tmuehlbacher is this ready to be merged or blocked on something? |
It's good to merge as far as I am concerned. :) |
Well, the errors logged are not fatal, and does not affect this PR. The patch you provided still works as tested by me and others. |
Moved temporarily to unstable to fix #313350 Also vendor the updated patch for #309388 from koverstreet/bcachefs-tools#263
Moved temporarily to unstable to fix #313350 Also vendor the updated patch for #309388 from koverstreet/bcachefs-tools#263 (cherry picked from commit 1037866)
This is merged |
Can you join the IRC channel? I'll need a metadata dump to debug this, but if you can get me that it should be straightforward to see what's going on. I'm also debugging some issues in noradtux's filesystem right now that might also be related - dirent to missing inode |
You mean me? |
Yup, I'll be around |
Moved temporarily to unstable to fix NixOS#313350 Also vendor the updated patch for NixOS#309388 from koverstreet/bcachefs-tools#263
let's always first check if there is already a key in the keyring available before we try to get the key from some more involved means.
Fixes: #261