]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: new format for Transaction encode/decode
authorDong Yuan <yuandong1222@gmail.com>
Wed, 26 Nov 2014 17:58:50 +0000 (17:58 +0000)
committerSage Weil <sage@redhat.com>
Tue, 6 Jan 2015 21:29:06 +0000 (13:29 -0800)
commit3db4f696e51b9b86cc4366161a27c8eaf85856ab
tree02ce87f657057854687f7b1fe20239f46133ff73
parentdbae92253f6bf64431cdb28e5e5be41260de5aea
osd: new format for Transaction encode/decode

This patch add a new fixed size struct Transaction::Op to represent
all actions.

All coll and ghobject used by the transaction are keeped in two maps:
  coll:   map<coll_t, __le32> coll_index;
  object: map<ghobject_t, __le32> object_index;

And the Op struct use the map value(__le32) to refer coll and object,
so each coll and object is only need to encode once in the transaction.

Other variable-size fields(key/value/data) is encoded in bufferlist
data_bl.

Change-Id: I52b2fcd3217a6cb35de7b309a6dd74a99478feb2
Signed-off-by: Dong Yuan <yuandong1222@gmail.com>
src/os/ObjectStore.h