Remove BS_OP_SYNC_STAB_ALL from OSD
This commit is contained in:
+1
-6
@@ -196,7 +196,6 @@ void osd_t::parse_config(bool init)
|
|||||||
etcd_stats_interval = 30;
|
etcd_stats_interval = 30;
|
||||||
readonly = json_is_true(config["readonly"]);
|
readonly = json_is_true(config["readonly"]);
|
||||||
run_primary = !json_is_false(config["run_primary"]);
|
run_primary = !json_is_false(config["run_primary"]);
|
||||||
allow_test_ops = json_is_true(config["allow_test_ops"]);
|
|
||||||
}
|
}
|
||||||
log_level = config["log_level"].uint64_value();
|
log_level = config["log_level"].uint64_value();
|
||||||
auto old_no_rebalance = no_rebalance;
|
auto old_no_rebalance = no_rebalance;
|
||||||
@@ -470,11 +469,7 @@ void osd_t::exec_op(osd_op_t *cur_op)
|
|||||||
finish_op(cur_op, -EROFS);
|
finish_op(cur_op, -EROFS);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (cur_op->req.hdr.opcode == OSD_OP_TEST_SYNC_STAB_ALL)
|
if (cur_op->req.hdr.opcode == OSD_OP_SHOW_CONFIG)
|
||||||
{
|
|
||||||
exec_sync_stab_all(cur_op);
|
|
||||||
}
|
|
||||||
else if (cur_op->req.hdr.opcode == OSD_OP_SHOW_CONFIG)
|
|
||||||
{
|
{
|
||||||
exec_show_config(cur_op);
|
exec_show_config(cur_op);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,6 @@ class osd_t
|
|||||||
bool disable_tcp = false;
|
bool disable_tcp = false;
|
||||||
// FIXME: Implement client queue depth limit
|
// FIXME: Implement client queue depth limit
|
||||||
int client_queue_depth = 128;
|
int client_queue_depth = 128;
|
||||||
bool allow_test_ops = false;
|
|
||||||
int print_stats_interval = 3;
|
int print_stats_interval = 3;
|
||||||
int slow_log_interval = 10;
|
int slow_log_interval = 10;
|
||||||
int immediate_commit = IMMEDIATE_NONE;
|
int immediate_commit = IMMEDIATE_NONE;
|
||||||
@@ -319,7 +318,6 @@ class osd_t
|
|||||||
|
|
||||||
// secondary ops
|
// secondary ops
|
||||||
bool sec_check_pg_lock(osd_num_t primary_osd, const object_id &oid);
|
bool sec_check_pg_lock(osd_num_t primary_osd, const object_id &oid);
|
||||||
void exec_sync_stab_all(osd_op_t *cur_op);
|
|
||||||
void exec_show_config(osd_op_t *cur_op);
|
void exec_show_config(osd_op_t *cur_op);
|
||||||
void exec_secondary(osd_op_t *cur_op);
|
void exec_secondary(osd_op_t *cur_op);
|
||||||
void exec_secondary_real(osd_op_t *cur_op);
|
void exec_secondary_real(osd_op_t *cur_op);
|
||||||
|
|||||||
@@ -290,7 +290,6 @@ static uint64_t bs_op_to_osd_op[] = {
|
|||||||
OSD_OP_SEC_DELETE, // BS_OP_DELETE = 6
|
OSD_OP_SEC_DELETE, // BS_OP_DELETE = 6
|
||||||
OSD_OP_SEC_LIST, // BS_OP_LIST = 7
|
OSD_OP_SEC_LIST, // BS_OP_LIST = 7
|
||||||
OSD_OP_SEC_ROLLBACK, // BS_OP_ROLLBACK = 8
|
OSD_OP_SEC_ROLLBACK, // BS_OP_ROLLBACK = 8
|
||||||
OSD_OP_TEST_SYNC_STAB_ALL, // BS_OP_SYNC_STAB_ALL = 9
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void osd_t::handle_primary_bs_subop(osd_op_t *subop)
|
void osd_t::handle_primary_bs_subop(osd_op_t *subop)
|
||||||
|
|||||||
@@ -378,27 +378,3 @@ void osd_t::exec_show_config(osd_op_t *cur_op)
|
|||||||
cur_op->iov.push_back(cur_op->buf, cfg_str.size()+1);
|
cur_op->iov.push_back(cur_op->buf, cfg_str.size()+1);
|
||||||
finish_op(cur_op, cfg_str.size()+1);
|
finish_op(cur_op, cfg_str.size()+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void osd_t::exec_sync_stab_all(osd_op_t *cur_op)
|
|
||||||
{
|
|
||||||
// Sync and stabilize all objects
|
|
||||||
// This command is only valid for tests
|
|
||||||
cur_op->bs_op = new blockstore_op_t();
|
|
||||||
if (!allow_test_ops)
|
|
||||||
{
|
|
||||||
cur_op->bs_op->retval = -EINVAL;
|
|
||||||
secondary_op_callback(cur_op);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
cur_op->bs_op->opcode = BS_OP_SYNC_STAB_ALL;
|
|
||||||
cur_op->bs_op->callback = [this, cur_op](blockstore_op_t *bs_op)
|
|
||||||
{
|
|
||||||
secondary_op_callback(cur_op);
|
|
||||||
};
|
|
||||||
#ifdef OSD_STUB
|
|
||||||
cur_op->bs_op->retval = 0;
|
|
||||||
secondary_op_callback(cur_op);
|
|
||||||
#else
|
|
||||||
bs->enqueue_op(cur_op->bs_op);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user