]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: do not check for pool existence in osdmap
authorSage Weil <sage@inktank.com>
Wed, 26 Dec 2012 19:42:04 +0000 (11:42 -0800)
committerSage Weil <sage@inktank.com>
Wed, 26 Dec 2012 19:58:41 +0000 (11:58 -0800)
We don't have a wait mechanism to ensure the MSDMap has the latest osdmap
here.  Just trust the MDSMap.

Signed-off-by: Sage Weil <sage@inktank.com>
src/mds/Server.cc

index 64e99a1e5a460ee802fefdbb401da56f1f76582c..a677bd2c2aae6510cf5b748a7cf3f407e9860f8c 100644 (file)
@@ -2623,8 +2623,7 @@ void Server::handle_client_openc(MDRequest *mdr)
     reply_request(mdr, -EINVAL);
     return;
   }
-  if (!mds->osdmap->have_pg_pool(layout.fl_pg_pool) ||
-      !mds->mdsmap->is_data_pool(layout.fl_pg_pool)) {
+  if (!mds->mdsmap->is_data_pool(layout.fl_pg_pool)) {
     dout(10) << " invalid data pool " << layout.fl_pg_pool << dendl;
     reply_request(mdr, -EINVAL);
     return;
@@ -3294,8 +3293,7 @@ void Server::handle_client_setlayout(MDRequest *mdr)
     reply_request(mdr, -EINVAL);
     return;
   }
-  if (!mds->osdmap->have_pg_pool(layout.fl_pg_pool) ||
-      !mds->mdsmap->is_data_pool(layout.fl_pg_pool)) {
+  if (!mds->mdsmap->is_data_pool(layout.fl_pg_pool)) {
     dout(10) << " invalid data pool " << layout.fl_pg_pool << dendl;
     reply_request(mdr, -EINVAL);
     return;
@@ -3371,8 +3369,7 @@ void Server::handle_client_setdirlayout(MDRequest *mdr)
     delete layout;
     return;
   }
-  if (!mds->osdmap->have_pg_pool(layout->layout.fl_pg_pool) ||
-      !mds->mdsmap->is_data_pool(layout->layout.fl_pg_pool)) {
+  if (!mds->mdsmap->is_data_pool(layout->layout.fl_pg_pool)) {
     dout(10) << " invalid data pool " << layout->layout.fl_pg_pool << dendl;
     reply_request(mdr, -EINVAL);
     delete layout;