Skip to content

Commit

Permalink
ceph: reset osd connections after fault
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sage Weil committed Feb 15, 2010
1 parent 6c5d1a4 commit 153a008
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ static void osd_reset(struct ceph_connection *con)
return;
dout("osd_reset osd%d\n", osd->o_osd);
osdc = osd->o_osdc;
osd->o_incarnation++;
down_read(&osdc->map_sem);
kick_requests(osdc, osd);
up_read(&osdc->map_sem);
Expand Down Expand Up @@ -921,7 +920,9 @@ static void kick_requests(struct ceph_osd_client *osdc,

dout("kick_requests osd%d\n", kickosd ? kickosd->o_osd : -1);
mutex_lock(&osdc->request_mutex);
if (!kickosd) {
if (kickosd) {
__reset_osd(osdc, kickosd);
} else {
for (p = rb_first(&osdc->osds); p; p = n) {
struct ceph_osd *osd =
rb_entry(p, struct ceph_osd, o_node);
Expand Down

0 comments on commit 153a008

Please sign in to comment.