From: Sage Weil Date: Sat, 11 Aug 2018 19:22:03 +0000 (-0500) Subject: mon/OSDMonitor: drop variable pool auid for prepare_new_pool X-Git-Tag: v14.0.1~431^2~24 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c4cad29d255c0d39be037451d9956c6f45cbbbd0;p=ceph.git mon/OSDMonitor: drop variable pool auid for prepare_new_pool Always set to 0 for now. Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 2c2d75ccf0c1..250e9cc7c19c 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -5952,16 +5952,10 @@ int OSDMonitor::prepare_new_pool(MonOpRequestRef op) stringstream ss; string rule_name; int ret = 0; - if (m->auid) - ret = prepare_new_pool(m->name, m->auid, m->crush_rule, rule_name, - 0, 0, - erasure_code_profile, - pg_pool_t::TYPE_REPLICATED, 0, FAST_READ_OFF, &ss); - else - ret = prepare_new_pool(m->name, session->auid, m->crush_rule, rule_name, - 0, 0, - erasure_code_profile, - pg_pool_t::TYPE_REPLICATED, 0, FAST_READ_OFF, &ss); + ret = prepare_new_pool(m->name, m->crush_rule, rule_name, + 0, 0, + erasure_code_profile, + pg_pool_t::TYPE_REPLICATED, 0, FAST_READ_OFF, &ss); if (ret < 0) { dout(10) << __func__ << " got " << ret << " " << ss.str() << dendl; @@ -6460,7 +6454,6 @@ int OSDMonitor::check_pg_num(int64_t pool, int pg_num, int size, ostream *ss) /** * @param name The name of the new pool - * @param auid The auid of the pool owner. Can be -1 * @param crush_rule The crush rule to use. If <0, will use the system default * @param crush_rule_name The crush rule to use, if crush_rulset <0 * @param pg_num The pg_num to use. If set to 0, will use the system default @@ -6473,7 +6466,7 @@ int OSDMonitor::check_pg_num(int64_t pool, int pg_num, int size, ostream *ss) * * @return 0 on success, negative errno on failure. */ -int OSDMonitor::prepare_new_pool(string& name, uint64_t auid, +int OSDMonitor::prepare_new_pool(string& name, int crush_rule, const string &crush_rule_name, unsigned pg_num, unsigned pgp_num, @@ -6609,7 +6602,7 @@ int OSDMonitor::prepare_new_pool(string& name, uint64_t auid, pi->set_pg_num(pg_num); pi->set_pgp_num(pgp_num); pi->last_change = pending_inc.epoch; - pi->auid = auid; + pi->auid = 0; if (pool_type == pg_pool_t::TYPE_ERASURE) { pi->erasure_code_profile = erasure_code_profile; } else { @@ -11170,7 +11163,7 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, else if (fast_read_param > 0) fast_read = FAST_READ_ON; - err = prepare_new_pool(poolstr, 0, // auid=0 for admin created pool + err = prepare_new_pool(poolstr, -1, // default crush rule rule_name, pg_num, pgp_num, diff --git a/src/mon/OSDMonitor.h b/src/mon/OSDMonitor.h index f8472c620a1b..4d560811a857 100644 --- a/src/mon/OSDMonitor.h +++ b/src/mon/OSDMonitor.h @@ -446,7 +446,7 @@ private: unsigned *stripe_width, ostream *ss); int check_pg_num(int64_t pool, int pg_num, int size, ostream* ss); - int prepare_new_pool(string& name, uint64_t auid, + int prepare_new_pool(string& name, int crush_rule, const string &crush_rule_name, unsigned pg_num, unsigned pgp_num,