Skip to content

transaction restarts and other iterator work

Kent Overstreet linux-bcachefs 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9bcachefs: Assert we're not in a restart in bch2_trans_put()fs/bcachefs/btree_iter.c+3 -00 replies
2/9bcachefs: Better in_restart errorfs/bcachefs/btree_iter.c fs/bcachefs/btree_iter.h fs/bcachefs/btree_types.h+19 -00 replies
3/9bcachefs: CONFIG_BCACHEFS_INJECT_TRANSACTION_RESTARTSfs/bcachefs/Kconfig fs/bcachefs/btree_iter.c fs/bcachefs/btree_iter.h +2 more+56 -10 replies
4/9bcachefs: Assert that we're not violating key cache coherency rulesfs/bcachefs/btree_key_cache.c+10 -30 replies
5/9bcachefs: Rename btree_iter_peek_upto() -> btree_iter_peek_max()fs/bcachefs/alloc_background.c fs/bcachefs/btree_gc.c fs/bcachefs/btree_iter.c +20 more+80 -800 replies
6/9bcachefs: Simplify btree_iter_peek() filter_snapshotsfs/bcachefs/btree_iter.c+62 -670 replies
7/9bcachefs: Kill unnecessary iter_rewind() in bkey_get_empty_slot()fs/bcachefs/btree_update.c+2 -50 replies
8/9bcachefs: Implement bch2_btree_iter_prev_min()fs/bcachefs/btree_iter.c fs/bcachefs/btree_iter.h fs/bcachefs/btree_journal_iter.c +4 more+239 -880 replies
9/9bcachefs: peek_prev_min(): Search forwards for extents, snapshotsfs/bcachefs/btree_iter.c+15 -30 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/9] transaction restarts and other iterator work

batch of various btree iterator patches

- transaction restart injection, asserts: there were some mishandled transaction restarts, now all fixed, and this is the debug code I used to find them.

The tests now run with transaction restart injection on, so any new bugs will be quickly caught in the future.

- btree_iter_peek_prev() improvements: it now works with the journal keys overlay, which means we now should have the option of doing journal replay in the background should we ever need to,

More importantly it now supports an "end of iteration range" argument; this is required for correctness in BTREE_ITER_filter_snapshots mode, otherwise we could keep going into the next inode, which might belong to a different snapshot tree, and we never find any keys that are visible that we can return.

This fixes a bug in reconstruct_inode(), in fsck.

Kent Overstreet (9):
bcachefs: Assert we're not in a restart in bch2_trans_put()
bcachefs: Better in_restart error
bcachefs: CONFIG_BCACHEFS_INJECT_TRANSACTION_RESTARTS
bcachefs: Assert that we're not violating key cache coherency rules
bcachefs: Rename btree_iter_peek_upto() -> btree_iter_peek_max()
bcachefs: Simplify btree_iter_peek() filter_snapshots
bcachefs: Kill unnecessary iter_rewind() in bkey_get_empty_slot()
bcachefs: Implement bch2_btree_iter_prev_min()
bcachefs: peek_prev_min(): Search forwards for extents, snapshots

 fs/bcachefs/Kconfig              |   7 +
 fs/bcachefs/alloc_background.c   |   6 +-
 fs/bcachefs/btree_gc.c           |   2 +-
 fs/bcachefs/btree_iter.c         | 459 ++++++++++++++++++++-----------
 fs/bcachefs/btree_iter.h         |  60 ++--
 fs/bcachefs/btree_journal_iter.c |  50 +++-
 fs/bcachefs/btree_journal_iter.h |   4 +-
 fs/bcachefs/btree_key_cache.c    |  13 +-
 fs/bcachefs/btree_trans_commit.c |   4 +
 fs/bcachefs/btree_types.h        |   6 +
 fs/bcachefs/btree_update.c       |  13 +-
 fs/bcachefs/dirent.c             |   4 +-
 fs/bcachefs/ec.c                 |   2 +-
 fs/bcachefs/errcode.h            |   1 -
 fs/bcachefs/extent_update.c      |   2 +-
 fs/bcachefs/fs-io-pagecache.c    |   2 +-
 fs/bcachefs/fs-io.c              |   8 +-
 fs/bcachefs/fs.c                 |   2 +-
 fs/bcachefs/fsck.c               |  12 +-
 fs/bcachefs/inode.c              |   6 +-
 fs/bcachefs/io_misc.c            |   8 +-
 fs/bcachefs/io_write.c           |   4 +-
 fs/bcachefs/movinggc.c           |   2 +-
 fs/bcachefs/reflink.c            |   2 +-
 fs/bcachefs/str_hash.h           |   6 +-
 fs/bcachefs/subvolume.h          |  12 +-
 fs/bcachefs/tests.c              |  26 +-
 fs/bcachefs/xattr.c              |   2 +-
 28 files changed, 482 insertions(+), 243 deletions(-)
Signature · 1 line
2.45.2