Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a50f162 authored by Brian Foster's avatar Brian Foster Committed by Dave Chinner
Browse files

xfs: add an xfs_zero_eof() tracepoint



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: default avatarBrian Foster <bfoster@redhat.com>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent 3136e8bb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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.
	 *
+1 −0
Original line number Diff line number Diff line
@@ -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),