libceph: isolate other message data fields

Define ceph_msg_data_set_pagelist(), ceph_msg_data_set_bio(), and
ceph_msg_data_set_trail() to clearly abstract the assignment of the
remaining data-related fields in a ceph message structure.  Use the
new functions in the osd client and mds client.

This partially resolves:
    http://tracker.ceph.com/issues/4263

Signed-off-by: Alex Elder <[email protected]>
Reviewed-by: Josh Durgin <[email protected]>
This commit is contained in:
Alex Elder 2013-02-14 12:16:43 -06:00 • committed by Sage Weil
commit 27fa83852b
4 changed files with 37 additions and 4 deletions

View file

@ -2603,7 +2603,7 @@ static void send_mds_reconnect(struct ceph_mds_client *mdsc,
goto fail;
}
reply->pagelist = pagelist;
ceph_msg_data_set_pagelist(reply, pagelist);
if (recon_state.flock)
reply->hdr.version = cpu_to_le16(2);
reply->hdr.data_len = cpu_to_le32(pagelist->length);