diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-10-01 22:15:30 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:43 -0400 |
commit | a8eefbd324cd40fab57ab8eef88347d4f745db93 (patch) | |
tree | e1a5624e05587daf4d15b3d04cdaedcfb8b6a8a7 /fs/bcachefs/errcode.h | |
parent | 8cbb0002509a605972781c0e747ae68112f94f54 (diff) | |
download | linux-a8eefbd324cd40fab57ab8eef88347d4f745db93.tar.gz linux-a8eefbd324cd40fab57ab8eef88347d4f745db93.tar.bz2 linux-a8eefbd324cd40fab57ab8eef88347d4f745db93.zip |
bcachefs: Add error path to btree_split()
The next patch in the series is (finally!) going to change btree splits
(and interior updates in general) to not take intent locks all the way
up to the root - instead only locking the nodes they'll need to modify.
However, this will be introducing a race since if we're not holding a
write lock on a btree node it can be written out by another thread, and
then we might not have enough space for a new bset entry.
We can handle this by retrying - we just need to introduce a new error
path.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/errcode.h')
-rw-r--r-- | fs/bcachefs/errcode.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/errcode.h b/fs/bcachefs/errcode.h index bf7ae99d9cce..fb1e1cd0f864 100644 --- a/fs/bcachefs/errcode.h +++ b/fs/bcachefs/errcode.h @@ -42,6 +42,7 @@ x(BCH_ERR_transaction_restart, transaction_restart_key_cache_raced) \ x(BCH_ERR_transaction_restart, transaction_restart_key_cache_realloced)\ x(BCH_ERR_transaction_restart, transaction_restart_journal_preres_get) \ + x(BCH_ERR_transaction_restart, transaction_restart_split_race) \ x(BCH_ERR_transaction_restart, transaction_restart_nested) \ x(0, no_btree_node) \ x(BCH_ERR_no_btree_node, no_btree_node_relock) \ |