aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/messenger.h
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-12-22 13:43:42 -0500
committerSage Weil <sage@newdream.net>2009-12-23 11:17:19 -0500
commitec302645f4a9bd9ec757c30d185557e1c0972c1a (patch)
treeb03aee886f401affba79f8473b83bd190a69570a /fs/ceph/messenger.h
parent529cfcc46ffa2cbe4d07641c11e65f67fe7b66e4 (diff)
ceph: use connection mutex to protect read and write stages
Use a single mutex (previously out_mutex) to protect both read and write activity from concurrent ceph_con_* calls. Drop the mutex when doing callbacks to avoid nested locking (the callback may need to call something like ceph_con_close). Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/messenger.h')
-rw-r--r--fs/ceph/messenger.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/messenger.h b/fs/ceph/messenger.h
index e04c214b4f6f..94b55de90331 100644
--- a/fs/ceph/messenger.h
+++ b/fs/ceph/messenger.h
@@ -155,8 +155,9 @@ struct ceph_connection {
155 void *auth_reply_buf; /* where to put the authorizer reply */ 155 void *auth_reply_buf; /* where to put the authorizer reply */
156 int auth_reply_buf_len; 156 int auth_reply_buf_len;
157 157
158 struct mutex mutex;
159
158 /* out queue */ 160 /* out queue */
159 struct mutex out_mutex;
160 struct list_head out_queue; 161 struct list_head out_queue;
161 struct list_head out_sent; /* sending or sent but unacked */ 162 struct list_head out_sent; /* sending or sent but unacked */
162 u64 out_seq; /* last message queued for send */ 163 u64 out_seq; /* last message queued for send */