]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client/Client: added client_mount_uid and gid as parameters to getattr call
authorNishtha Rai <nishtha3rai@gmail.com>
Mon, 17 Aug 2015 14:50:46 +0000 (20:20 +0530)
committerSage Weil <sage@redhat.com>
Thu, 1 Oct 2015 13:41:32 +0000 (09:41 -0400)
Signed-off-by: Nishtha Rai <nishtha3rai@gmail.com>
src/client/Client.cc
src/common/config_opts.h

index a8159c1d2df16ad1b433bf5865e5a0a3fd8f2af3..b62dbdfedf6abcbb2cb5788b4805379ace33debe 100644 (file)
@@ -5053,7 +5053,7 @@ int Client::mount(const std::string &mount_root, bool require_mds)
     MetaRequest *req = new MetaRequest(CEPH_MDS_OP_GETATTR);
     req->set_filepath(fp);
     req->head.args.getattr.mask = CEPH_STAT_CAP_INODE_ALL;
-    int res = make_request(req, -1, -1);
+    int res = make_request(req, cct->_conf->client_mount_uid, cct->_conf->client_mount_gid);
     if (res < 0) {
       if (res == -EACCES && root) {
        ldout(cct, 1) << __func__ << " EACCES on parent of mount point; quotas may not work" << dendl;
index 7a1980165611f83ad8824a989561f906f5264b49..b34ea3f1469ab8f77b7b6ada7dd4628bd05f0630 100644 (file)
@@ -339,6 +339,8 @@ OPTION(client_readahead_max_bytes, OPT_LONGLONG, 0)  //8 * 1024*1024
 OPTION(client_readahead_max_periods, OPT_LONGLONG, 4)  // as multiple of file layout period (object size * num stripes)
 OPTION(client_snapdir, OPT_STR, ".snap")
 OPTION(client_mountpoint, OPT_STR, "/")
+OPTION(client_mount_uid, OPT_INT, -1)
+OPTION(client_mount_gid, OPT_INT, -1)
 OPTION(client_notify_timeout, OPT_INT, 10) // in seconds
 OPTION(osd_client_watch_timeout, OPT_INT, 30) // in seconds
 OPTION(client_caps_release_delay, OPT_INT, 5) // in seconds