]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
client: add comment about how quota affect space usage report
authorRishabh Dave <ridave@redhat.com>
Mon, 20 Feb 2023 07:19:48 +0000 (12:49 +0530)
committerRishabh Dave <ridave@redhat.com>
Mon, 20 Feb 2023 07:37:23 +0000 (13:07 +0530)
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 <ridave@redhat.com>
src/client/Client.cc

index a7211d5af7ed87afcffc6c4e18e9712d7dda8769..5c24dbdf398f8b412b7cabb31715c787fc5db093 100644 (file)
@@ -11258,6 +11258,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