void Model::swap_primary_secondary_oid() {
std::string old_primary;
old_primary = get_primary_oid();
- set_primary_oid(Model::get_secondary_oid());
+ set_primary_oid(get_secondary_oid());
set_secondary_oid(old_primary);
}
break;
}
}
-
-void ObjectModel::encode(ceph::buffer::list& bl) const {
- ENCODE_START(1, 1, bl);
- encode(primary_created, bl);
- if (primary_created) {
- encode(primary_contents, bl);
- }
- ENCODE_FINISH(bl);
-}
-
-void ObjectModel::decode(ceph::buffer::list::const_iterator& bl) {
- DECODE_START(1, bl);
- DECODE_OLDEST(1);
- decode(primary_created, bl);
- if (primary_created) {
- decode(primary_contents, bl);
- }
- DECODE_FINISH(bl);
-}
} else {
const std::string pool = spo.select();
- bufferlist inbl, outbl;
- auto formatter = std::make_unique<JSONFormatter>(false);
-
- JSONParser p;
- bool success = p.parse(outbl.c_str(), outbl.length());
- ceph_assert(success);
-
model = std::make_unique<ceph::io_exerciser::RadosIo>(
rados, asio, pool, primary_object_name, secondary_object_name, sbs.select(), rng(),
1, // 1 thread