]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: fix queuing inode to mdsdir's snaprealm
authorYan, Zheng <zyan@redhat.com>
Mon, 20 Jul 2015 02:14:06 +0000 (10:14 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 8 Sep 2015 20:14:29 +0000 (23:14 +0300)
commit67d2c7b7a33f195bf749c88f4b0c85ac52384f41
treecb944c5cd124ed8b1d57fdd4cba2f22cff03723c
parent7c86180b6de0ef40c774acb2ec53902d4220ccc0
ceph: fix queuing inode to mdsdir's snaprealm

During MDS failovers, MClientSnap message may cause kclient to move
some inodes from root directory's snaprealm to mdsdir's snaprealm
and queue snapshots for these inodes. For a FS has never created any
snapshot, both root directory's snaprealm and mdsdir's snaprealm
share the same snapshot contexts (both are ceph_empty_snapc). This
confuses ceph_put_wrbuffer_cap_refs(), make it unable to distinguish
snapshot buffers from head buffers.

The fix is do not use ceph_empty_snapc as snaprealm's cached context.

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