From: Steven Whitehouse <swhiteho@redhat.com>
To: linux-kernel@vger.kernel.org, cluster-devel@redhat.com
Cc: Steven Whitehouse <swhiteho@redhat.com>
Subject: [PATCH 7/8] GFS2: Add origin indicator to glock demote tracing
Date: Fri, 26 Apr 2013 10:19:00 +0100 [thread overview]
Message-ID: <1366967941-7184-8-git-send-email-swhiteho@redhat.com> (raw)
In-Reply-To: <1366967941-7184-1-git-send-email-swhiteho@redhat.com>
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>
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 77d7927..3b9e178 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,
}
if (gl->gl_ops->go_callback)
gl->gl_ops->go_callback(gl, remote);
- trace_gfs2_demote_rq(gl);
+ trace_gfs2_demote_rq(gl, remote);
}
void 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 2ee13e8..20c007d 100644
--- a/fs/gfs2/trace_gfs2.h
+++ b/fs/gfs2/trace_gfs2.h
@@ -159,9 +159,9 @@ TRACE_EVENT(gfs2_glock_put,
/* Callback (local or remote) requesting lock demotion */
TRACE_EVENT(gfs2_demote_rq,
- TP_PROTO(const struct gfs2_glock *gl),
+ TP_PROTO(const struct gfs2_glock *gl, bool remote),
- TP_ARGS(gl),
+ TP_ARGS(gl, remote),
TP_STRUCT__entry(
__field( dev_t, dev )
@@ -170,6 +170,7 @@ TRACE_EVENT(gfs2_demote_rq,
__field( u8, cur_state )
__field( u8, dmt_state )
__field( unsigned long, flags )
+ __field( bool, remote )
),
TP_fast_assign(
@@ -179,14 +180,16 @@ TRACE_EVENT(gfs2_demote_rq,
__entry->cur_state = glock_trace_state(gl->gl_state);
__entry->dmt_state = glock_trace_state(gl->gl_demote_state);
__entry->flags = gl->gl_flags | (gl->gl_object ? (1UL<<GLF_OBJECT) : 0);
+ __entry->remote = remote;
),
- TP_printk("%u,%u glock %d:%lld demote %s to %s flags:%s",
+ TP_printk("%u,%u glock %d:%lld demote %s to %s flags:%s %s",
MAJOR(__entry->dev), MINOR(__entry->dev), __entry->gltype,
(unsigned long long)__entry->glnum,
glock_trace_name(__entry->cur_state),
glock_trace_name(__entry->dmt_state),
- show_glock_flags(__entry->flags))
+ show_glock_flags(__entry->flags),
+ __entry->remote ? "remote" : "local")
);
--
1.7.4
next prev parent reply other threads:[~2013-04-26 9:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-26 9:18 GFS2: Pre-pull patch posting (merge window) Steven Whitehouse
2013-04-26 9:18 ` [PATCH 1/8] GFS2: Clean up inode creation path Steven Whitehouse
2013-04-26 9:18 ` [PATCH 2/8] GFS2: Remove gfs2_refresh_inode from " Steven Whitehouse
2013-04-26 9:18 ` [PATCH 3/8] GFS2: Use gfs2_dinode_out() in the inode create path Steven Whitehouse
2013-04-26 9:18 ` [PATCH 4/8] GFS2: Remove vestigial parameter ip from function rs_deltree Steven Whitehouse
2013-04-26 9:18 ` [PATCH 5/8] GFS2: replace gfs2_ail structure with gfs2_trans Steven Whitehouse
2013-04-26 9:18 ` [PATCH 6/8] GFS2: Add origin indicator to glock callbacks Steven Whitehouse
2013-04-26 9:19 ` Steven Whitehouse [this message]
2013-04-26 9:19 ` [PATCH 8/8] GFS2: Flush work queue before clearing glock hash tables Steven Whitehouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1366967941-7184-8-git-send-email-swhiteho@redhat.com \
--to=swhiteho@redhat.com \
--cc=cluster-devel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome