From 1694b8ab0bf51be773d238227c4f08b061ed4725 Mon Sep 17 00:00:00 2001 From: Jon Bailey Date: Mon, 13 Jan 2025 15:19:08 +0000 Subject: common/io_exerciser: Reorder lines in RadosIo send_command functions Signed-off-by: Jon Bailey --- src/common/io_exerciser/RadosIo.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/common/io_exerciser/RadosIo.cc') diff --git a/src/common/io_exerciser/RadosIo.cc b/src/common/io_exerciser/RadosIo.cc index 3e5d7e1e9a3..a78c074228b 100644 --- a/src/common/io_exerciser/RadosIo.cc +++ b/src/common/io_exerciser/RadosIo.cc @@ -16,8 +16,9 @@ template int send_osd_command(int osd, S& s, librados::Rados& rados, const char* name, ceph::buffer::list& inbl, ceph::buffer::list* outbl, Formatter* f) { - std::ostringstream oss; encode_json(name, s, f); + + std::ostringstream oss; f->flush(oss); int rc = rados.osd_command(osd, oss.str(), inbl, outbl, nullptr); return rc; @@ -27,8 +28,9 @@ template int send_mon_command(S& s, librados::Rados& rados, const char* name, ceph::buffer::list& inbl, ceph::buffer::list* outbl, Formatter* f) { - std::ostringstream oss; encode_json(name, s, f); + + std::ostringstream oss; f->flush(oss); int rc = rados.mon_command(oss.str(), inbl, outbl, nullptr); return rc; -- cgit v1.2.3