From 09f94ace863255a7dd7075e269f8d7d63a398495 Mon Sep 17 00:00:00 2001 From: Sridhar Seshasayee Date: Tue, 22 Feb 2022 17:55:44 +0530 Subject: [PATCH] osd: Write non-zero data as part of osd benchmark test. An optimization (see PR: https://github.com/ceph/ceph/pull/43337) was made in BlueStore to avoid writing bufferlists made up of zeros. The osd benchmark used zero filled bufferlists and this resulted in inflated osd benchmark results. This issue is fixed by using bufferlists filled with non-zero values. Signed-off-by: Sridhar Seshasayee Fixes: https://tracker.ceph.com/issues/54364 --- src/osd/OSD.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 3b0fc860b91b4..b7a68225e0602 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -3226,7 +3226,7 @@ int OSD::run_osd_bench_test( if (osize && onum) { bufferlist bl; bufferptr bp(osize); - bp.zero(); + memset(bp.c_str(), 'a', bp.length()); bl.push_back(std::move(bp)); bl.rebuild_page_aligned(); for (int i=0; i