From: Sage Weil Date: Tue, 24 Aug 2010 18:24:27 +0000 (-0700) Subject: mds: no snaps in system dirs, but root is ok X-Git-Tag: v0.22~229^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ec02fe38a7367bca311e9e1bd2c0eeefc8b5e335;p=ceph.git mds: no snaps in system dirs, but root is ok --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 3e52c790efc0..f2d1df9c6cc3 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -5651,6 +5651,11 @@ void Server::handle_client_mksnap(MDRequest *mdr) reply_request(mdr, -ENOTDIR); return; } + if (diri->is_system() && !diri->is_root()) { + // no snaps in system dirs (root is ok) + reply_request(mdr, -EPERM); + return; + } const string &snapname = req->get_filepath().last_dentry(); dout(10) << "mksnap " << snapname << " on " << *diri << dendl;