Add no_scrub flag

checksums
Vitaliy Filippov 2 weeks ago
parent 3d9022ee0d
commit a5663103f3
  1. 1
      src/cli.h
  2. 2
      src/cli_status.cpp
  3. 1
      src/osd.cpp
  4. 1
      src/osd.h
  5. 5
      src/osd_scrub.cpp

@ -39,7 +39,6 @@ public:
ring_loop_t *ringloop = NULL;
epoll_manager_t *epmgr = NULL;
cluster_client_t *cli = NULL;
bool no_recovery = false, no_rebalance = false, readonly = false;
int waiting = 0;
cli_result_t etcd_err;

@ -201,6 +201,7 @@ resume_2:
bool readonly = json_is_true(parent->cli->merged_config["readonly"]);
bool no_recovery = json_is_true(parent->cli->merged_config["no_recovery"]);
bool no_rebalance = json_is_true(parent->cli->merged_config["no_rebalance"]);
bool no_scrub = json_is_true(parent->cli->merged_config["no_scrub"]);
if (parent->json_output)
{
// JSON output
@ -219,6 +220,7 @@ resume_2:
{ "readonly", readonly },
{ "no_recovery", no_recovery },
{ "no_rebalance", no_rebalance },
{ "no_scrub", no_scrub },
{ "pool_count", pool_count },
{ "active_pool_count", pools_active },
{ "pg_states", pgs_by_state },

@ -143,6 +143,7 @@ void osd_t::parse_config(const json11::Json & config, bool allow_disk_params)
run_primary = !json_is_false(config["run_primary"]);
no_rebalance = json_is_true(config["no_rebalance"]);
no_recovery = json_is_true(config["no_recovery"]);
no_scrub = json_is_true(config["no_scrub"]);
allow_test_ops = json_is_true(config["allow_test_ops"]);
if (!config["autosync_interval"].is_null())
{

@ -99,6 +99,7 @@ class osd_t
bool run_primary = false;
bool no_rebalance = false;
bool no_recovery = false;
bool no_scrub = false;
std::string bind_address;
int bind_port, listen_backlog = 128;
// FIXME: Implement client queue depth limit

@ -275,6 +275,11 @@ void osd_t::submit_scrub_op(object_id oid)
// To scrub first we need to read objects listings
bool osd_t::continue_scrub()
{
if (no_scrub)
{
// false = no more scrub work to do
return false;
}
if (scrub_list_op)
{
return true;

Loading…
Cancel
Save