]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
xfs: add an xfs_zero_eof() tracepoint
authorBrian Foster <bfoster@redhat.com>
Mon, 12 Oct 2015 05:02:08 +0000 (16:02 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 12 Oct 2015 05:02:08 +0000 (16:02 +1100)
Add a tracepoint in xfs_zero_eof() to facilitate tracking and debugging
EOF zeroing events. This has proven useful in the context of other
direct I/O tracepoints to ensure EOF zeroing occurs within appropriate
file ranges.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_file.c
fs/xfs/xfs_trace.h

index 347b3e07ec2bf9c7b60a41b8812954466736d818..541dcfbc6f4922d8b8f63889ed748ee97bba1267 100644 (file)
@@ -482,6 +482,8 @@ xfs_zero_eof(
        ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL));
        ASSERT(offset > isize);
 
+       trace_xfs_zero_eof(ip, isize, offset - isize);
+
        /*
         * First handle zeroing the block on which isize resides.
         *
index 5ed36b1e04c1af6103122450e33aa8e1f2546c1b..957f5ccdd84fcc4606f3427dbc39c9f5636f032d 100644 (file)
@@ -1312,6 +1312,7 @@ DEFINE_SIMPLE_IO_EVENT(xfs_delalloc_enospc);
 DEFINE_SIMPLE_IO_EVENT(xfs_unwritten_convert);
 DEFINE_SIMPLE_IO_EVENT(xfs_get_blocks_notfound);
 DEFINE_SIMPLE_IO_EVENT(xfs_setfilesize);
+DEFINE_SIMPLE_IO_EVENT(xfs_zero_eof);
 
 DECLARE_EVENT_CLASS(xfs_itrunc_class,
        TP_PROTO(struct xfs_inode *ip, xfs_fsize_t new_size),