Skip to content

(More complex) logged operations

Kent Overstreet linux-bcachefs 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3bcachefs: BTREE_ID_logged_opsfs/bcachefs/Makefile fs/bcachefs/bcachefs.h fs/bcachefs/bcachefs_format.h +7 more+154 -10 replies
2/3bcachefs: Log truncate operationsfs/bcachefs/bcachefs_format.h fs/bcachefs/bkey_methods.c fs/bcachefs/io_misc.c +3 more+75 -220 replies
3/3bcachefs: Log finsert/fcollapse operationsfs/bcachefs/bcachefs_format.h fs/bcachefs/io_misc.c fs/bcachefs/io_misc.h +1 more+152 -950 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/3] (More complex) logged operations

Hi all,

this patch series introduces a logged operations btree, for operations that are too big to be done in a single btree transaction, and then changes truncate and finsert/fcollapse to use it.

This fixes a recently noticed bug where the deleted inodes btree broke truncate atomicity after unclean shutdown, because that was relying on scanning the inodes btree for BCH_INODE_I_SIZE_DIRTY inodes...

Kent Overstreet (3):
bcachefs: BTREE_ID_logged_ops
bcachefs: Log truncate operations
bcachefs: Log finsert/fcollapse operations

 fs/bcachefs/Makefile          |   1 +
 fs/bcachefs/bcachefs.h        |   1 +
 fs/bcachefs/bcachefs_format.h |  40 ++++-
 fs/bcachefs/bkey_methods.c    |   1 +
 fs/bcachefs/btree_update.c    |  18 +++
 fs/bcachefs/btree_update.h    |   1 +
 fs/bcachefs/io_misc.c         | 275 ++++++++++++++++++++--------------
 fs/bcachefs/io_misc.h         |  19 +++
 fs/bcachefs/logged_ops.c      | 110 ++++++++++++++
 fs/bcachefs/logged_ops.h      |  20 +++
 fs/bcachefs/recovery.c        |   1 +
 fs/bcachefs/recovery_types.h  |   1 +
 fs/bcachefs/super.c           |   1 +
 13 files changed, 376 insertions(+), 113 deletions(-)
 create mode 100644 fs/bcachefs/logged_ops.c
 create mode 100644 fs/bcachefs/logged_ops.h
Signature · 1 line
2.40.1