If our cap locks us into a subdirectory (e.g., /foo), we will fail to
getattr on its parents (e.g., /). This is expected. Tolerate this case,
and warn that quotas may misbehave in that case (if they are set on one of
those parents).
Signed-off-by: Sage Weil <sage@redhat.com>
}
}
- // hack: get+pin root inode.
- // fuse assumes it's always there.
filepath fp(CEPH_INO_ROOT);
if (!mount_root.empty())
fp = filepath(mount_root.c_str());
req->set_filepath(fp);
req->head.args.getattr.mask = CEPH_STAT_CAP_INODE_ALL;
int res = make_request(req, -1, -1);
- ldout(cct, 10) << "root getattr result=" << res << dendl;
- if (res < 0)
+ if (res < 0) {
+ if (res == -EACCES && root) {
+ ldout(cct, 1) << __func__ << " EACCES on parent of mount point; quotas may not work" << dendl;
+ break;
+ }
return res;
+ }
if (fp.depth())
fp.pop_dentry();
break;
}
- assert(root_ancestor->is_root());
assert(root);
_ll_get(root);