ocfs2: Add trace point for ocfs2_set_inode_attr()
PATCH 2/2 ocfs2: Add trace point for ocfs2_set_inode_attr()
Add trace point for ocfs2_set_inode_attr().
# cat /debug/tracing/available_events |grep ocfs2_set_inode_attr ocfs2:ocfs2_set_inode_attr
--- fs/ocfs2/ioctl.c | 3 +++ fs/ocfs2/ocfs2_trace.h | 6 ++++++ 2 files changed, 9 insertions(+)
fs/ocfs2/ioctl.c +3 -0
@@ -27,6 +27,7 @@#include "buffer_head_io.h" #include "suballoc.h" #include "move_extents.h" +#include "ocfs2_trace.h" #define o2info_from_user (a, b) \ copy_from_user(&(a), (b), sizeof(a))
@@ -86,6 +87,8 @@ static int ocfs2_set_inode_attr(struct inode *inode, unsigned flags,unsigned oldflags;int status; +trace_ocfs2_set_inode_attr (OCFS2_I (inode)->ip_blkno, flags); +mutex_lock (&inode->i_mutex); status =ocfs2_inode_lock (inode, &bh,1 );
fs/ocfs2/ocfs2_trace.h +6 -0
@@ -2755,6 +2755,12 @@ DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_remove_metadata_tree);DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT (ocfs2_remove_block_from_cache);/* End of trace events for fs/ocfs2/uptodate.c. */ + +/* Trace events for fs/ocfs2/ioctl.c. */ + +DEFINE_OCFS2_ULL_UINT_EVENT (ocfs2_set_inode_attr); + +/* End of trace events for fs/ocfs2/ioctl.c. */ #endif /* _TRACE_OCFS2_H */ /* This part must be outside protection */
Signature · 1 line
1.7.9.5
Joel Becker
maintainerPATCH 2/2 ocfs2: Add trace point for ocfs2_set_inode_attr()
Hey Jeff,
What made you want this trace point? Did you have a particular
scenario that required it? Or were you just thinking "it would be nice to have"?
Joel
Quoted 53 lines · Jeff Liu
Add trace point for
ocfs2_set_inode_attr().# cat /debug/tracing/available_events |grep ocfs2_set_inode_attr ocfs2:ocfs2_set_inode_attrSigned-off-by Jie Liu <[email protected]>Cc Joel Becker <[email protected]>Cc Mark Fasheh <[email protected]>--- fs/ocfs2/ioctl.c | 3 +++ fs/ocfs2/ocfs2_trace.h | 6 ++++++ 2 files changed, 9 insertions(+)fs/ocfs2/ioctl.c +3
-0@@ -27,6 +27,7 @@#include "buffer_head_io.h" #include "suballoc.h" #include "move_extents.h" +#include "ocfs2_trace.h" #define o2info_from_user (a, b) \ copy_from_user(&(a), (b), sizeof(a))@@ -86,6 +87,8 @@ static int ocfs2_set_inode_attr(struct inode *inode, unsigned flags,unsigned oldflags;int status; +trace_ocfs2_set_inode_attr (OCFS2_I (inode)->ip_blkno, flags); +mutex_lock (&inode->i_mutex); status =ocfs2_inode_lock (inode, &bh,1 );fs/ocfs2/ocfs2_trace.h +6
-0@@ -2755,6 +2755,12 @@ DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_remove_metadata_tree);DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT (ocfs2_remove_block_from_cache);/* End of trace events for fs/ocfs2/uptodate.c. */ + +/* Trace events for fs/ocfs2/ioctl.c. */ + +DEFINE_OCFS2_ULL_UINT_EVENT (ocfs2_set_inode_attr); + +/* End of trace events for fs/ocfs2/ioctl.c. */ #endif /* _TRACE_OCFS2_H */ /* This part must be outside protection */ Signature · 1 line
1.7.9.5
Signature · 6 lines
Life's Little Instruction Book #207 "Swing for the fence." http://www.jlbec.org/ jlbec at evilplan.org
PATCH 2/2 ocfs2: Add trace point for ocfs2_set_inode_attr()
Hi Joel,
Quoted 6 lines · Joel Becker
Hey Jeff,
What made you want this trace point? Did you have a particular
scenario that required it?Or were you just thinking "it would be nice
to have"?
Yes, and I observed that XFS has this trace point. Maybe it's better to add it when we have a good use case. :)
Thanks,
-Jeff
Quoted 58 lines
Joel
Quoted 53 lines · Jeff Liu
Add trace point for
ocfs2_set_inode_attr().# cat /debug/tracing/available_events |grep ocfs2_set_inode_attr ocfs2:ocfs2_set_inode_attrSigned-off-by Jie Liu <[email protected]>Cc Joel Becker <[email protected]>Cc Mark Fasheh <[email protected]>--- fs/ocfs2/ioctl.c | 3 +++ fs/ocfs2/ocfs2_trace.h | 6 ++++++ 2 files changed, 9 insertions(+)fs/ocfs2/ioctl.c +3
-0@@ -27,6 +27,7 @@#include "buffer_head_io.h" #include "suballoc.h" #include "move_extents.h" +#include "ocfs2_trace.h" #define o2info_from_user (a, b) \ copy_from_user(&(a), (b), sizeof(a))@@ -86,6 +87,8 @@ static int ocfs2_set_inode_attr(struct inode *inode, unsigned flags,unsigned oldflags;int status; +trace_ocfs2_set_inode_attr (OCFS2_I (inode)->ip_blkno, flags); +mutex_lock (&inode->i_mutex); status =ocfs2_inode_lock (inode, &bh,1 );fs/ocfs2/ocfs2_trace.h +6
-0@@ -2755,6 +2755,12 @@ DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_remove_metadata_tree);DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT (ocfs2_remove_block_from_cache);/* End of trace events for fs/ocfs2/uptodate.c. */ + +/* Trace events for fs/ocfs2/ioctl.c. */ + +DEFINE_OCFS2_ULL_UINT_EVENT (ocfs2_set_inode_attr); + +/* End of trace events for fs/ocfs2/ioctl.c. */ #endif /* _TRACE_OCFS2_H */ /* This part must be outside protection */ Signature · 1 line
1.7.9.5
Joel Becker
maintainerPATCH 2/2 ocfs2: Add trace point for ocfs2_set_inode_attr()
Quoted 10 lines · Jeff Liu
Hi Joel,
Quoted 6 lines · Joel Becker
Hey Jeff,
What made you want this trace point? Did you have a particular
scenario that required it?Or were you just thinking "it would be nice
to have"?Yes, and I observed that XFS has this trace point. Maybe it's better to add it when we have a good use case. :)
That's how I'd approach it. Thanks.
Joel
Quoted 62 lines
Thanks,
-JeffQuoted 58 lines
Joel
Quoted 53 lines · Jeff Liu
Add trace point for
ocfs2_set_inode_attr().# cat /debug/tracing/available_events |grep ocfs2_set_inode_attr ocfs2:ocfs2_set_inode_attrSigned-off-by Jie Liu <[email protected]>Cc Joel Becker <[email protected]>Cc Mark Fasheh <[email protected]>--- fs/ocfs2/ioctl.c | 3 +++ fs/ocfs2/ocfs2_trace.h | 6 ++++++ 2 files changed, 9 insertions(+)fs/ocfs2/ioctl.c +3
-0@@ -27,6 +27,7 @@#include "buffer_head_io.h" #include "suballoc.h" #include "move_extents.h" +#include "ocfs2_trace.h" #define o2info_from_user (a, b) \ copy_from_user(&(a), (b), sizeof(a))@@ -86,6 +87,8 @@ static int ocfs2_set_inode_attr(struct inode *inode, unsigned flags,unsigned oldflags;int status; +trace_ocfs2_set_inode_attr (OCFS2_I (inode)->ip_blkno, flags); +mutex_lock (&inode->i_mutex); status =ocfs2_inode_lock (inode, &bh,1 );fs/ocfs2/ocfs2_trace.h +6
-0@@ -2755,6 +2755,12 @@ DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_remove_metadata_tree);DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT (ocfs2_remove_block_from_cache);/* End of trace events for fs/ocfs2/uptodate.c. */ + +/* Trace events for fs/ocfs2/ioctl.c. */ + +DEFINE_OCFS2_ULL_UINT_EVENT (ocfs2_set_inode_attr); + +/* End of trace events for fs/ocfs2/ioctl.c. */ #endif /* _TRACE_OCFS2_H */ /* This part must be outside protection */ Signature · 1 line
1.7.9.5
Signature · 6 lines
"The opposite of a correct statement is a false statement. The
opposite of a profound truth may well be another profound truth."
- Niels Bohr
http://www.jlbec.org/
jlbec at evilplan.org