Merge PR #50178 into main

* refs/pull/50178/head:
	client: add comment about how quota affect space usage report

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
This commit is contained in:
Venky Shankar 2023-02-27 11:22:42 +05:30
commit 5b830aed2a

View File

@ -11244,6 +11244,9 @@ int Client::statfs(const char *path, struct statvfs *stbuf,
// enabled
ceph_assert(cct->_conf.get_val<bool>("client_quota") == false || quota_root != nullptr);
/* If bytes quota is set on a directory and conf option "client quota df"
* is also set, available space = quota limit - used space. Else,
* available space = total space - used space. */
if (quota_root && cct->_conf->client_quota_df && quota_root->quota.max_bytes) {
// Skip the getattr if any sessions are stale, as we don't want to