From: Sage Weil Date: Wed, 30 Mar 2016 12:24:43 +0000 (-0400) Subject: Merge pull request #7062 from wonzhq/scrub-prio-pool X-Git-Tag: v10.1.1~58 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=052fa90eb7b52ab22a2471abff7eb578da06847e;p=ceph.git Merge pull request #7062 from wonzhq/scrub-prio-pool osd: add the support of per pool scrub priority Reviewed-by: Sage Weil --- 052fa90eb7b52ab22a2471abff7eb578da06847e diff --cc src/osd/PG.cc index 4fb606114dff,799d8d4c15ee..38623735f1a9 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@@ -2089,9 -2047,17 +2089,17 @@@ bool PG::queue_scrub( return true; } + unsigned PG::get_scrub_priority() + { + // a higher value -> a higher priority + int pool_scrub_priority = 0; + pool.info.opts.get(pool_opts_t::SCRUB_PRIORITY, &pool_scrub_priority); + return pool_scrub_priority > 0 ? pool_scrub_priority : cct->_conf->osd_scrub_priority; + } + struct C_PG_FinishRecovery : public Context { PGRef pg; - C_PG_FinishRecovery(PG *p) : pg(p) {} + explicit C_PG_FinishRecovery(PG *p) : pg(p) {} void finish(int r) { pg->_finish_recovery(this); }