]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: do not allow snaps on root dir
authorSage Weil <sage@newdream.net>
Mon, 18 Aug 2008 21:04:57 +0000 (14:04 -0700)
committerSage Weil <sage@newdream.net>
Mon, 18 Aug 2008 21:07:20 +0000 (14:07 -0700)
src/mds/Server.cc

index 99e16a6ecd56e19a876aba24e3926eba8995303e..c0e11f2ec934294fd3988998afd793754d8e0366 100644 (file)
@@ -5028,6 +5028,10 @@ void Server::handle_client_mksnap(MDRequest *mdr)
     reply_request(mdr, -ENOTDIR);
     return;
   }
+  if (diri->is_base()) {  // no snaps on root dir, until we can store it
+    reply_request(mdr, -EPERM);
+    return;
+  }
   dout(10) << "mksnap " << req->get_path2() << " on " << *diri << dendl;
 
   // lock snap