From: Samuel Just Date: Tue, 31 Jul 2012 16:04:40 +0000 (-0700) Subject: JournalingFileStore: pass -1 as the alignment if unimportant X-Git-Tag: v0.55~130^2~41^2~15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5326c2212ad173449a5c46bd05d07d3cb0cee844;p=ceph.git JournalingFileStore: pass -1 as the alignment if unimportant Previously, data_align began at 0 and remained that way if no transaction contained a large data segment. This 0 was propagated to prepare_single_write, which padded out most of a page to ensure that the bl started with 0 alignment. Passing -1 will ensure that we don't prepad these small segments. Signed-off-by: Samuel Just --- diff --git a/src/os/JournalingObjectStore.cc b/src/os/JournalingObjectStore.cc index 83864fc00cc..e1e077e7751 100644 --- a/src/os/JournalingObjectStore.cc +++ b/src/os/JournalingObjectStore.cc @@ -290,7 +290,8 @@ void JournalingObjectStore::_op_journal_transactions(listis_writeable()) { bufferlist tbl; - unsigned data_len = 0, data_align = 0; + unsigned data_len = 0; + int data_align = -1; // -1 indicates that we don't care about the alignment for (list::iterator p = tls.begin(); p != tls.end(); p++) { ObjectStore::Transaction *t = *p; if (t->get_data_length() > data_len &&