summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-09-01 11:25:38 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-09-17 18:55:29 -0700
commit80b7091dc1d5b511a86bae8b8344447bd6432420 (patch)
tree4c388e39e7d5ed0bc1275b13c6581de57a8692e8
parent8b79a60325e0ecd5f6429d4178c7a988dbbecec1 (diff)
xfs: capture the offset and length in fallocate tracepoints
Change the class of the fallocate tracepoints to capture the offset and length of the requested operation. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
-rw-r--r--fs/xfs/xfs_bmap_util.c8
-rw-r--r--fs/xfs/xfs_file.c2
-rw-r--r--fs/xfs/xfs_trace.h10
3 files changed, 10 insertions, 10 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index 5b702feabe9b..f1c7180d352a 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -830,7 +830,7 @@ xfs_alloc_file_space(
xfs_bmbt_irec_t imaps[1], *imapp;
int error;
- trace_xfs_alloc_file_space(ip);
+ trace_xfs_alloc_file_space(ip, offset, len);
if (xfs_is_shutdown(mp))
return -EIO;
@@ -1010,7 +1010,7 @@ xfs_free_file_space(
xfs_fileoff_t endoffset_fsb;
int done = 0, error;
- trace_xfs_free_file_space(ip);
+ trace_xfs_free_file_space(ip, offset, len);
error = xfs_qm_dqattach(ip);
if (error)
@@ -1151,7 +1151,7 @@ xfs_collapse_file_space(
ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL));
ASSERT(xfs_isilocked(ip, XFS_MMAPLOCK_EXCL));
- trace_xfs_collapse_file_space(ip);
+ trace_xfs_collapse_file_space(ip, offset, len);
error = xfs_free_file_space(ip, offset, len);
if (error)
@@ -1221,7 +1221,7 @@ xfs_insert_file_space(
ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL));
ASSERT(xfs_isilocked(ip, XFS_MMAPLOCK_EXCL));
- trace_xfs_insert_file_space(ip);
+ trace_xfs_insert_file_space(ip, offset, len);
error = xfs_bmap_can_insert_extents(ip, stop_fsb, shift_fsb);
if (error)
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 11f57c73f748..b0a346401b03 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -1122,7 +1122,7 @@ xfs_file_fallocate(
*/
unsigned int blksize = i_blocksize(inode);
- trace_xfs_zero_file_space(ip);
+ trace_xfs_zero_file_space(ip, offset, len);
/* Unshare around the region to zero, if needed. */
if (xfs_inode_needs_cow_around(ip)) {
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index 5bbcb85883c5..f06dc4d02028 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -778,11 +778,6 @@ DEFINE_INODE_EVENT(xfs_getattr);
DEFINE_INODE_EVENT(xfs_setattr);
DEFINE_INODE_EVENT(xfs_readlink);
DEFINE_INODE_EVENT(xfs_inactive_symlink);
-DEFINE_INODE_EVENT(xfs_alloc_file_space);
-DEFINE_INODE_EVENT(xfs_free_file_space);
-DEFINE_INODE_EVENT(xfs_zero_file_space);
-DEFINE_INODE_EVENT(xfs_collapse_file_space);
-DEFINE_INODE_EVENT(xfs_insert_file_space);
DEFINE_INODE_EVENT(xfs_readdir);
#ifdef CONFIG_XFS_POSIX_ACL
DEFINE_INODE_EVENT(xfs_get_acl);
@@ -1559,6 +1554,11 @@ DEFINE_SIMPLE_IO_EVENT(xfs_zero_eof);
DEFINE_SIMPLE_IO_EVENT(xfs_end_io_direct_write);
DEFINE_SIMPLE_IO_EVENT(xfs_end_io_direct_write_unwritten);
DEFINE_SIMPLE_IO_EVENT(xfs_end_io_direct_write_append);
+DEFINE_SIMPLE_IO_EVENT(xfs_alloc_file_space);
+DEFINE_SIMPLE_IO_EVENT(xfs_free_file_space);
+DEFINE_SIMPLE_IO_EVENT(xfs_zero_file_space);
+DEFINE_SIMPLE_IO_EVENT(xfs_collapse_file_space);
+DEFINE_SIMPLE_IO_EVENT(xfs_insert_file_space);
DECLARE_EVENT_CLASS(xfs_itrunc_class,
TP_PROTO(struct xfs_inode *ip, xfs_fsize_t new_size),