mirror of
https://github.com/ceph/ceph
synced 2025-03-05 07:48:55 +00:00
objecter: add optional crush_rule parameter; set in pool_op_submit as needed
This commit is contained in:
parent
78375cfde9
commit
a9e1727172
@ -738,7 +738,8 @@ int Objecter::delete_selfmanaged_snap(int pool, snapid_t snap,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Objecter::create_pool(string& name, Context *onfinish, uint64_t auid)
|
||||
int Objecter::create_pool(string& name, Context *onfinish, uint64_t auid,
|
||||
__u8 crush_rule)
|
||||
{
|
||||
dout(10) << "create_pool name=" << name << dendl;
|
||||
PoolOp *op = new PoolOp;
|
||||
@ -751,6 +752,7 @@ int Objecter::create_pool(string& name, Context *onfinish, uint64_t auid)
|
||||
op->pool_op = POOL_OP_CREATE;
|
||||
op_pool[op->tid] = op;
|
||||
op->auid = auid;
|
||||
op->crush_rule = crush_rule;
|
||||
|
||||
pool_op_submit(op);
|
||||
|
||||
@ -805,6 +807,7 @@ void Objecter::pool_op_submit(PoolOp *op) {
|
||||
op->name, op->pool_op,
|
||||
op->auid, last_seen_osdmap_version);
|
||||
if (op->snapid) m->snapid = op->snapid;
|
||||
if (op->crush_rule) m->crush_rule = op->crush_rule;
|
||||
monc->send_mon_message(m);
|
||||
op->last_submit = g_clock.now();
|
||||
}
|
||||
|
@ -340,12 +340,13 @@ public:
|
||||
Context *onfinish;
|
||||
int pool_op;
|
||||
uint64_t auid;
|
||||
__u8 crush_rule;
|
||||
snapid_t snapid;
|
||||
bufferlist *blp;
|
||||
|
||||
utime_t last_submit;
|
||||
PoolOp() : tid(0), pool(0), onfinish(0), pool_op(0),
|
||||
auid(0), snapid(0), blp(NULL) {}
|
||||
auid(0), crush_rule(0), snapid(0), blp(NULL) {}
|
||||
};
|
||||
|
||||
|
||||
@ -676,7 +677,8 @@ public:
|
||||
int delete_pool_snap(int pool, string& snapName, Context *onfinish);
|
||||
int delete_selfmanaged_snap(int pool, snapid_t snap, Context *onfinish);
|
||||
|
||||
int create_pool(string& name, Context *onfinish, uint64_t auid=0);
|
||||
int create_pool(string& name, Context *onfinish, uint64_t auid=0,
|
||||
__u8 crush_rule=0);
|
||||
int delete_pool(int pool, Context *onfinish);
|
||||
int change_pool_auid(int pool, Context *onfinish, uint64_t auid);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user