diff options
author | Yan, Zheng <zyan@redhat.com> | 2014-11-06 15:09:41 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@redhat.com> | 2014-12-17 20:09:51 +0300 |
commit | 97c85a828f36bbfffe9d77b977b65a5872b6cad4 (patch) | |
tree | dd432537785a075981f8e1ea5525b5f4f0006cf3 /fs/ceph/super.h | |
parent | 7cfa0313d0dc52e4da9f196f8ad5bfdf266fc1fb (diff) | |
download | talos-obmc-linux-97c85a828f36bbfffe9d77b977b65a5872b6cad4.tar.gz talos-obmc-linux-97c85a828f36bbfffe9d77b977b65a5872b6cad4.zip |
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>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index aca22879b41f..fc1c8255dead 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -699,6 +699,8 @@ extern void ceph_queue_cap_snap(struct ceph_inode_info *ci); extern int __ceph_finish_cap_snap(struct ceph_inode_info *ci, struct ceph_cap_snap *capsnap); extern void ceph_cleanup_empty_realms(struct ceph_mds_client *mdsc); +extern int ceph_snap_init(void); +extern void ceph_snap_exit(void); /* * a cap_snap is "pending" if it is still awaiting an in-progress |