]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: properly setup client_need_snapflush for snap inode 22137/head
authorYan, Zheng <zyan@redhat.com>
Mon, 14 May 2018 03:34:42 +0000 (11:34 +0800)
committerYan, Zheng <zyan@redhat.com>
Tue, 22 May 2018 03:08:58 +0000 (11:08 +0800)
commit0faa143a459c00b1cf6b562873e446a69467cef1
treef026cdbc7ed3497f823f8b18b5899a4dce8ccec7
parent06bdd79620b1d40d871d4f6ae2ea794c34bf722c
mds: properly setup client_need_snapflush for snap inode

MDCache::cow_inode() checks "cap->issued() & CEPH_CAP_ANY_WR" to decide
if it needs to setup client_need_snapflush for the new snap inode. If
cap message flushes dirty caps and releases the same caps, cap->issued()
may have no WR caps when MDCache::cow_inode() gets called. The solution
is temporarily setting NEEDSNAPFLUSH on Capability::state.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 9fb61cd65895dbdb92cb46d24be8bf79ce57409d)
src/mds/Locker.cc