]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: introduce global empty snap context
authorYan, Zheng <zyan@redhat.com>
Thu, 6 Nov 2014 07:09:41 +0000 (15:09 +0800)
committerIlya Dryomov <idryomov@redhat.com>
Wed, 17 Dec 2014 17:09:51 +0000 (20:09 +0300)
commit800ae4bb77c249bd56c04778fcd167adb8fafdd7
treedd432537785a075981f8e1ea5525b5f4f0006cf3
parent0f12aa42799feacbf3c835f0b3a22c5f6cabd5f7
ceph: introduce global empty snap context

Current snaphost code does not properly handle moving inode from one
empty snap realm to another empty snap realm. After changing inode's
snap realm, some dirty pages' snap context can be not equal to inode's
i_head_snap. This can trigger BUG() in ceph_put_wrbuffer_cap_refs()

The fix is introduce a global empty snap context for all empty snap
realm. This avoids triggering the BUG() for filesystem with no snapshot.

Fixes: http://tracker.ceph.com/issues/9928
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
fs/ceph/snap.c
fs/ceph/super.c
fs/ceph/super.h