summaryrefslogtreecommitdiffstats
path: root/src/common/io_exerciser/RadosIo.cc
diff options
context:
space:
mode:
authorJon Bailey <jonathan.bailey1@ibm.com>2025-01-13 16:19:08 +0100
committerJon Bailey <jonathan.bailey1@ibm.com>2025-01-13 16:19:08 +0100
commit1694b8ab0bf51be773d238227c4f08b061ed4725 (patch)
tree61dda5183e4310afc58309979b9583933bbecc98 /src/common/io_exerciser/RadosIo.cc
parentcommon/io_exerciser: Clear the stringstream in RadosIO class (diff)
downloadceph-1694b8ab0bf51be773d238227c4f08b061ed4725.tar.xz
ceph-1694b8ab0bf51be773d238227c4f08b061ed4725.zip
common/io_exerciser: Reorder lines in RadosIo send_command functions
Signed-off-by: Jon Bailey <jonathan.bailey1@ibm.com>
Diffstat (limited to '')
-rw-r--r--src/common/io_exerciser/RadosIo.cc6
1 files changed, 4 insertions, 2 deletions
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 <typename S>
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 <typename S>
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;