Entirely too many patches, but mostly check/repair, and related. 6.16 looks to be shaping up well, knock on wood. The following changes since commit e04c78d86a9699d136910cfc0bdcf01087e3267e: Linux 6.16-rc2 (2025-06-15 13:49:41 -0700) are available in the Git repository at: git://evilpiepirate.org/bcachefs.git tags/bcachefs-2025-06-19 for you to fetch changes up to b2e2bed119809a5ca384241e0631f04c6142ae08: bcachefs: Add missing key type checks to check_snapshot_exists() (2025-06-19 14:37:04 -0400) ---------------------------------------------------------------- bcachefs fixes for 6.16-rc3 - Lots of small check/repair fixes, primarily in subvol loop and directory structure loop (when involving snapshots). - Fix a few 6.16 regressions: rare UAF in the foreground allocator path when taking a transaction restart from the transaction bump allocator, and some small fallout from the change to log the error being corrected in the journal when repairing errors, also some fallout from the btree node read error logging improvements. (Alan, Bharadwaj) - New option: journal_rewind This lets the entire filesystem be reset to an earlier point in time. Note that this is only a disaster recovery tool, and right now there are major caveats to using it (discards should be disabled, in particular), but it successfully restored the filesystem of one of the users who was bit by the subvolume deletion bug and didn't have backups. I'll likely be making some changes to the discard path in the future to make this a reliable recovery tool. - Some new btree iterator tracepoints, for tracking down some livelock-ish behaviour we've been seeing in the main data write path. ---------------------------------------------------------------- Alan Huang (6): bcachefs: Don't allocate new memory when mempool is exhausted bcachefs: Fix alloc_req use after free bcachefs: Add missing EBUG_ON bcachefs: Delay calculation of trans->journal_u64s bcachefs: Move bset size check before csum check bcachefs: Fix pool->alloc NULL pointer dereference Bharadwaj Raju (1): bcachefs: don't return fsck_fix for unfixable node errors in __btree_err Kent Overstreet (33): bcachefs: trace_extent_trim_atomic bcachefs: btree iter tracepoints bcachefs: Fix bch2_journal_keys_peek_prev_min() bcachefs: btree_iter: fix updates, journal overlay bcachefs: better __bch2_snapshot_is_ancestor() assert bcachefs: pass last_seq into fs_journal_start() bcachefs: Fix "now allowing incompatible features" message bcachefs: Fix snapshot_key_missing_inode_snapshot repair bcachefs: fsck: fix add_inode() bcachefs: fsck: fix extent past end of inode repair bcachefs: opts.journal_rewind bcachefs: Kill unused tracepoints bcachefs: mark more errors autofix bcachefs: fsck: Improve check_key_has_inode() bcachefs: Call bch2_fs_init_rw() early if we'll be going rw bcachefs: Fix __bch2_inum_to_path() when crossing subvol boundaries bcachefs: fsck: Print path when we find a subvol loop bcachefs: fsck: Fix remove_backpointer() for subvol roots bcachefs: fsck: Fix reattach_inode() for subvol roots bcachefs: fsck: check_directory_structure runs in reverse order bcachefs: fsck: additional diagnostics for reattach_inode() bcachefs: fsck: check_subdir_count logs path bcachefs: fsck: Fix check_path_loop() + snapshots bcachefs: Fix bch2_read_bio_to_text() bcachefs: Fix restart handling in btree_node_scrub_work() bcachefs: fsck: Fix check_directory_structure when no check_dirents bcachefs: fsck: fix unhandled restart in topology repair bcachefs: fsck: Fix oops in key_visible_in_snapshot() bcachefs: fix spurious error in read_btree_roots() bcachefs: Fix missing newlines before ero bcachefs: Fix *__bch2_trans_subbuf_alloc() error path bcachefs: Don't log fsck err in the journal if doing repair elsewhere bcachefs: Add missing key type checks to check_snapshot_exists() fs/bcachefs/alloc_background.c | 13 +- fs/bcachefs/bcachefs.h | 3 +- fs/bcachefs/btree_gc.c | 8 +- fs/bcachefs/btree_io.c | 74 ++++---- fs/bcachefs/btree_iter.c | 173 ++++++++++++------ fs/bcachefs/btree_journal_iter.c | 64 ++++--- fs/bcachefs/btree_journal_iter_types.h | 5 +- fs/bcachefs/btree_trans_commit.c | 18 +- fs/bcachefs/btree_types.h | 1 + fs/bcachefs/btree_update.c | 16 +- fs/bcachefs/btree_update_interior.c | 11 +- fs/bcachefs/btree_update_interior.h | 3 + fs/bcachefs/btree_write_buffer.c | 3 + fs/bcachefs/chardev.c | 29 ++- fs/bcachefs/data_update.c | 1 + fs/bcachefs/errcode.h | 5 - fs/bcachefs/error.c | 4 +- fs/bcachefs/extent_update.c | 13 +- fs/bcachefs/fsck.c | 317 +++++++++++++++++++++++---------- fs/bcachefs/inode.h | 5 + fs/bcachefs/io_read.c | 7 +- fs/bcachefs/journal.c | 18 +- fs/bcachefs/journal.h | 2 +- fs/bcachefs/journal_io.c | 26 ++- fs/bcachefs/namei.c | 30 +++- fs/bcachefs/opts.h | 5 + fs/bcachefs/recovery.c | 24 ++- fs/bcachefs/recovery_passes.c | 6 +- fs/bcachefs/recovery_passes.h | 9 + fs/bcachefs/sb-errors_format.h | 17 +- fs/bcachefs/snapshot.c | 14 +- fs/bcachefs/super.c | 13 +- fs/bcachefs/super.h | 1 + fs/bcachefs/trace.h | 125 +++---------- 34 files changed, 657 insertions(+), 406 deletions(-)