]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: change the type of data_pools
authorVicente Cheng <vicente_cheng@bigtera.com>
Tue, 23 May 2017 07:37:10 +0000 (15:37 +0800)
committerVicente Cheng <vicente_cheng@bigtera.com>
Thu, 25 May 2017 02:50:19 +0000 (10:50 +0800)
commitde0ce386ee59dbf70a010696d4aa91d46ed73b20
tree0ea64f4d06fe6ae9bf134620160c612562f0d93a
parent9e297686f73d85c74b31821df1ba16fc75bbf0ee
mds: change the type of data_pools

Change the type of data_pools from `set` to `vector`

In following scenario, we found something strange here.

Here we have two pools as following:

- data_pool1    id: 20
- data_pool2    id: 21

First, we create ceph fs with `data_pool2` and default data_pool is `data_pool2`.
Then, add the new data pool `data_pool1`.
Now, the default data_pool will be data_pool1.

Because set will sort, we can't remain the default data_pool as we wish.
(we assume that the default data_pool should be the data_pool that we create cephfs)

It seems vector is more suitable than set.

Signed-off-by: Vicente Cheng <vicente_cheng@bigtera.com>
src/mds/FSMap.cc
src/mds/MDSMap.cc
src/mds/MDSMap.h
src/mds/PurgeQueue.cc
src/mds/SnapServer.cc
src/mon/FSCommands.cc
src/mon/MDSMonitor.cc