]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
JournalingFileStore: pass -1 as the alignment if unimportant
authorSamuel Just <sam.just@inktank.com>
Tue, 31 Jul 2012 16:04:40 +0000 (09:04 -0700)
committerSamuel Just <sam.just@inktank.com>
Tue, 30 Oct 2012 20:31:09 +0000 (13:31 -0700)
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 <sam.just@inktank.com>
src/os/JournalingObjectStore.cc

index 83864fc00cc525719638f8027c7b5baf06cf17c9..e1e077e77513af68180a59c3119480f5c4728025 100644 (file)
@@ -290,7 +290,8 @@ void JournalingObjectStore::_op_journal_transactions(list<ObjectStore::Transacti
     
   if (journal && journal->is_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<ObjectStore::Transaction*>::iterator p = tls.begin(); p != tls.end(); p++) {
       ObjectStore::Transaction *t = *p;
       if (t->get_data_length() > data_len &&