Currently, the only visibility into filesystem freeze or thaw activity is when an error is returned from the actual call to freeze or thaw. If the action itself hangs, there is no indication that the freeze or thaw was in-progress, short of collecting a vmcore. There is also no record of what process froze a filesystem or when it happened, so if the process does not thaw it later, debugging the issue is difficult. These patches add tracepoints to the generic filesystem freeze and thaw functions. When enabled, trace events will create a record of these activities. Sample trace events: (freeze /dev/vdd) fsfreeze-23072 [003] .... 1018126.904878: freeze_super_enter: comm=fsfreeze pid=23072 for xfs filesystem 'vdd' (253:48) frozen=0 fsfreeze-23072 [003] .... 1018126.926173: freeze_super_exit: comm=fsfreeze pid=23072 for xfs filesystem 'vdd' (253:48) frozen=4 ret=0 (thaw /dev/vdd) <...>-23074 [000] .... 1018134.025833: thaw_super_enter: comm=fsfreeze pid=23074 for xfs filesystem 'vdd' (253:48) frozen=4 <...>-23074 [000] .... 1018134.025873: thaw_super_exit: comm=fsfreeze pid=23074 for xfs filesystem 'vdd' (253:48) frozen=0 ret=0 (freeze /dev/vdb) fsfreeze-23077 [003] .... 1018162.211518: freeze_super_enter: comm=fsfreeze pid=23077 for ext4 filesystem 'vdb' (253:16) frozen=0 fsfreeze-23077 [003] .... 1018162.228586: freeze_super_exit: comm=fsfreeze pid=23077 for ext4 filesystem 'vdb' (253:16) frozen=4 ret=0 (attempt to freeze already-frozen /dev/vdb) fsfreeze-23078 [003] .... 1018169.864362: freeze_super_enter: comm=fsfreeze pid=23078 for ext4 filesystem 'vdb' (253:16) frozen=4 fsfreeze-23078 [003] .... 1018169.864385: freeze_super_exit: comm=fsfreeze pid=23078 for ext4 filesystem 'vdb' (253:16) frozen=4 ret=-16 (unfreeze /dev/vdb) fsfreeze-23079 [003] .... 1018173.074331: thaw_super_enter: comm=fsfreeze pid=23079 for ext4 filesystem 'vdb' (253:16) frozen=4 fsfreeze-23079 [003] .... 1018173.075928: thaw_super_exit: comm=fsfreeze pid=23079 for ext4 filesystem 'vdb' (253:16) frozen=0 ret=0 (attempt to unfreeze already unfrozen /dev/vdb) fsfreeze-23080 [000] .... 1018175.105613: thaw_super_enter: comm=fsfreeze pid=23080 for ext4 filesystem 'vdb' (253:16) frozen=0 fsfreeze-23080 [000] .... 1018175.105639: thaw_super_exit: comm=fsfreeze pid=23080 for ext4 filesystem 'vdb' (253:16) frozen=0 ret=22 Frank Sorenson (5): fs: simplify freeze_super()/thaw_super() exit handling fs/block_dev.c: simplify freeze_bdev() and thaw_bdev() exit handling fs: add trace events for freeze_super() and thaw_super() fs/block_dev.c: add trace events for freeze_bdev() and thaw_bdev() fs: enable filesystem freeze/thaw events fs/block_dev.c | 30 +++++--- fs/super.c | 54 ++++++++------ include/trace/events/fs.h | 109 +++++++++++++++++++++++++++++ include/trace/events/fs_bdev.h | 155 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 316 insertions(+), 32 deletions(-) create mode 100644 include/trace/events/fs.h create mode 100644 include/trace/events/fs_bdev.h -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html