]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
types.h: fix typo by renaming quota.is_enable() to quota.is_enabled() 46902/head
authorXiubo Li <xiubli@redhat.com>
Fri, 1 Jul 2022 08:05:36 +0000 (16:05 +0800)
committerXiubo Li <xiubli@redhat.com>
Fri, 1 Jul 2022 08:05:43 +0000 (16:05 +0800)
Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/client/Client.cc
src/client/Inode.cc
src/include/cephfs/types.h
src/mds/MDCache.cc
src/mds/Server.cc

index 24318e601c898784cc1fdeb735fe1e6358ea418a..7c0562554ed8b2c2713baf7b448bb6377dbf2f89 100644 (file)
@@ -11214,7 +11214,7 @@ int Client::statfs(const char *path, struct statvfs *stbuf,
   // quota but we can see a parent of it that does have a quota, we'll
   // respect that one instead.
   ceph_assert(root != nullptr);
-  InodeRef quota_root = root->quota.is_enable(QUOTA_MAX_BYTES) ? root : get_quota_root(root.get(), perms, QUOTA_MAX_BYTES);
+  InodeRef quota_root = root->quota.is_enabled(QUOTA_MAX_BYTES) ? root : get_quota_root(root.get(), perms, QUOTA_MAX_BYTES);
 
   // get_quota_root should always give us something if client quotas are
   // enabled
@@ -12838,7 +12838,7 @@ int Client::_setxattr(Inode *in, const char *name, const void *value,
   int ret = _do_setxattr(in, name, value, size, flags, perms);
   if (ret >= 0 && check_realm) {
     // check if snaprealm was created for quota inode
-    if (in->quota.is_enable() &&
+    if (in->quota.is_enabled() &&
        !(in->snaprealm && in->snaprealm->ino == in->ino))
       ret = -CEPHFS_EOPNOTSUPP;
   }
@@ -13067,7 +13067,7 @@ int Client::_vxattrcb_fscrypt_file_set(Inode *in, const void *val, size_t size,
 
 bool Client::_vxattrcb_quota_exists(Inode *in)
 {
-  return in->quota.is_enable() &&
+  return in->quota.is_enabled() &&
    (in->snapid != CEPH_NOSNAP ||
     (in->snaprealm && in->snaprealm->ino == in->ino));
 }
@@ -14076,9 +14076,9 @@ int Client::_rename(Inode *fromdir, const char *fromname, Inode *todir, const ch
   }
   if (cct->_conf.get_val<bool>("client_quota") && fromdir != todir) {
     Inode *fromdir_root =
-      fromdir->quota.is_enable(QUOTA_MAX_FILES) ? fromdir : get_quota_root(fromdir, perm, QUOTA_MAX_FILES);
+      fromdir->quota.is_enabled(QUOTA_MAX_FILES) ? fromdir : get_quota_root(fromdir, perm, QUOTA_MAX_FILES);
     Inode *todir_root =
-      todir->quota.is_enable(QUOTA_MAX_FILES) ? todir : get_quota_root(todir, perm, QUOTA_MAX_FILES);
+      todir->quota.is_enabled(QUOTA_MAX_FILES) ? todir : get_quota_root(todir, perm, QUOTA_MAX_FILES);
     if (fromdir_root != todir_root) {
       return -CEPHFS_EXDEV;
     }
@@ -15476,7 +15476,7 @@ Inode *Client::get_quota_root(Inode *in, const UserPerm& perms, quota_max_t type
       if (p == inode_map.end())
        break;
 
-      if (p->second->quota.is_enable(type)) {
+      if (p->second->quota.is_enabled(type)) {
        quota_in = p->second;
        break;
       }
index 5c1523f2f427e52410f9de038f4c777a3570d709..ce58a2f14023e549c84665c2a9777c88b05d0bdd 100644 (file)
@@ -85,7 +85,7 @@ ostream& operator<<(ostream &out, const Inode &in)
   if (in.is_dir() && in.has_dir_layout())
     out << " has_dir_layout";
 
-  if (in.quota.is_enable())
+  if (in.quota.is_enabled())
     out << " " << in.quota;
 
   out << ' ' << &in << ")";
index 6709e9632dc253aaf4fe35be3a0118797327ee90..cca0a619305a6d7c10b5b174c6c85fbced2fb6cb 100644 (file)
@@ -244,7 +244,7 @@ struct quota_info_t
   bool is_valid() const {
     return max_bytes >=0 && max_files >=0;
   }
-  bool is_enable(quota_max_t type=QUOTA_ANY) const {
+  bool is_enabled(quota_max_t type=QUOTA_ANY) const {
     switch (type) {
     case QUOTA_MAX_FILES:
       return !!max_files;
index c3dae0cdb0da08a698822ea02e3ff0878dcd89a6..53be1d83fa5e686e9109befa760708e77ddb942f 100644 (file)
@@ -2007,7 +2007,7 @@ void MDCache::broadcast_quota_to_client(CInode *in, client_t exclude_ct, bool qu
     return;
 
   const auto& pi = in->get_projected_inode();
-  if (!pi->quota.is_enable() && !quota_change)
+  if (!pi->quota.is_enabled() && !quota_change)
     return;
 
   // creaete snaprealm for quota inode (quota was set before mimic)
index 5ec4aabb6e4f4f90715136e3b781a0213be4bd87..48b18791c6efbb4d7932d9098ecc03e827389d22 100644 (file)
@@ -5934,7 +5934,7 @@ void Server::handle_set_vxattr(MDRequestRef& mdr, CInode *cur)
       return;
     }
 
-    if (quota.is_enable() && !cur->get_projected_srnode())
+    if (quota.is_enabled() && !cur->get_projected_srnode())
       adjust_realm = true;
 
     if (!xlock_policylock(mdr, cur, false, adjust_realm))