From: John Spray Date: Tue, 29 Apr 2014 16:17:56 +0000 (+0100) Subject: mon: enable deleting pools when FS disabled X-Git-Tag: v0.84~164^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c442b0db405ba98038004a9289fbb58502dcc049;p=ceph.git mon: enable deleting pools when FS disabled Signed-off-by: John Spray --- diff --git a/src/mds/MDSMap.h b/src/mds/MDSMap.h index 9c075682bd40c..913814ef9428f 100644 --- a/src/mds/MDSMap.h +++ b/src/mds/MDSMap.h @@ -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; } diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 16c281cc48b04..9d52edf7a0033 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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; }