assert(root != nullptr);
Inode *quota_root = root->quota.is_enable() ? root : get_quota_root(root, perms);
- // get_quota_root should always give us something if client quotas are
- // enabled
- assert(cct->_conf->client_quota == false || quota_root != nullptr);
+ // get_quota_root should always give us something
+ // because client quotas are always enabled
+ assert(quota_root != nullptr);
if (quota_root && cct->_conf->client_quota_df && quota_root->quota.max_bytes) {
else
return -EROFS;
}
- if (cct->_conf->client_quota &&
- fromdir != todir) {
+ if (fromdir != todir) {
Inode *fromdir_root =
fromdir->quota.is_enable() ? fromdir : get_quota_root(fromdir, perm);
Inode *todir_root =
Inode *Client::get_quota_root(Inode *in, const UserPerm& perms)
{
- if (!cct->_conf->client_quota)
- return NULL;
-
Inode *cur = in;
utime_t now = ceph_clock_now();
bool Client::check_quota_condition(Inode *in, const UserPerm& perms,
std::function<bool (const Inode &in)> test)
{
- if (!cct->_conf->client_quota)
- return false;
-
while (true) {
assert(in != NULL);
if (test(*in)) {
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
-OPTION(client_quota, OPT_BOOL, true)
OPTION(client_quota_df, OPT_BOOL, true) // use quota for df on subdir mounts
OPTION(client_oc, OPT_BOOL, true)
OPTION(client_oc_size, OPT_INT, 1024*1024* 200) // MB * n