]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/FSCommands: remove unnecessary luminous guards on app metadata
authorSage Weil <sage@redhat.com>
Fri, 8 Sep 2017 18:50:02 +0000 (14:50 -0400)
committerSage Weil <sage@redhat.com>
Thu, 14 Sep 2017 13:46:38 +0000 (09:46 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/FSCommands.cc

index b44061373c35367401c42240ae516991bc21cdf5..1e4ead537260da2693fb9a5774d0a2d51c5d32f8 100644 (file)
@@ -189,20 +189,16 @@ class FsNewHandler : public FileSystemCommandHandler
       return r;
     }
     
-    // if we're running as luminous, we have to set the pool application metadata
-    if (mon->osdmon()->osdmap.require_osd_release >= CEPH_RELEASE_LUMINOUS ||
-       mon->osdmon()->pending_inc.new_require_osd_release >= CEPH_RELEASE_LUMINOUS) {
-      if (!mon->osdmon()->is_writeable()) {
-       // not allowed to write yet, so retry when we can
-       mon->osdmon()->wait_for_writeable(op, new PaxosService::C_RetryMessage(mon->mdsmon(), op));
-       return -EAGAIN;
-      }
-      mon->osdmon()->do_application_enable(data,
-                                          pg_pool_t::APPLICATION_NAME_CEPHFS);
-      mon->osdmon()->do_application_enable(metadata,
-                                          pg_pool_t::APPLICATION_NAME_CEPHFS);
-      mon->osdmon()->propose_pending();
+    if (!mon->osdmon()->is_writeable()) {
+      // not allowed to write yet, so retry when we can
+      mon->osdmon()->wait_for_writeable(op, new PaxosService::C_RetryMessage(mon->mdsmon(), op));
+      return -EAGAIN;
     }
+    mon->osdmon()->do_application_enable(data,
+                                        pg_pool_t::APPLICATION_NAME_CEPHFS);
+    mon->osdmon()->do_application_enable(metadata,
+                                        pg_pool_t::APPLICATION_NAME_CEPHFS);
+    mon->osdmon()->propose_pending();
 
     // All checks passed, go ahead and create.
     fsmap.create_filesystem(fs_name, metadata, data,
@@ -521,17 +517,13 @@ class AddDataPoolHandler : public FileSystemCommandHandler
       return 0;
     }
 
-    // if we're running as luminous, we have to set the pool application metadata
-    if (mon->osdmon()->osdmap.require_osd_release >= CEPH_RELEASE_LUMINOUS ||
-       mon->osdmon()->pending_inc.new_require_osd_release >= CEPH_RELEASE_LUMINOUS) {
-      if (!mon->osdmon()->is_writeable()) {
-       // not allowed to write yet, so retry when we can
-       mon->osdmon()->wait_for_writeable(op, new PaxosService::C_RetryMessage(mon->mdsmon(), op));
-       return -EAGAIN;
-      }
-      mon->osdmon()->do_application_enable(poolid, pg_pool_t::APPLICATION_NAME_CEPHFS);
-      mon->osdmon()->propose_pending();
+    if (!mon->osdmon()->is_writeable()) {
+      // not allowed to write yet, so retry when we can
+      mon->osdmon()->wait_for_writeable(op, new PaxosService::C_RetryMessage(mon->mdsmon(), op));
+      return -EAGAIN;
     }
+    mon->osdmon()->do_application_enable(poolid, pg_pool_t::APPLICATION_NAME_CEPHFS);
+    mon->osdmon()->propose_pending();
 
     fsmap.modify_filesystem(
         fs->fscid,