]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: enable deleting pools when FS disabled
authorJohn Spray <john.spray@inktank.com>
Tue, 29 Apr 2014 16:17:56 +0000 (17:17 +0100)
committerJohn Spray <jspray@redhat.com>
Mon, 30 Jun 2014 09:33:03 +0000 (10:33 +0100)
Signed-off-by: John Spray <john.spray@inktank.com>
src/mds/MDSMap.h
src/mon/OSDMonitor.cc

index 9c075682bd40c1bf24d650a1754149f30d402511..913814ef9428f0e0fb4a1c9231118f1a69f9b5d0 100644 (file)
@@ -228,6 +228,8 @@ public:
   epoch_t get_epoch() const { return epoch; }
   void inc_epoch() { epoch++; }
 
+  bool get_enabled() const { return enabled; }
+
   const utime_t& get_created() const { return created; }
   void set_created(utime_t ct) { modified = created = ct; }
   const utime_t& get_modified() const { return modified; }
index 16c281cc48b049421d9d4129b08e49748a685b99..9d52edf7a003306ccefb77293f549f8a511c7c81 100644 (file)
@@ -5696,8 +5696,8 @@ int OSDMonitor::_check_remove_pool(int64_t pool, const pg_pool_t *p,
 
   // If the Pool is in use by CephFS, refuse to delete it
   MDSMap const &pending_mdsmap = mon->mdsmon()->pending_mdsmap;
-  if (pending_mdsmap.is_data_pool(pool) ||
-      pending_mdsmap.get_metadata_pool() == pool) {
+  if (pending_mdsmap.get_enabled() && (pending_mdsmap.is_data_pool(pool) ||
+      pending_mdsmap.get_metadata_pool() == pool)) {
     *ss << "pool '" << poolstr << "' is in use by CephFS";
     return -EBUSY;
   }