diff options
| author | Chris Webb | 2021-11-04 21:03:16 +0000 |
|---|---|---|
| committer | Kent Overstreet | 2023-10-22 17:09:16 -0400 |
| commit | 7be9ab637fb9c5283c5d1b3f41d81bc2c01ad548 (patch) | |
| tree | 68ef782de4f20d6f76e1ac62f7ffddb41552a58c /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 076c783cd31f0d46782f9365fd79725d1248712d (diff) | |
bcachefs: Return -ENOKEY/EINVAL when mount decryption fails
bch2_fs_encryption_init() correctly passes back -ENOKEY from request_key()
when no unlock key is found, or -EINVAL if superblock decryption fails
because of an invalid key. However, these get absorbed into a generic NULL
return from bch2_fs_alloc() and later returned to user space as -ENOMEM,
leading to a misleading error from mount(1):
mount(2) system call failed: Out of memory.
Return explicit error pointers out of bch2_fs_alloc() and handle them in
both callers, so the user instead sees
mount(2) system call failed: Required key not available.
when attempting to mount a filesystem which is still locked.
Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions
