From: Nishtha Rai Date: Mon, 17 Aug 2015 14:50:46 +0000 (+0530) Subject: client/Client: added client_mount_uid and gid as parameters to getattr call X-Git-Tag: v10.0.0~123^2~28 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ddc69bb39946ad894714958fccb2922510d278a2;p=ceph.git client/Client: added client_mount_uid and gid as parameters to getattr call Signed-off-by: Nishtha Rai --- diff --git a/src/client/Client.cc b/src/client/Client.cc index a8159c1d2df..b62dbdfedf6 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -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; diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 7a198016561..b34ea3f1469 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -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