aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZheng Liu <wenqing.lz@taobao.com>2013-01-16 20:21:26 -0500
committerTheodore Ts'o <tytso@mit.edu>2013-01-16 20:21:26 -0500
commitaaddea812cb0a2dc38b55ba557b68999bc2f6203 (patch)
treea0c351a893ee132fdb36a3693dd9af5e126f7546
parent7f5118629f74b82bd4ba5e47415d1b4dcb940241 (diff)
ext4: add tracepoint in punching hole
This patch adds a tracepoint in ext4_punch_hole. CC: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Zheng Liu <wenqing.lz@taobao.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r--fs/ext4/inode.c2
-rw-r--r--include/trace/events/ext4.h25
2 files changed, 27 insertions, 0 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 93a7e8453a68..5abf89c100b9 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3567,6 +3567,8 @@ int ext4_punch_hole(struct file *file, loff_t offset, loff_t length)
3567 return -EOPNOTSUPP; 3567 return -EOPNOTSUPP;
3568 } 3568 }
3569 3569
3570 trace_ext4_punch_hole(inode, offset, length);
3571
3570 return ext4_ext_punch_hole(file, offset, length); 3572 return ext4_ext_punch_hole(file, offset, length);
3571} 3573}
3572 3574
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 7e8c36bc7082..6080ea1380b8 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -1324,6 +1324,31 @@ TRACE_EVENT(ext4_fallocate_exit,
1324 __entry->ret) 1324 __entry->ret)
1325); 1325);
1326 1326
1327TRACE_EVENT(ext4_punch_hole,
1328 TP_PROTO(struct inode *inode, loff_t offset, loff_t len),
1329
1330 TP_ARGS(inode, offset, len),
1331
1332 TP_STRUCT__entry(
1333 __field( dev_t, dev )
1334 __field( ino_t, ino )
1335 __field( loff_t, offset )
1336 __field( loff_t, len )
1337 ),
1338
1339 TP_fast_assign(
1340 __entry->dev = inode->i_sb->s_dev;
1341 __entry->ino = inode->i_ino;
1342 __entry->offset = offset;
1343 __entry->len = len;
1344 ),
1345
1346 TP_printk("dev %d,%d ino %lu offset %lld len %lld",
1347 MAJOR(__entry->dev), MINOR(__entry->dev),
1348 (unsigned long) __entry->ino,
1349 __entry->offset, __entry->len)
1350);
1351
1327TRACE_EVENT(ext4_unlink_enter, 1352TRACE_EVENT(ext4_unlink_enter,
1328 TP_PROTO(struct inode *parent, struct dentry *dentry), 1353 TP_PROTO(struct inode *parent, struct dentry *dentry),
1329 1354