summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-03-12 05:34:23 +0100
committerSage Weil <sage@inktank.com>2013-05-02 06:17:34 +0200
commitf5db90bcf2c69d099f9d828a8104796f41de6bc5 (patch)
treee0f5e2c76beeea42d41c47f5ebb9b8130bf8a171 /include/net
parentlibceph: kill most of ceph_msg_pos (diff)
downloadlinux-f5db90bcf2c69d099f9d828a8104796f41de6bc5.tar.xz
linux-f5db90bcf2c69d099f9d828a8104796f41de6bc5.zip
libceph: kill last of ceph_msg_pos
The only remaining field in the ceph_msg_pos structure is did_page_crc. In the new cursor model of things that flag (or something like it) belongs in the cursor. Define a new field "need_crc" in the cursor (which applies to all types of data) and initialize it to true whenever a cursor is initialized. In write_partial_message_data(), the data CRC still will be computed as before, but it will check the cursor->need_crc field to determine whether it's needed. Any time the cursor is advanced to a new piece of a data item, need_crc will be set, and this will cause the crc for that entire piece to be accumulated into the data crc. In write_partial_message_data() the intermediate crc value is now held in a local variable so it doesn't have to be byte-swapped so many times. In read_partial_msg_data() we do something similar (but mainly for consistency there). With that, the ceph_msg_pos structure can go away, and it no longer needs to be passed as an argument to prepare_message_data(). This cleanup is related to: http://tracker.ceph.com/issues/4428 Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'include/net')
0 files changed, 0 insertions, 0 deletions