]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
ceph: build osd request message later for writepages
authorAlex Elder <elder@inktank.com>
Thu, 14 Mar 2013 19:09:05 +0000 (14:09 -0500)
committerAlex Elder <elder@inktank.com>
Fri, 5 Apr 2013 12:10:44 +0000 (07:10 -0500)
commitb0bb70d12c365872547f10d185bf88eba3ed6083
treeb6200a68b2f8d1e74298a9899151442d163a0811
parent64fa40fc119f2e1684a2c56aeecbaf29a792fb12
ceph: build osd request message later for writepages

Hold off building the osd request message in ceph_writepages_start()
until just before it will be submitted to the osd client for
execution.

We'll still create the request and allocate the page pointer array
after we learn we have at least one page to write.  A local variable
will be used to keep track of the allocated array of pages.  Wait
until just before submitting the request for assigning that page
array pointer to the request message.

Create ands use a new function osd_req_op_extent_update() whose
purpose is to serve this one spot where the length value supplied
when an osd request's op was initially formatted might need to get
changed (reduced, never increased) before submitting the request.

Previously, ceph_writepages_start() assigned the message header's
data length because of this update.  That's no longer necessary,
because ceph_osdc_build_request() will recalculate the right
value to use based on the content of the ops in the request.

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