Skip to contentSkip to conversation

libceph: For nofail == false, if __map_request failed,it should unregister.

PATCH Applied majianpeng 2 participants 2 messages Jul 16, 2013 – Jul 17, 2013 Ceph common code (libceph)

lore
Share & tools
lore

majianpeng

author
#0 lore raw

PATCH 1/2 libceph: For nofail == false, if __map_request failed,it should unregister.

For nofail == false request, if __map_request failed, the caller do cleanup work,like release the relative pages.It doesn't make any sense to retry this request.So only give up it.

---
 net/ceph/osd_client.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/ceph/osd_client.c +2 -1
index dd47889..7d40a61 100644
@@ -2129,7 +2129,8 @@ int ceph_osdc_start_request(struct ceph_osd_client *osdc,
 			dout("osdc_start_request failed map, "
 				" will retry %lld\n", req->r_tid);
 			rc = 0;
-		}
+		} else
+			__unregister_request(osdc, req);
 		goto out_unlock;
 	}
 	if (req->r_osd == NULL) {
Signature · 1 line
1.8.1.2
Applied
#1 lore raw

Re: [PATCH 1/2] libceph: For nofail == false, if __map_request failed, it should unregister.

Applied, thanks!

Quoted 26 lines · majianpeng

For nofail == false request, if __map_request failed, the caller do cleanup work,like release the relative pages.It doesn't make any sense to retry this request.So only give up it.

---
 net/ceph/osd_client.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/ceph/osd_client.c +2 -1
index dd47889..7d40a61 100644
@@ -2129,7 +2129,8 @@ int ceph_osdc_start_request(struct ceph_osd_client *osdc,
 			dout("osdc_start_request failed map, "
 				" will retry %lld\n", req->r_tid);
 			rc = 0;
-		}
+		} else
+			__unregister_request(osdc, req);
 		goto out_unlock;
 	}
 	if (req->r_osd == NULL) {
Signature · 1 line
1.8.1.2