mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
libceph: set the data pointers when encoding ops
Still using the osd request r_data_in and r_data_out pointer, but we're basically only referring to it via the data pointers in the osd ops. And we're transferring that information to the request or reply message only when the op indicates it's needed, in osd_req_encode_op(). To avoid a forward reference, ceph_osdc_msg_data_set() was moved up in the file. Don't bother calling ceph_osd_data_init(), in ceph_osd_alloc(), because the ops array will already be zeroed anyway. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
parent
a4ce40a9a7
commit
ec9123c567
2 changed files with 32 additions and 33 deletions
|
@ -51,7 +51,7 @@ struct ceph_osd {
|
|||
#define CEPH_OSD_MAX_OP 2
|
||||
|
||||
enum ceph_osd_data_type {
|
||||
CEPH_OSD_DATA_TYPE_NONE,
|
||||
CEPH_OSD_DATA_TYPE_NONE = 0,
|
||||
CEPH_OSD_DATA_TYPE_PAGES,
|
||||
CEPH_OSD_DATA_TYPE_PAGELIST,
|
||||
#ifdef CONFIG_BLOCK
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue