aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-02-15 15:11:51 -0500
committerSage Weil <sage@newdream.net>2010-02-15 15:11:51 -0500
commit153a008bf7915ea9127341409170cb197d111282 (patch)
treeda9852014c4a71f8578437698200b56218874110
parent6c5d1a49e5e88ee831117f4b2375829933ad15da (diff)
ceph: reset osd connections after fault
A single osd connection fault (e.g. tcp disconnect) wasn't reopening the connection, which causes all current and future requests for that osd to hang. Signed-off-by: Sage Weil <sage@newdream.net>
-rw-r--r--fs/ceph/osd_client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ceph/osd_client.c b/fs/ceph/osd_client.c
index 7f8a26fdcc2c..fa0f73703954 100644
--- a/fs/ceph/osd_client.c
+++ b/fs/ceph/osd_client.c
@@ -369,7 +369,6 @@ static void osd_reset(struct ceph_connection *con)
369 return; 369 return;
370 dout("osd_reset osd%d\n", osd->o_osd); 370 dout("osd_reset osd%d\n", osd->o_osd);
371 osdc = osd->o_osdc; 371 osdc = osd->o_osdc;
372 osd->o_incarnation++;
373 down_read(&osdc->map_sem); 372 down_read(&osdc->map_sem);
374 kick_requests(osdc, osd); 373 kick_requests(osdc, osd);
375 up_read(&osdc->map_sem); 374 up_read(&osdc->map_sem);
@@ -921,7 +920,9 @@ static void kick_requests(struct ceph_osd_client *osdc,
921 920
922 dout("kick_requests osd%d\n", kickosd ? kickosd->o_osd : -1); 921 dout("kick_requests osd%d\n", kickosd ? kickosd->o_osd : -1);
923 mutex_lock(&osdc->request_mutex); 922 mutex_lock(&osdc->request_mutex);
924 if (!kickosd) { 923 if (kickosd) {
924 __reset_osd(osdc, kickosd);
925 } else {
925 for (p = rb_first(&osdc->osds); p; p = n) { 926 for (p = rb_first(&osdc->osds); p; p = n) {
926 struct ceph_osd *osd = 927 struct ceph_osd *osd =
927 rb_entry(p, struct ceph_osd, o_node); 928 rb_entry(p, struct ceph_osd, o_node);