]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
libceph: initialize data fields on last msg put
authorAlex Elder <elder@inktank.com>
Mon, 25 Mar 2013 16:54:30 +0000 (11:54 -0500)
committerAlex Elder <elder@inktank.com>
Fri, 29 Mar 2013 19:25:30 +0000 (14:25 -0500)
commiteae7f6ee40504328e53da49c20e8c868d51e770d
tree8d2e81ebc86d4028b21c5060c301b90f1f123d6c
parent0518f439e851b9a345c5ea39876eef06351c432f
libceph: initialize data fields on last msg put

When the last reference to a ceph message is dropped,
ceph_msg_last_put() is called to clean things up.

For "normal" messages (allocated via ceph_msg_new() rather than
being allocated from a memory pool) it's sufficient to just release
resources.  But for a mempool-allocated message we actually have to
re-initialize the data fields in the message back to initial state
so they're ready to go in the event the message gets reused.

Some of this was already done; this fleshes it out so it's done
more completely.

This resolves:
    http://tracker.ceph.com/issues/4540

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