]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Write non-zero data as part of osd benchmark test. 45118/head
authorSridhar Seshasayee <sseshasa@redhat.com>
Tue, 22 Feb 2022 12:25:44 +0000 (17:55 +0530)
committerSridhar Seshasayee <sseshasa@redhat.com>
Tue, 22 Feb 2022 13:08:24 +0000 (18:38 +0530)
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 <sseshasa@redhat.com>
Fixes: https://tracker.ceph.com/issues/54364
src/osd/OSD.cc

index 3b0fc860b91b4b03950d8d6b43f107519361869b..b7a68225e0602c54b3d58a4ffea59a248443617b 100644 (file)
@@ -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<onum; ++i) {
@@ -3243,7 +3243,7 @@ int OSD::run_osd_bench_test(
 
   bufferlist bl;
   bufferptr bp(bsize);
-  bp.zero();
+  memset(bp.c_str(), 'a', bp.length());
   bl.push_back(std::move(bp));
   bl.rebuild_page_aligned();