aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2013-04-10 05:32:05 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2013-04-10 05:32:05 -0400
commit7bd8b2eb32c404ebe61986083ce02642b6ff3bf6 (patch)
treecd8f84f3b8e6a133bc0d0afb4499e1d41663a53c /fs/gfs2
parent81ffbf654f0cfeeb44e69832b3d301958a4108d8 (diff)
GFS2: Add origin indicator to glock demote tracing
This adds the origin indicator to the trace point for glock demotion, so that it is possible to see where demote requests have come from. Note that requests generated from the demote_rq sysfs interface will show as remote, since they are intended to replicate exactly the effect of a demote reuqest from a remote node. It is still possible to tell these apart by looking at the process which initiated the demote request. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/glock.c2
-rw-r--r--fs/gfs2/trace_gfs2.h11
2 files changed, 8 insertions, 5 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 77d7927bcd75..3b9e1788ebf9 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -926,7 +926,7 @@ static void handle_callback(struct gfs2_glock *gl, unsigned int state,
926 } 926 }
927 if (gl->gl_ops->go_callback) 927 if (gl->gl_ops->go_callback)
928 gl->gl_ops->go_callback(gl, remote); 928 gl->gl_ops->go_callback(gl, remote);
929 trace_gfs2_demote_rq(gl); 929 trace_gfs2_demote_rq(gl, remote);
930} 930}
931 931
932void gfs2_print_dbg(struct seq_file *seq, const char *fmt, ...) 932void gfs2_print_dbg(struct seq_file *seq, const char *fmt, ...)
diff --git a/fs/gfs2/trace_gfs2.h b/fs/gfs2/trace_gfs2.h
index 2ee13e841e9f..20c007d747ab 100644
--- a/fs/gfs2/trace_gfs2.h
+++ b/fs/gfs2/trace_gfs2.h
@@ -159,9 +159,9 @@ TRACE_EVENT(gfs2_glock_put,
159/* Callback (local or remote) requesting lock demotion */ 159/* Callback (local or remote) requesting lock demotion */
160TRACE_EVENT(gfs2_demote_rq, 160TRACE_EVENT(gfs2_demote_rq,
161 161
162 TP_PROTO(const struct gfs2_glock *gl), 162 TP_PROTO(const struct gfs2_glock *gl, bool remote),
163 163
164 TP_ARGS(gl), 164 TP_ARGS(gl, remote),
165 165
166 TP_STRUCT__entry( 166 TP_STRUCT__entry(
167 __field( dev_t, dev ) 167 __field( dev_t, dev )
@@ -170,6 +170,7 @@ TRACE_EVENT(gfs2_demote_rq,
170 __field( u8, cur_state ) 170 __field( u8, cur_state )
171 __field( u8, dmt_state ) 171 __field( u8, dmt_state )
172 __field( unsigned long, flags ) 172 __field( unsigned long, flags )
173 __field( bool, remote )
173 ), 174 ),
174 175
175 TP_fast_assign( 176 TP_fast_assign(
@@ -179,14 +180,16 @@ TRACE_EVENT(gfs2_demote_rq,
179 __entry->cur_state = glock_trace_state(gl->gl_state); 180 __entry->cur_state = glock_trace_state(gl->gl_state);
180 __entry->dmt_state = glock_trace_state(gl->gl_demote_state); 181 __entry->dmt_state = glock_trace_state(gl->gl_demote_state);
181 __entry->flags = gl->gl_flags | (gl->gl_object ? (1UL<<GLF_OBJECT) : 0); 182 __entry->flags = gl->gl_flags | (gl->gl_object ? (1UL<<GLF_OBJECT) : 0);
183 __entry->remote = remote;
182 ), 184 ),
183 185
184 TP_printk("%u,%u glock %d:%lld demote %s to %s flags:%s", 186 TP_printk("%u,%u glock %d:%lld demote %s to %s flags:%s %s",
185 MAJOR(__entry->dev), MINOR(__entry->dev), __entry->gltype, 187 MAJOR(__entry->dev), MINOR(__entry->dev), __entry->gltype,
186 (unsigned long long)__entry->glnum, 188 (unsigned long long)__entry->glnum,
187 glock_trace_name(__entry->cur_state), 189 glock_trace_name(__entry->cur_state),
188 glock_trace_name(__entry->dmt_state), 190 glock_trace_name(__entry->dmt_state),
189 show_glock_flags(__entry->flags)) 191 show_glock_flags(__entry->flags),
192 __entry->remote ? "remote" : "local")
190 193
191); 194);
192 195