History

Merge tag 'for-7.2-rc6-fixup-worker-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull Btrfs Fixes 2: Electric Boogaloo from David Sterba: "This brings back the fixup worker infrastructure. It's a mechanism to detect pages/folios that are marked dirty without filesystem knowledge and require COW fixup. The consequence of not doing so is silent data loss. The first patch covers the scenarios in detail, also reflecting folio API port and subpage block size support added in recent years. The original fixup worker was only for pages. The patch is relatively big, half of the code is debugging and support code, the rest is the core design around the detection and fix. The second patch handles an unlikely case when there's work left during unmount" * tag 'for-7.2-rc6-fixup-worker-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: flush the fixup workers during close_ctree btrfs: trigger cow fixup via dirty_folio()

Linus Torvalds committed 3 months ago

Commit 6c68fa62 parents 6335463 ae2567b8 files · +651 −12Browse files

Showing the changes to include (1 of 8 files). Show all

Unified · Split

include/trace/events/btrfs.h+35−0
@@ -689,6 +689,41 @@ DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_lookup_first, · 688 unmodified lines
689 TP_ARGS(inode, ordered)689 TP_ARGS(inode, ordered)
690);690);
691 691
692/*
693 * The writepage fixup worker deferred a block because this still-running
694 * ordered extent covers it.
695 */
696DEFINE_EVENT(btrfs__ordered_extent, btrfs_writepage_fixup_defer,
697
698 TP_PROTO(const struct btrfs_inode *inode,
699 const struct btrfs_ordered_extent *ordered),
700
701 TP_ARGS(inode, ordered)
702);
703
704/* The writepage fixup worker reserved space for a block and set delalloc. */
705TRACE_EVENT(btrfs_writepage_fixup_reserve,
706
707 TP_PROTO(const struct btrfs_inode *inode, u64 start, u32 len),
708
709 TP_ARGS(inode, start, len),
710
711 TP_STRUCT__entry_btrfs(
712 __field( u64, ino )
713 __field( u64, start )
714 __field( u32, len )
715 ),
716
717 TP_fast_assign_btrfs(inode->root->fs_info,
718 __entry->ino = btrfs_ino(inode);
719 __entry->start = start;
720 __entry->len = len;
721 ),
722
723 TP_printk_btrfs("ino=%llu start=%llu len=%u",
724 __entry->ino, __entry->start, __entry->len)
725);
726
692DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_split,727DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_split,
693 728
694 TP_PROTO(const struct btrfs_inode *inode,729 TP_PROTO(const struct btrfs_inode *inode,