diff --git a/src/client/Client.cc b/src/client/Client.cc index cbb216aa768..98c987b00e9 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -9336,9 +9336,9 @@ int Client::statfs(const char *path, struct statvfs *stbuf, 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) { @@ -11607,8 +11607,7 @@ int Client::_rename(Inode *fromdir, const char *fromname, Inode *todir, const ch 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 = @@ -12816,9 +12815,6 @@ bool Client::ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, bool 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(); @@ -12890,9 +12886,6 @@ Inode *Client::get_quota_root(Inode *in, const UserPerm& perms) bool Client::check_quota_condition(Inode *in, const UserPerm& perms, std::function test) { - if (!cct->_conf->client_quota) - return false; - while (true) { assert(in != NULL); if (test(*in)) { diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 2b4fab679d8..405aeacf6d8 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -443,7 +443,6 @@ 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 -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