From: Mykola Golub Date: Fri, 17 Apr 2020 11:40:41 +0000 (+0100) Subject: cls/journal: use EC pool stripe width for padding appends X-Git-Tag: v16.1.0~2563^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F34608%2Fhead;p=ceph.git cls/journal: use EC pool stripe width for padding appends to avoid ECSubRead ops to reencode a partially updated stripe. Signed-off-by: Mykola Golub --- diff --git a/src/cls/journal/cls_journal.cc b/src/cls/journal/cls_journal.cc index fb1267fba10f..db5a6854ad0d 100644 --- a/src/cls/journal/cls_journal.cc +++ b/src/cls/journal/cls_journal.cc @@ -1183,6 +1183,11 @@ int journal_object_append(cls_method_context_t hctx, bufferlist *in, min_alloc_size = 8; } + auto stripe_width = cls_get_pool_stripe_width(hctx); + if (stripe_width > 0) { + min_alloc_size = round_up_to(min_alloc_size, stripe_width); + } + CLS_LOG(20, "pad to %" PRIu64, min_alloc_size); auto end = offset + data.length();