mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 07:03:28 -04:00
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()
This commit is contained in:
@@ -689,6 +689,41 @@ DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_lookup_first,
|
||||
TP_ARGS(inode, ordered)
|
||||
);
|
||||
|
||||
/*
|
||||
* The writepage fixup worker deferred a block because this still-running
|
||||
* ordered extent covers it.
|
||||
*/
|
||||
DEFINE_EVENT(btrfs__ordered_extent, btrfs_writepage_fixup_defer,
|
||||
|
||||
TP_PROTO(const struct btrfs_inode *inode,
|
||||
const struct btrfs_ordered_extent *ordered),
|
||||
|
||||
TP_ARGS(inode, ordered)
|
||||
);
|
||||
|
||||
/* The writepage fixup worker reserved space for a block and set delalloc. */
|
||||
TRACE_EVENT(btrfs_writepage_fixup_reserve,
|
||||
|
||||
TP_PROTO(const struct btrfs_inode *inode, u64 start, u32 len),
|
||||
|
||||
TP_ARGS(inode, start, len),
|
||||
|
||||
TP_STRUCT__entry_btrfs(
|
||||
__field( u64, ino )
|
||||
__field( u64, start )
|
||||
__field( u32, len )
|
||||
),
|
||||
|
||||
TP_fast_assign_btrfs(inode->root->fs_info,
|
||||
__entry->ino = btrfs_ino(inode);
|
||||
__entry->start = start;
|
||||
__entry->len = len;
|
||||
),
|
||||
|
||||
TP_printk_btrfs("ino=%llu start=%llu len=%u",
|
||||
__entry->ino, __entry->start, __entry->len)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_split,
|
||||
|
||||
TP_PROTO(const struct btrfs_inode *inode,
|
||||
|
||||
Reference in New Issue
Block a user