public inbox for linux-bcachefs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bcachefs: Kill duplicate error code
@ 2025-08-23 18:41 Alan Huang
  2025-09-01 22:42 ` Kent Overstreet
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Huang @ 2025-08-23 18:41 UTC (permalink / raw)
  To: kent.overstreet; +Cc: linux-bcachefs, Alan Huang

btree_node_read_error is duplicate of btree_node_read_err, which impacts
repair path if misused.

Signed-off-by: Alan Huang <mmpgouride@gmail.com>
---
 fs/bcachefs/btree_io.c         | 2 +-
 fs/bcachefs/errcode.h          | 1 -
 fs/bcachefs/sb-errors_format.h | 2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/bcachefs/btree_io.c b/fs/bcachefs/btree_io.c
index 2e3dd9bacac5..3d594c4ae9d8 100644
--- a/fs/bcachefs/btree_io.c
+++ b/fs/bcachefs/btree_io.c
@@ -1902,7 +1902,7 @@ static int __bch2_btree_root_read(struct btree_trans *trans, enum btree_id id,
 		scoped_guard(mutex, &c->btree_cache.lock)
 			bch2_btree_node_hash_remove(&c->btree_cache, b);
 
-		ret = bch_err_throw(c, btree_node_read_error);
+		ret = bch_err_throw(c, btree_node_read_err);
 		goto err;
 	}
 
diff --git a/fs/bcachefs/errcode.h b/fs/bcachefs/errcode.h
index adc1f9315eab..7106d72fca80 100644
--- a/fs/bcachefs/errcode.h
+++ b/fs/bcachefs/errcode.h
@@ -295,7 +295,6 @@
 	x(BCH_ERR_btree_node_read_err,	btree_node_read_err_cached)		\
 	x(EIO,				sb_not_downgraded)			\
 	x(EIO,				btree_node_write_all_failed)		\
-	x(EIO,				btree_node_read_error)			\
 	x(EIO,				btree_need_topology_repair)		\
 	x(EIO,				bucket_ref_update)			\
 	x(EIO,				trigger_alloc)				\
diff --git a/fs/bcachefs/sb-errors_format.h b/fs/bcachefs/sb-errors_format.h
index aa0ea1ec9f10..483358588abc 100644
--- a/fs/bcachefs/sb-errors_format.h
+++ b/fs/bcachefs/sb-errors_format.h
@@ -73,7 +73,7 @@ enum bch_fsck_flags {
 	x(btree_root_read_error,				 59,	FSCK_AUTOFIX)	\
 	x(btree_root_bad_min_key,				 60,	0)		\
 	x(btree_root_bad_max_key,				 61,	0)		\
-	x(btree_node_read_error,				 62,	FSCK_AUTOFIX)	\
+	x(btree_node_read_err,				 	 62,	FSCK_AUTOFIX)	\
 	x(btree_node_topology_bad_min_key,			 63,	FSCK_AUTOFIX)	\
 	x(btree_node_topology_bad_max_key,			 64,	FSCK_AUTOFIX)	\
 	x(btree_node_topology_bad_root_min_key,			 323,	FSCK_AUTOFIX)	\
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-09-02  1:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-23 18:41 [PATCH] bcachefs: Kill duplicate error code Alan Huang
2025-09-01 22:42 ` Kent Overstreet
2025-09-02  0:54   ` Alan Huang
2025-09-02  1:09     ` Kent Overstreet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox