Skip to content

bcachefs: write buffer journaling fixes

Brian Foster linux-bcachefs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5bcachefs: remove duplicate code between backpointer update pathsfs/bcachefs/backpointers.c fs/bcachefs/backpointers.h+5 -210 replies
2/5bcachefs: remove unnecessary btree_insert_key_leaf() wrapperfs/bcachefs/btree_update_leaf.c+1 -70 replies
3/5bcachefs: fold bch2_trans_update_by_path_trace() into callersfs/bcachefs/btree_update_leaf.c+8 -190 replies
4/5bcachefs: support btree updates of prejournaled keysfs/bcachefs/bkey_methods.h fs/bcachefs/btree_types.h fs/bcachefs/btree_update.h +1 more+36 -30 replies
5/5bcachefs: use prejournaled key updates for write buffer flushesfs/bcachefs/btree_write_buffer.c+28 -22 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] bcachefs: write buffer journaling fixes

Hi all,

Here are a few patches to try and address the write buffer journaling issue that occasionally produces backpointer inconsistency errors via generic/388. The issue is described in more detail in patch 5.

Patches 1-3 are just a few cleanup/prep patches that fell out of perusing the code. Patch 4 adds the ability to plumb a known seq for a journaled key into a transaction and down through to the btree update. Patch 5 updates write buffer key flushing to use the wb key journal seq for the key in the flush transaction.

This survived ~100 or so iterations of generic/388 in my last test and the series is also pushed to the CI [1]. Thoughts, reviews, flames appreciated.

Brian

[1] https://evilpiepirate.org/~testdashboard/ci?branch=bfoster&commit=130f60a69f0c2cce14ac5c0de6257b4a4cae39f0

Brian Foster (5):
bcachefs: remove duplicate code between backpointer update paths
bcachefs: remove unnecessary btree_insert_key_leaf() wrapper
bcachefs: fold bch2_trans_update_by_path_trace() into callers
bcachefs: support btree updates of prejournaled keys
bcachefs: use prejournaled key updates for write buffer flushes

 fs/bcachefs/backpointers.c       | 18 +--------
 fs/bcachefs/backpointers.h       |  8 ++--
 fs/bcachefs/bkey_methods.h       |  2 +
 fs/bcachefs/btree_types.h        |  1 +
 fs/bcachefs/btree_update.h       |  2 +
 fs/bcachefs/btree_update_leaf.c  | 67 +++++++++++++++++++-------------
 fs/bcachefs/btree_write_buffer.c | 30 +++++++++++++-
 7 files changed, 77 insertions(+), 51 deletions(-)
Signature · 1 line
2.40.1