aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-01-31 17:02:00 -0500
committerSage Weil <sage@inktank.com>2013-02-13 21:29:11 -0500
commit9cbb1d7268afa997a7f96d779470cc57d28e1a13 (patch)
tree573dfaa8590be939671c73d3536fe031094d1b2e /drivers
parent1e32d34cfa6759df58b5f4002664241f2a0fef6a (diff)
libceph: don't require r_num_pages for bio requests
There is a check in the completion path for osd requests that ensures the number of pages allocated is enough to hold the amount of incoming data expected. For bio requests coming from rbd the "number of pages" is not really meaningful (although total length would be). So stop requiring that nr_pages be supplied for bio requests. This is done by checking whether the pages pointer is null before checking the value of nr_pages. Note that this value is passed on to the messenger, but there it's only used for debugging--it's never used for validation. While here, change another spot that used r_pages in a debug message inappropriately, and also invalidate the r_con_filling_msg pointer after dropping a reference to it. This resolves: http://tracker.ceph.com/issues/3875 Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/rbd.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 3ba4836f024c..14a6967291d3 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1342,8 +1342,6 @@ static struct ceph_osd_request *rbd_osd_req_create(
1342 case OBJ_REQUEST_BIO: 1342 case OBJ_REQUEST_BIO:
1343 rbd_assert(obj_request->bio_list != NULL); 1343 rbd_assert(obj_request->bio_list != NULL);
1344 osd_req->r_bio = obj_request->bio_list; 1344 osd_req->r_bio = obj_request->bio_list;
1345 /* osd client requires "num pages" even for bio */
1346 osd_req->r_num_pages = calc_pages_for(offset, length);
1347 break; 1345 break;
1348 case OBJ_REQUEST_PAGES: 1346 case OBJ_REQUEST_PAGES:
1349 osd_req->r_pages = obj_request->pages; 1347 osd_req->r_pages = obj_request->pages;