From: Rishabh Dave Date: Mon, 20 Feb 2023 07:19:48 +0000 (+0530) Subject: client: add comment about how quota affect space usage report X-Git-Tag: v18.1.0~288^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ecdfea2ec33178ef0ae1da3089bba9f99932f19e;p=ceph-ci.git client: add comment about how quota affect space usage report Add a comment to explain that setting quota on a CephFS directory makes a difference to how much available space on CephFS is reported when that directory serves as the root of the CephFS mount. Signed-off-by: Rishabh Dave --- diff --git a/src/client/Client.cc b/src/client/Client.cc index a7211d5af7e..5c24dbdf398 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -11258,6 +11258,9 @@ int Client::statfs(const char *path, struct statvfs *stbuf, // enabled ceph_assert(cct->_conf.get_val("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