]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: treat flushing as dirty when rejoining scattered locks
authorYan, Zheng <zheng.z.yan@intel.com>
Wed, 19 Feb 2014 01:59:39 +0000 (09:59 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Wed, 19 Mar 2014 03:29:13 +0000 (11:29 +0800)
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/CInode.cc

index 02cabd371108cdf31b088a9c7f8eac1f7a1a8bf0..93b8492f46cd814f5233e0d01e2d765971c85947 100644 (file)
@@ -1197,7 +1197,8 @@ void CInode::encode_lock_state(int type, bufferlist& bl)
     if (is_auth()) {
       ::encode(inode.version, bl);
     } else {
-      bool dirty = dirfragtreelock.is_dirty();
+      // treat flushing as dirty when rejoining cache
+      bool dirty = dirfragtreelock.is_dirty_or_flushing();
       ::encode(dirty, bl);
     }
     {
@@ -1231,7 +1232,8 @@ void CInode::encode_lock_state(int type, bufferlist& bl)
        ::encode(inode.inline_version, bl);
       }
     } else {
-      bool dirty = filelock.is_dirty();
+      // treat flushing as dirty when rejoining cache
+      bool dirty = filelock.is_dirty_or_flushing();
       ::encode(dirty, bl);
     }
 
@@ -1266,7 +1268,8 @@ void CInode::encode_lock_state(int type, bufferlist& bl)
     if (is_auth()) {
       ::encode(inode.version, bl);
     } else {
-      bool dirty = nestlock.is_dirty();
+      // treat flushing as dirty when rejoining cache
+      bool dirty = nestlock.is_dirty_or_flushing();
       ::encode(dirty, bl);
     }
     {