]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
libceph: use data cursor for message pagelist
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:19 +0000 (17:45 -0700)
commitc0e059e4fb892ab3572fafcee8c777f3fc6069bf
tree7eee14c3d1f427270428cadb5a67ed0d661edafd
parentd18f48605a6f741d6002f3138bbbbfdd55af5c03
libceph: use data cursor for message pagelist

Switch to using the message cursor for the (non-trail) outgoing
pagelist data item in a message if present.

Notes on the logic changes in out_msg_pos_next():
    - only the mds client uses a ceph pagelist for message data;
    - if the mds client ever uses a pagelist, it never uses a page
      array (or anything else, for that matter) for data in the same
      message;
    - only the osd client uses the trail portion of a message data,
      and when it does, it never uses any other data fields for
      outgoing data in the same message; and finally
    - only the rbd client uses bio message data (never pagelist).

Therefore out_msg_pos_next() can assume:
    - if we're in the trail portion of a message, the message data
      pagelist, data, and bio can be ignored; and
    - if there is a page list, there will never be any a bio or page
      array data, and vice-versa.

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