]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
libceph: collapse all data items into one
authorAlex Elder <elder@inktank.com>
Tue, 12 Mar 2013 04:34:23 +0000 (23:34 -0500)
committerAlex Elder <elder@inktank.com>
Fri, 29 Mar 2013 19:26:12 +0000 (14:26 -0500)
commit5399bcc08492a1adc8beffa33a524555b008de62
tree037505ebe1886d1b593feac22d2dc9d35bed513d
parentb57e061750eb2d8f047e34323302ddeb8c62de67
libceph: collapse all data items into one

It turns out that only one of the data item types is ever used at
any one time in a single message (currently).
    - A page array is used by the osd client (on behalf of the file
      system) and by rbd.  Only one osd op (and therefore at most
      one data item) is ever used at a time by rbd.  And the only
      time the file system sends two, the second op contains no
      data.
    - A bio is only used by the rbd client (and again, only one
      data item per message)
    - A page list is used by the file system and by rbd for outgoing
      data, but only one op (and one data item) at a time.

We can therefore collapse all three of our data item fields into a
single field "data", and depend on the messenger code to properly
handle it based on its type.

This allows us to eliminate quite a bit of duplicated code.

This is related to:
    http://tracker.ceph.com/issues/4429

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