Skip to content

Commit

Permalink
bcachefs: BCH_ERR_btree_node_read_error_cached
Browse files Browse the repository at this point in the history
Signed-off-by: Kent Overstreet <[email protected]>
  • Loading branch information
Kent Overstreet committed Nov 24, 2024
1 parent b828c6f commit c6b682d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/bcachefs/btree_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ static struct btree *__bch2_btree_node_get(struct btree_trans *trans, struct btr

if (unlikely(btree_node_read_error(b))) {
six_unlock_type(&b->c.lock, lock_type);
return ERR_PTR(-BCH_ERR_btree_node_read_error);
return ERR_PTR(-BCH_ERR_btree_node_read_err_cached);
}

EBUG_ON(b->c.btree_id != path->btree_id);
Expand Down Expand Up @@ -1221,7 +1221,7 @@ struct btree *bch2_btree_node_get(struct btree_trans *trans, struct btree_path *

if (unlikely(btree_node_read_error(b))) {
six_unlock_type(&b->c.lock, lock_type);
return ERR_PTR(-BCH_ERR_btree_node_read_error);
return ERR_PTR(-BCH_ERR_btree_node_read_err_cached);
}

EBUG_ON(b->c.btree_id != path->btree_id);
Expand Down Expand Up @@ -1303,7 +1303,7 @@ struct btree *bch2_btree_node_get_noiter(struct btree_trans *trans,

if (unlikely(btree_node_read_error(b))) {
six_unlock_read(&b->c.lock);
b = ERR_PTR(-BCH_ERR_btree_node_read_error);
b = ERR_PTR(-BCH_ERR_btree_node_read_err_cached);
goto out;
}

Expand Down
1 change: 1 addition & 0 deletions fs/bcachefs/errcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@
x(BCH_ERR_invalid, invalid_bkey) \
x(BCH_ERR_operation_blocked, nocow_lock_blocked) \
x(EIO, btree_node_read_err) \
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) \
Expand Down

0 comments on commit c6b682d

Please sign in to comment.