libceph: set page alignment in start_request()
authorAlex Elder <elder@inktank.com>
Thu, 14 Feb 2013 18:16:43 +0000 (12:16 -0600)
committerSage Weil <sage@inktank.com>
Thu, 2 May 2013 04:14:29 +0000 (21:14 -0700)
The page alignment field for a request is currently set in
ceph_osdc_build_request().  It's not needed at that point
nor do either of its callers need that value assigned at
any point before they call ceph_osdc_start_request().

So move that assignment into ceph_osdc_start_request().

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
net/ceph/osd_client.c

index c3d8c6904df37841c7757d93256ed4835b846fc4..1d9ebf967b00f426843a99199a07339953b7dc7e 100644 (file)
@@ -399,7 +399,6 @@ void ceph_osdc_build_request(struct ceph_osd_request *req,
                data_len += len;
        }
        req->r_request->hdr.data_len = cpu_to_le32(data_len);
-       req->r_request->page_alignment = req->r_page_alignment;
 
        BUG_ON(p > msg->front.iov_base + msg->front.iov_len);
        msg_size = p - msg->front.iov_base;
@@ -1743,6 +1742,7 @@ int ceph_osdc_start_request(struct ceph_osd_client *osdc,
 
        req->r_request->pages = req->r_pages;
        req->r_request->page_count = req->r_num_pages;
+       req->r_request->page_alignment = req->r_page_alignment;
 #ifdef CONFIG_BLOCK
        req->r_request->bio = req->r_bio;
 #endif