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 -- 2.40.1
