summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/error.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-09-26 22:51:19 +0200
committerKent Overstreet <kent.overstreet@linux.dev>2024-09-28 03:46:35 +0200
commit5612daafb76420c6793dc48ce6d0c20f36cc7981 (patch)
tree75c49d5114fce33b304499de964a165fc9baae04 /fs/bcachefs/error.h
parentbcachefs: Move transaction commit path validation to as late as possible (diff)
downloadlinux-5612daafb76420c6793dc48ce6d0c20f36cc7981.tar.xz
linux-5612daafb76420c6793dc48ce6d0c20f36cc7981.zip
bcachefs: Fix fsck warnings from bkey validation
__bch2_fsck_err() warns if the current task has a btree_trans object and it wasn't passed in, because if it has to prompt for user input it has to be able to unlock it. But plumbing the btree_trans through bkey_validate(), as well as transaction restarts, is problematic - so instead make bkey fsck errors FSCK_AUTOFIX, which doesn't need to warn. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/error.h')
-rw-r--r--fs/bcachefs/error.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/error.h b/fs/bcachefs/error.h
index 2f1b86978f36..21ee7211b03e 100644
--- a/fs/bcachefs/error.h
+++ b/fs/bcachefs/error.h
@@ -184,7 +184,7 @@ do { \
ret = -BCH_ERR_fsck_delete_bkey; \
goto fsck_err; \
} \
- int _ret = __bch2_bkey_fsck_err(c, k, FSCK_CAN_FIX, \
+ int _ret = __bch2_bkey_fsck_err(c, k, FSCK_CAN_FIX|FSCK_AUTOFIX,\
BCH_FSCK_ERR_##_err_type, \
_err_msg, ##__VA_ARGS__); \
if (_ret != -BCH_ERR_fsck_fix && \