summaryrefslogtreecommitdiffstats
path: root/fs/ceph/addr.c
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-03-14 20:09:06 +0100
committerSage Weil <sage@inktank.com>2013-05-02 06:18:01 +0200
commit02ee07d3002e6c0b0c4ea1982cd7e6aeca203ed6 (patch)
tree1e06ce866c06a3fd03d4b6d9547c5bd376c8758f /fs/ceph/addr.c
parentceph: kill ceph alloc_page_vec() (diff)
downloadlinux-02ee07d3002e6c0b0c4ea1982cd7e6aeca203ed6.tar.xz
linux-02ee07d3002e6c0b0c4ea1982cd7e6aeca203ed6.zip
libceph: hold off building osd request
Defer building the osd request until just before submitting it in all callers except ceph_writepages_start(). (That caller will be handed in the next patch.) Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'fs/ceph/addr.c')
-rw-r--r--fs/ceph/addr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 7b6d9b22e254..0a3d2ce89660 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -319,8 +319,6 @@ static int start_read(struct inode *inode, struct list_head *page_list, int max)
if (IS_ERR(req))
return PTR_ERR(req);
- ceph_osdc_build_request(req, off, 1, &op, NULL, vino.snap, NULL);
-
/* build page vector */
nr_pages = calc_pages_for(0, len);
pages = kmalloc(sizeof(*pages) * nr_pages, GFP_NOFS);
@@ -351,6 +349,8 @@ static int start_read(struct inode *inode, struct list_head *page_list, int max)
req->r_callback = finish_read;
req->r_inode = inode;
+ ceph_osdc_build_request(req, off, 1, &op, NULL, vino.snap, NULL);
+
dout("start_read %p starting %p %lld~%lld\n", inode, req, off, len);
ret = ceph_osdc_start_request(osdc, req, false);
if (ret < 0)