diff --git a/src/blockstore/blockstore.h b/src/blockstore/blockstore.h index 950fdaa9..80bfa2d4 100644 --- a/src/blockstore/blockstore.h +++ b/src/blockstore/blockstore.h @@ -42,8 +42,7 @@ #define BS_OP_DELETE 6 #define BS_OP_LIST 7 #define BS_OP_ROLLBACK 8 -#define BS_OP_SYNC_STAB_ALL 9 -#define BS_OP_MAX 9 +#define BS_OP_MAX 8 #define BS_OP_PRIVATE_DATA_SIZE 256 @@ -113,14 +112,6 @@ Input: Output: - retval = 0 or negative error number (-ENOENT if no such version for stabilize) -## BS_OP_SYNC_STAB_ALL - -ONLY FOR TESTS! Sync and mark all unstable object versions as stable, at once. - -Input: Nothing except opcode -Output: -- retval = 0 or negative error number (-EINVAL) - ## BS_OP_LIST Get a list of all objects in this Blockstore. diff --git a/src/blockstore/blockstore_impl.cpp b/src/blockstore/blockstore_impl.cpp index 1344ac5f..8222adef 100644 --- a/src/blockstore/blockstore_impl.cpp +++ b/src/blockstore/blockstore_impl.cpp @@ -343,44 +343,6 @@ void blockstore_impl_t::enqueue_op(blockstore_op_t *op) ringloop->set_immediate([op]() { std::function(op->callback)(op); }); return; } - if (op->opcode == BS_OP_SYNC_STAB_ALL) - { - std::function *old_callback = new std::function(op->callback); - op->opcode = BS_OP_SYNC; - op->callback = [this, old_callback](blockstore_op_t *op) - { - if (op->retval >= 0 && unstable_writes.size() > 0) - { - op->opcode = BS_OP_STABLE; - op->len = unstable_writes.size(); - obj_ver_id *vers = new obj_ver_id[op->len]; - op->buf = vers; - int i = 0; - for (auto it = unstable_writes.begin(); it != unstable_writes.end(); it++, i++) - { - vers[i] = { - .oid = it->first, - .version = it->second, - }; - } - unstable_writes.clear(); - op->callback = [old_callback](blockstore_op_t *op) - { - obj_ver_id *vers = (obj_ver_id*)op->buf; - delete[] vers; - op->buf = NULL; - (*old_callback)(op); - delete old_callback; - }; - this->enqueue_op(op); - } - else - { - (*old_callback)(op); - delete old_callback; - } - }; - } if ((op->opcode == BS_OP_WRITE || op->opcode == BS_OP_WRITE_STABLE || op->opcode == BS_OP_DELETE) && !enqueue_write(op)) { ringloop->set_immediate([op]() { std::function(op->callback)(op); }); diff --git a/src/blockstore/fio_engine.cpp b/src/blockstore/fio_engine.cpp index 6304abf2..e3eb3952 100644 --- a/src/blockstore/fio_engine.cpp +++ b/src/blockstore/fio_engine.cpp @@ -225,7 +225,7 @@ static enum fio_q_status bs_queue(struct thread_data *td, struct io_u *io) bsd->last_sync = false; break; case DDIR_SYNC: - op->opcode = BS_OP_SYNC_STAB_ALL; + op->opcode = BS_OP_SYNC; op->callback = [io, n = bsd->op_n](blockstore_op_t *op) { bs_data *bsd = (bs_data*)io->engine_data;