* [Ocfs2-devel] [PATCH 2/2] ocfs2: Add trace point for ocfs2_set_inode_attr()
@ 2013-03-11 5:29 Jeff Liu
2013-03-11 9:10 ` Joel Becker
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Liu @ 2013-03-11 5:29 UTC (permalink / raw)
To: ocfs2-devel
Add trace point for ocfs2_set_inode_attr().
# cat /debug/tracing/available_events |grep ocfs2_set_inode_attr
ocfs2:ocfs2_set_inode_attr
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
---
fs/ocfs2/ioctl.c | 3 +++
fs/ocfs2/ocfs2_trace.h | 6 ++++++
2 files changed, 9 insertions(+)
diff --git a/fs/ocfs2/ioctl.c b/fs/ocfs2/ioctl.c
index c739c24..764bf5c 100644
--- a/fs/ocfs2/ioctl.c
+++ b/fs/ocfs2/ioctl.c
@@ -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);
diff --git a/fs/ocfs2/ocfs2_trace.h b/fs/ocfs2/ocfs2_trace.h
index 3b481f4..bcaca11 100644
--- a/fs/ocfs2/ocfs2_trace.h
+++ b/fs/ocfs2/ocfs2_trace.h
@@ -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 */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Ocfs2-devel] [PATCH 2/2] ocfs2: Add trace point for ocfs2_set_inode_attr()
2013-03-11 5:29 [Ocfs2-devel] [PATCH 2/2] ocfs2: Add trace point for ocfs2_set_inode_attr() Jeff Liu
@ 2013-03-11 9:10 ` Joel Becker
2013-03-11 9:27 ` Jeff Liu
0 siblings, 1 reply; 4+ messages in thread
From: Joel Becker @ 2013-03-11 9:10 UTC (permalink / raw)
To: ocfs2-devel
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
On Mon, Mar 11, 2013 at 01:29:22PM +0800, Jeff Liu wrote:
> Add trace point for ocfs2_set_inode_attr().
>
> # cat /debug/tracing/available_events |grep ocfs2_set_inode_attr
> ocfs2:ocfs2_set_inode_attr
>
> Signed-off-by: Jie Liu <jeff.liu@oracle.com>
> Cc: Joel Becker <jlbec@evilplan.org>
> Cc: Mark Fasheh <mfasheh@suse.com>
> ---
> fs/ocfs2/ioctl.c | 3 +++
> fs/ocfs2/ocfs2_trace.h | 6 ++++++
> 2 files changed, 9 insertions(+)
>
> diff --git a/fs/ocfs2/ioctl.c b/fs/ocfs2/ioctl.c
> index c739c24..764bf5c 100644
> --- a/fs/ocfs2/ioctl.c
> +++ b/fs/ocfs2/ioctl.c
> @@ -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);
> diff --git a/fs/ocfs2/ocfs2_trace.h b/fs/ocfs2/ocfs2_trace.h
> index 3b481f4..bcaca11 100644
> --- a/fs/ocfs2/ocfs2_trace.h
> +++ b/fs/ocfs2/ocfs2_trace.h
> @@ -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 */
> --
> 1.7.9.5
--
Life's Little Instruction Book #207
"Swing for the fence."
http://www.jlbec.org/
jlbec at evilplan.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ocfs2-devel] [PATCH 2/2] ocfs2: Add trace point for ocfs2_set_inode_attr()
2013-03-11 9:10 ` Joel Becker
@ 2013-03-11 9:27 ` Jeff Liu
2013-03-11 9:34 ` Joel Becker
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Liu @ 2013-03-11 9:27 UTC (permalink / raw)
To: ocfs2-devel
Hi Joel,
On 03/11/2013 05:10 PM, Joel Becker wrote:
> 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
>
> Joel
>
> On Mon, Mar 11, 2013 at 01:29:22PM +0800, Jeff Liu wrote:
>> Add trace point for ocfs2_set_inode_attr().
>>
>> # cat /debug/tracing/available_events |grep ocfs2_set_inode_attr
>> ocfs2:ocfs2_set_inode_attr
>>
>> Signed-off-by: Jie Liu <jeff.liu@oracle.com>
>> Cc: Joel Becker <jlbec@evilplan.org>
>> Cc: Mark Fasheh <mfasheh@suse.com>
>> ---
>> fs/ocfs2/ioctl.c | 3 +++
>> fs/ocfs2/ocfs2_trace.h | 6 ++++++
>> 2 files changed, 9 insertions(+)
>>
>> diff --git a/fs/ocfs2/ioctl.c b/fs/ocfs2/ioctl.c
>> index c739c24..764bf5c 100644
>> --- a/fs/ocfs2/ioctl.c
>> +++ b/fs/ocfs2/ioctl.c
>> @@ -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);
>> diff --git a/fs/ocfs2/ocfs2_trace.h b/fs/ocfs2/ocfs2_trace.h
>> index 3b481f4..bcaca11 100644
>> --- a/fs/ocfs2/ocfs2_trace.h
>> +++ b/fs/ocfs2/ocfs2_trace.h
>> @@ -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 */
>> --
>> 1.7.9.5
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ocfs2-devel] [PATCH 2/2] ocfs2: Add trace point for ocfs2_set_inode_attr()
2013-03-11 9:27 ` Jeff Liu
@ 2013-03-11 9:34 ` Joel Becker
0 siblings, 0 replies; 4+ messages in thread
From: Joel Becker @ 2013-03-11 9:34 UTC (permalink / raw)
To: ocfs2-devel
On Mon, Mar 11, 2013 at 05:27:05PM +0800, Jeff Liu wrote:
> Hi Joel,
> On 03/11/2013 05:10 PM, Joel Becker wrote:
> > 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
>
> Thanks,
> -Jeff
> >
> > Joel
> >
> > On Mon, Mar 11, 2013 at 01:29:22PM +0800, Jeff Liu wrote:
> >> Add trace point for ocfs2_set_inode_attr().
> >>
> >> # cat /debug/tracing/available_events |grep ocfs2_set_inode_attr
> >> ocfs2:ocfs2_set_inode_attr
> >>
> >> Signed-off-by: Jie Liu <jeff.liu@oracle.com>
> >> Cc: Joel Becker <jlbec@evilplan.org>
> >> Cc: Mark Fasheh <mfasheh@suse.com>
> >> ---
> >> fs/ocfs2/ioctl.c | 3 +++
> >> fs/ocfs2/ocfs2_trace.h | 6 ++++++
> >> 2 files changed, 9 insertions(+)
> >>
> >> diff --git a/fs/ocfs2/ioctl.c b/fs/ocfs2/ioctl.c
> >> index c739c24..764bf5c 100644
> >> --- a/fs/ocfs2/ioctl.c
> >> +++ b/fs/ocfs2/ioctl.c
> >> @@ -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);
> >> diff --git a/fs/ocfs2/ocfs2_trace.h b/fs/ocfs2/ocfs2_trace.h
> >> index 3b481f4..bcaca11 100644
> >> --- a/fs/ocfs2/ocfs2_trace.h
> >> +++ b/fs/ocfs2/ocfs2_trace.h
> >> @@ -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 */
> >> --
> >> 1.7.9.5
> >
>
--
"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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-11 9:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-11 5:29 [Ocfs2-devel] [PATCH 2/2] ocfs2: Add trace point for ocfs2_set_inode_attr() Jeff Liu
2013-03-11 9:10 ` Joel Becker
2013-03-11 9:27 ` Jeff Liu
2013-03-11 9:34 ` Joel Becker
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.