From: Vicente Cheng Date: Tue, 23 May 2017 07:47:35 +0000 (+0800) Subject: cephfs: Add some check befor we want to add new data pool X-Git-Tag: ses5-milestone6~9^2~37^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8f7c932fa021e71f99411827844ae120930afcf1;p=ceph.git cephfs: Add some check befor we want to add new data pool Signed-off-by: Vicente Cheng --- diff --git a/src/mon/FSCommands.cc b/src/mon/FSCommands.cc index b36443411d3..b5b11463857 100644 --- a/src/mon/FSCommands.cc +++ b/src/mon/FSCommands.cc @@ -488,6 +488,12 @@ class AddDataPoolHandler : public FileSystemCommandHandler return r; } + // no-op when the data_pool already on fs + if (fs->mds_map.is_data_pool(poolid)) { + ss << "data pool " << poolid << " is already on fs " << fs_name; + return 0; + } + fsmap.modify_filesystem( fs->fscid, [poolid](std::shared_ptr fs)