From: Yan, Zheng Date: Wed, 19 Feb 2014 01:59:39 +0000 (+0800) Subject: mds: treat flushing as dirty when rejoining scattered locks X-Git-Tag: v0.79~111^2~19 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a1ff4896e8ec8da0e668de53c3b26ac41a558ab4;p=ceph.git mds: treat flushing as dirty when rejoining scattered locks Signed-off-by: Yan, Zheng --- diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index 02cabd371108..93b8492f46cd 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -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); } {