diff options
author | Yehuda Sadeh <yehuda@hq.newdream.net> | 2010-07-27 16:11:08 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-07-27 16:11:17 -0400 |
commit | 03066f23452ff088ad8e2c8acdf4443043f35b51 (patch) | |
tree | 37f03df4e28de87339cec3b88e479073c8cee958 /fs/ceph/mds_client.c | |
parent | 25848b3ec681c7018e3746dd850c1e8ed0a3dd6b (diff) |
ceph: use complete_all and wake_up_all
This fixes an issue triggered by running concurrent syncs. One of the syncs
would go through while the other would just hang indefinitely. In any case, we
never actually want to wake a single waiter, so the *_all functions should
be used.
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r-- | fs/ceph/mds_client.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 416c08d315db..dd440bd438a9 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
@@ -868,7 +868,7 @@ static int wake_up_session_cb(struct inode *inode, struct ceph_cap *cap, | |||
868 | { | 868 | { |
869 | struct ceph_inode_info *ci = ceph_inode(inode); | 869 | struct ceph_inode_info *ci = ceph_inode(inode); |
870 | 870 | ||
871 | wake_up(&ci->i_cap_wq); | 871 | wake_up_all(&ci->i_cap_wq); |
872 | if (arg) { | 872 | if (arg) { |
873 | spin_lock(&inode->i_lock); | 873 | spin_lock(&inode->i_lock); |
874 | ci->i_wanted_max_size = 0; | 874 | ci->i_wanted_max_size = 0; |
@@ -1564,7 +1564,7 @@ static void complete_request(struct ceph_mds_client *mdsc, | |||
1564 | if (req->r_callback) | 1564 | if (req->r_callback) |
1565 | req->r_callback(mdsc, req); | 1565 | req->r_callback(mdsc, req); |
1566 | else | 1566 | else |
1567 | complete(&req->r_completion); | 1567 | complete_all(&req->r_completion); |
1568 | } | 1568 | } |
1569 | 1569 | ||
1570 | /* | 1570 | /* |
@@ -1932,7 +1932,7 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg) | |||
1932 | if (head->safe) { | 1932 | if (head->safe) { |
1933 | req->r_got_safe = true; | 1933 | req->r_got_safe = true; |
1934 | __unregister_request(mdsc, req); | 1934 | __unregister_request(mdsc, req); |
1935 | complete(&req->r_safe_completion); | 1935 | complete_all(&req->r_safe_completion); |
1936 | 1936 | ||
1937 | if (req->r_got_unsafe) { | 1937 | if (req->r_got_unsafe) { |
1938 | /* | 1938 | /* |
@@ -1947,7 +1947,7 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg) | |||
1947 | 1947 | ||
1948 | /* last unsafe request during umount? */ | 1948 | /* last unsafe request during umount? */ |
1949 | if (mdsc->stopping && !__get_oldest_req(mdsc)) | 1949 | if (mdsc->stopping && !__get_oldest_req(mdsc)) |
1950 | complete(&mdsc->safe_umount_waiters); | 1950 | complete_all(&mdsc->safe_umount_waiters); |
1951 | mutex_unlock(&mdsc->mutex); | 1951 | mutex_unlock(&mdsc->mutex); |
1952 | goto out; | 1952 | goto out; |
1953 | } | 1953 | } |
@@ -2126,7 +2126,7 @@ static void handle_session(struct ceph_mds_session *session, | |||
2126 | pr_info("mds%d reconnect denied\n", session->s_mds); | 2126 | pr_info("mds%d reconnect denied\n", session->s_mds); |
2127 | remove_session_caps(session); | 2127 | remove_session_caps(session); |
2128 | wake = 1; /* for good measure */ | 2128 | wake = 1; /* for good measure */ |
2129 | complete(&mdsc->session_close_waiters); | 2129 | complete_all(&mdsc->session_close_waiters); |
2130 | kick_requests(mdsc, mds); | 2130 | kick_requests(mdsc, mds); |
2131 | break; | 2131 | break; |
2132 | 2132 | ||