[PATCH 47/47] nfs: trace nfs_commit_release()

From: Wu Fengguang
Date: Mon Dec 13 2010 - 01:52:41 EST



Signed-off-by: Wu Fengguang <fengguang.wu@xxxxxxxxx>
---
fs/nfs/write.c | 3 +++
include/trace/events/nfs.h | 31 +++++++++++++++++++++++++++++++
2 files changed, 34 insertions(+)

--- linux-next.orig/fs/nfs/write.c 2010-12-08 22:44:38.000000000 +0800
+++ linux-next/fs/nfs/write.c 2010-12-08 22:44:38.000000000 +0800
@@ -1475,6 +1475,9 @@ static void nfs_commit_release(void *cal
}
nfs_commit_clear_lock(NFS_I(data->inode));
nfs_commit_wakeup(NFS_SERVER(data->inode));
+ trace_nfs_commit_release(data->inode,
+ data->args.offset,
+ data->args.count);
nfs_commitdata_release(calldata);
}

--- linux-next.orig/include/trace/events/nfs.h 2010-12-08 22:44:38.000000000 +0800
+++ linux-next/include/trace/events/nfs.h 2010-12-08 22:44:38.000000000 +0800
@@ -51,6 +51,37 @@ TRACE_EVENT(nfs_commit_unstable_pages,
)
);

+TRACE_EVENT(nfs_commit_release,
+
+ TP_PROTO(struct inode *inode,
+ unsigned long offset,
+ unsigned long len),
+
+ TP_ARGS(inode, offset, len),
+
+ TP_STRUCT__entry(
+ __array(char, name, 32)
+ __field(unsigned long, ino)
+ __field(unsigned long, offset)
+ __field(unsigned long, len)
+ ),
+
+ TP_fast_assign(
+ strncpy(__entry->name,
+ dev_name(inode->i_mapping->backing_dev_info->dev), 32);
+ __entry->ino = inode->i_ino;
+ __entry->offset = offset;
+ __entry->len = len;
+ ),
+
+ TP_printk("bdi %s: ino=%lu offset=%lu len=%lu",
+ __entry->name,
+ __entry->ino,
+ __entry->offset,
+ __entry->len
+ )
+);
+

#endif /* _TRACE_NFS_H */



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/