]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: allow quota for root directory 36685/head
authorchencan <chen.can2@zte.com.cn>
Mon, 17 Aug 2020 10:57:06 +0000 (18:57 +0800)
committerchencan <chen.can2@zte.com.cn>
Mon, 17 Aug 2020 10:58:35 +0000 (18:58 +0800)
Signed-off-by: chencan <chen.can2@zte.com.cn>
src/mds/MDCache.cc
src/mds/Server.cc

index 331d85102aaca6c6be5415dfa93448aa19470a9e..56aaa629747cd0356c58cb244792a32837da2ece 100644 (file)
@@ -2372,22 +2372,6 @@ void MDCache::predirty_journal_parents(MutationRef mut, EMetaBlob *blob,
       }
     }
 
-    /* 
-     * the rule here is to follow the _oldest_ parent with dirty rstat
-     * data.  if we don't propagate all data, we add ourselves to the
-     * nudge list.  that way all rstat data will (eventually) get
-     * pushed up the tree.
-     *
-     * actually, no.  for now, silently drop rstats for old parents.  we need 
-     * hard link backpointers to do the above properly.
-     */
-
-    // stop?
-    if (pin->is_base())
-      break;
-    parentdn = pin->get_projected_parent_dn();
-    ceph_assert(parentdn);
-
     // rstat
     dout(10) << "predirty_journal_parents frag->inode on " << *parent << dendl;
 
@@ -2420,8 +2404,12 @@ void MDCache::predirty_journal_parents(MutationRef mut, EMetaBlob *blob,
 
     parent->check_rstats();
     broadcast_quota_to_client(pin);
+    if (pin->is_base())
+      break;
     // next parent!
     cur = pin;
+    parentdn = pin->get_projected_parent_dn();
+    ceph_assert(parentdn);
     parent = parentdn->get_dir();
     linkunlink = 0;
     do_parent_mtime = false;
index 77f2b561436bb14610a32a72a5f758c0176226aa..83eca15737ad489dc8a3f4437791990c6585ba55 100644 (file)
@@ -5560,7 +5560,7 @@ void Server::handle_set_vxattr(MDRequestRef& mdr, CInode *cur)
     pi.inode->layout = layout;
     pip = pi.inode.get();
   } else if (name.compare(0, 10, "ceph.quota") == 0) { 
-    if (!cur->is_dir() || cur->is_root()) {
+    if (!cur->is_dir()) {
       respond_to_request(mdr, -EINVAL);
       return;
     }