From 81adc4ebe6a75f0560d6911fed3679a14b659dd9 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Tue, 2 Jan 2018 15:55:50 +0800 Subject: [PATCH] client: don't mark snap directory complete when its dirstat is empty MDS has trouble in tracking dirstat for snap inode. Snap directory inode's dirstat can be inaccuracy. Signed-off-by: "Yan, Zheng" --- src/client/Client.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/client/Client.cc b/src/client/Client.cc index 8c25ae468fda9..2dfb5cbd49114 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -909,6 +909,7 @@ Inode * Client::add_update_inode(InodeStat *st, utime_t from, // setting I_COMPLETE needs to happen after adding the cap if (updating_inode && + in->snapid == CEPH_NOSNAP && in->is_dir() && (st->cap.caps & CEPH_CAP_FILE_SHARED) && (issued & CEPH_CAP_FILE_EXCL) == 0 && -- 2.39.5