]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
libceph: consolidate message prep code
authorAlex Elder <elder@inktank.com>
Thu, 7 Mar 2013 05:39:39 +0000 (23:39 -0600)
committerGreg Farnum <greg@inktank.com>
Wed, 13 Mar 2013 00:45:13 +0000 (17:45 -0700)
commitbc808d71a0cc94fa17ec16610dbb2d0946c73551
tree55c6784790429634b294630bc9b183b5c85db41b
parent338964611e55688f377b93a8623214eb05ed78dc
libceph: consolidate message prep code

In prepare_write_message_data(), various fields are initialized in
preparation for writing message data out.  Meanwhile, in
read_partial_message(), there is essentially the same block of code,
operating on message variables associated with an incoming message.

Generalize prepare_write_message_data() so it works for both
incoming and outcoming messages, and use it in both spots.  The
did_page_crc is not used for input (so it's harmless to initialize
it).

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