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/osd_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/osd_client.c')
-rw-r--r-- | fs/ceph/osd_client.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ceph/osd_client.c b/fs/ceph/osd_client.c index 92b7251a53f1..e38522347898 100644 --- a/fs/ceph/osd_client.c +++ b/fs/ceph/osd_client.c | |||
@@ -862,12 +862,12 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg, | |||
862 | if (req->r_callback) | 862 | if (req->r_callback) |
863 | req->r_callback(req, msg); | 863 | req->r_callback(req, msg); |
864 | else | 864 | else |
865 | complete(&req->r_completion); | 865 | complete_all(&req->r_completion); |
866 | 866 | ||
867 | if (flags & CEPH_OSD_FLAG_ONDISK) { | 867 | if (flags & CEPH_OSD_FLAG_ONDISK) { |
868 | if (req->r_safe_callback) | 868 | if (req->r_safe_callback) |
869 | req->r_safe_callback(req, msg); | 869 | req->r_safe_callback(req, msg); |
870 | complete(&req->r_safe_completion); /* fsync waiter */ | 870 | complete_all(&req->r_safe_completion); /* fsync waiter */ |
871 | } | 871 | } |
872 | 872 | ||
873 | done: | 873 | done: |
@@ -1083,7 +1083,7 @@ done: | |||
1083 | if (newmap) | 1083 | if (newmap) |
1084 | kick_requests(osdc, NULL); | 1084 | kick_requests(osdc, NULL); |
1085 | up_read(&osdc->map_sem); | 1085 | up_read(&osdc->map_sem); |
1086 | wake_up(&osdc->client->auth_wq); | 1086 | wake_up_all(&osdc->client->auth_wq); |
1087 | return; | 1087 | return; |
1088 | 1088 | ||
1089 | bad: | 1089 | bad: |