Skip to content

Commit 5b90117

Browse files
committed
common/io_exerciser: Add version argument to callbacks in ceph_radios_io_sequence
Add new version that was missing from ceph_test_rados_io_sequence callbacks due to interface changes Signed-off-by: Jon Bailey <[email protected]>
1 parent afc2149 commit 5b90117

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

src/common/io_exerciser/RadosIo.cc

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ void RadosIo::applyIoOp(IoOp &op)
118118
op_info = std::make_shared<AsyncOpInfo>(0, op.length1);
119119
op_info->bl1 = db->generate_data(0, op.length1);
120120
op_info->wop.write_full(op_info->bl1);
121-
auto create_cb = [this] (boost::system::error_code ec) {
121+
auto create_cb = [this] (boost::system::error_code ec,
122+
version_t ver) {
122123
ceph_assert(ec == boost::system::errc::success);
123124
finish_io();
124125
};
@@ -132,7 +133,8 @@ void RadosIo::applyIoOp(IoOp &op)
132133
start_io();
133134
op_info = std::make_shared<AsyncOpInfo>();
134135
op_info->wop.remove();
135-
auto remove_cb = [this] (boost::system::error_code ec) {
136+
auto remove_cb = [this] (boost::system::error_code ec,
137+
version_t ver) {
136138
ceph_assert(ec == boost::system::errc::success);
137139
finish_io();
138140
};
@@ -148,7 +150,9 @@ void RadosIo::applyIoOp(IoOp &op)
148150
op_info->rop.read(op.offset1 * block_size,
149151
op.length1 * block_size,
150152
&op_info->bl1, nullptr);
151-
auto read_cb = [this, op_info] (boost::system::error_code ec, bufferlist bl) {
153+
auto read_cb = [this, op_info] (boost::system::error_code ec,
154+
version_t ver,
155+
bufferlist bl) {
152156
ceph_assert(ec == boost::system::errc::success);
153157
db->validate(op_info->bl1, op_info->offset1, op_info->length1);
154158
finish_io();
@@ -174,6 +178,7 @@ void RadosIo::applyIoOp(IoOp &op)
174178
op.length2 * block_size,
175179
&op_info->bl2, nullptr);
176180
auto read2_cb = [this, op_info] (boost::system::error_code ec,
181+
version_t ver,
177182
bufferlist bl) {
178183
ceph_assert(ec == boost::system::errc::success);
179184
db->validate(op_info->bl1, op_info->offset1, op_info->length1);
@@ -202,6 +207,7 @@ void RadosIo::applyIoOp(IoOp &op)
202207
op.length3 * block_size,
203208
&op_info->bl3, nullptr);
204209
auto read3_cb = [this, op_info] (boost::system::error_code ec,
210+
version_t ver,
205211
bufferlist bl) {
206212
ceph_assert(ec == boost::system::errc::success);
207213
db->validate(op_info->bl1, op_info->offset1, op_info->length1);
@@ -222,7 +228,8 @@ void RadosIo::applyIoOp(IoOp &op)
222228
op_info->bl1 = db->generate_data(op.offset1, op.length1);
223229

224230
op_info->wop.write(op.offset1 * block_size, op_info->bl1);
225-
auto write_cb = [this] (boost::system::error_code ec) {
231+
auto write_cb = [this] (boost::system::error_code ec,
232+
version_t ver) {
226233
ceph_assert(ec == boost::system::errc::success);
227234
finish_io();
228235
};
@@ -241,7 +248,8 @@ void RadosIo::applyIoOp(IoOp &op)
241248
op_info->bl2 = db->generate_data(op.offset2, op.length2);
242249
op_info->wop.write(op.offset1 * block_size, op_info->bl1);
243250
op_info->wop.write(op.offset2 * block_size, op_info->bl2);
244-
auto write2_cb = [this] (boost::system::error_code ec) {
251+
auto write2_cb = [this] (boost::system::error_code ec,
252+
version_t ver) {
245253
ceph_assert(ec == boost::system::errc::success);
246254
finish_io();
247255
};
@@ -263,7 +271,8 @@ void RadosIo::applyIoOp(IoOp &op)
263271
op_info->wop.write(op.offset1 * block_size, op_info->bl1);
264272
op_info->wop.write(op.offset2 * block_size, op_info->bl2);
265273
op_info->wop.write(op.offset3 * block_size, op_info->bl3);
266-
auto write3_cb = [this] (boost::system::error_code ec) {
274+
auto write3_cb = [this] (boost::system::error_code ec,
275+
version_t ver) {
267276
ceph_assert(ec == boost::system::errc::success);
268277
finish_io();
269278
};

0 commit comments

Comments
 (0)