]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
libceph: make message data be a pointer
authorAlex Elder <elder@inktank.com>
Tue, 12 Mar 2013 04:34:24 +0000 (23:34 -0500)
committerAlex Elder <elder@inktank.com>
Fri, 29 Mar 2013 20:51:34 +0000 (15:51 -0500)
commitc658410c172bcd72d4c08ca034901c180278cd49
treeb2299d84db52a278935bb490f5e2abcfb722fea8
parentb91536b3b0182cbe1aeb7befe37bfa895de4f552
libceph: make message data be a pointer

Begin the transition from a single message data item to a list of
them by replacing the "data" structure in a message with a pointer
to a ceph_msg_data structure.

A null pointer will indicate the message has no data; replace the
use of ceph_msg_has_data() with a simple check for a null pointer.

Create functions ceph_msg_data_create() and ceph_msg_data_destroy()
to dynamically allocate and free a data item structure of a given type.

When a message has its data item "set," allocate one of these to
hold the data description, and free it when the last reference to
the message is dropped.

This partially resolves:
    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