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>
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 &&