]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ceph: cleanup ceph_flush_snaps()
authorYan, Zheng <zyan@redhat.com>
Tue, 5 Jul 2016 13:08:07 +0000 (21:08 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 28 Jul 2016 01:00:44 +0000 (03:00 +0200)
commited9b430c9ba99e70e8ddd7e08429c4c2a620ba74
tree01af2d3659aeb5635b9e5644319bed8f9aee7aac
parent7bc00fddb9de7f78f742bc24d95e15abde15c078
ceph: cleanup ceph_flush_snaps()

This patch devide __ceph_flush_snaps() into two stags. In the first
stage, __ceph_flush_snaps() assign snapcaps flush TIDs and add them
to cap flush lists. __ceph_flush_snaps() keeps holding the
i_ceph_lock in this stagge. So inode's auth cap can not change. In
the second stage, __ceph_flush_snaps() send flushsnap cap messages.
i_ceph_lock is unlocked before sending each cap message. If auth cap
changes in the middle, __ceph_flush_snaps() just stops. This is OK
because kick_flushing_inode_caps() will re-send flushsnap cap messages
to inode's new auth MDS.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
fs/ceph/caps.c
fs/ceph/snap.c
fs/ceph/super.h