diff options
Diffstat (limited to 'net/ceph')
-rw-r--r-- | net/ceph/osd_client.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 780caf6b0491..0174c04edac0 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
@@ -1284,6 +1284,24 @@ static void kick_requests(struct ceph_osd_client *osdc, int force_resend) | |||
1284 | for (p = rb_first(&osdc->requests); p; ) { | 1284 | for (p = rb_first(&osdc->requests); p; ) { |
1285 | req = rb_entry(p, struct ceph_osd_request, r_node); | 1285 | req = rb_entry(p, struct ceph_osd_request, r_node); |
1286 | p = rb_next(p); | 1286 | p = rb_next(p); |
1287 | |||
1288 | /* | ||
1289 | * For linger requests that have not yet been | ||
1290 | * registered, move them to the linger list; they'll | ||
1291 | * be sent to the osd in the loop below. Unregister | ||
1292 | * the request before re-registering it as a linger | ||
1293 | * request to ensure the __map_request() below | ||
1294 | * will decide it needs to be sent. | ||
1295 | */ | ||
1296 | if (req->r_linger && list_empty(&req->r_linger_item)) { | ||
1297 | dout("%p tid %llu restart on osd%d\n", | ||
1298 | req, req->r_tid, | ||
1299 | req->r_osd ? req->r_osd->o_osd : -1); | ||
1300 | __unregister_request(osdc, req); | ||
1301 | __register_linger_request(osdc, req); | ||
1302 | continue; | ||
1303 | } | ||
1304 | |||
1287 | err = __map_request(osdc, req, force_resend); | 1305 | err = __map_request(osdc, req, force_resend); |
1288 | if (err < 0) | 1306 | if (err < 0) |
1289 | continue; /* error */ | 1307 | continue; /* error */ |
@@ -1298,17 +1316,6 @@ static void kick_requests(struct ceph_osd_client *osdc, int force_resend) | |||
1298 | req->r_flags |= CEPH_OSD_FLAG_RETRY; | 1316 | req->r_flags |= CEPH_OSD_FLAG_RETRY; |
1299 | } | 1317 | } |
1300 | } | 1318 | } |
1301 | if (req->r_linger && list_empty(&req->r_linger_item)) { | ||
1302 | /* | ||
1303 | * register as a linger so that we will | ||
1304 | * re-submit below and get a new tid | ||
1305 | */ | ||
1306 | dout("%p tid %llu restart on osd%d\n", | ||
1307 | req, req->r_tid, | ||
1308 | req->r_osd ? req->r_osd->o_osd : -1); | ||
1309 | __register_linger_request(osdc, req); | ||
1310 | __unregister_request(osdc, req); | ||
1311 | } | ||
1312 | } | 1319 | } |
1313 | 1320 | ||
1314 | list_for_each_entry_safe(req, nreq, &osdc->req_linger, | 1321 | list_for_each_entry_safe(req, nreq, &osdc->req_linger, |
@@ -1316,6 +1323,7 @@ static void kick_requests(struct ceph_osd_client *osdc, int force_resend) | |||
1316 | dout("linger req=%p req->r_osd=%p\n", req, req->r_osd); | 1323 | dout("linger req=%p req->r_osd=%p\n", req, req->r_osd); |
1317 | 1324 | ||
1318 | err = __map_request(osdc, req, force_resend); | 1325 | err = __map_request(osdc, req, force_resend); |
1326 | dout("__map_request returned %d\n", err); | ||
1319 | if (err == 0) | 1327 | if (err == 0) |
1320 | continue; /* no change and no osd was specified */ | 1328 | continue; /* no change and no osd was specified */ |
1321 | if (err < 0) | 1329 | if (err < 0) |