diff options
author | Yan, Zheng <zyan@redhat.com> | 2019-07-25 20:16:46 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2019-09-16 12:06:24 +0200 |
commit | 81f148a910045cd0a139f589a0b42764b172f8f5 (patch) | |
tree | 1f89ef39c6b7a440490aa2293f8ec70e8ecc74cd /fs/ceph/super.c | |
parent | ff5d913dfc7142974eb1694d5fd6284658e46bc6 (diff) | |
download | lwn-81f148a910045cd0a139f589a0b42764b172f8f5.tar.gz lwn-81f148a910045cd0a139f589a0b42764b172f8f5.zip |
ceph: invalidate all write mode filp after reconnect
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/super.c')
-rw-r--r-- | fs/ceph/super.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index a95dd13bb628..630549ac4f48 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -664,6 +664,7 @@ static struct ceph_fs_client *create_fs_client(struct ceph_mount_options *fsopt, fsc->sb = NULL; fsc->mount_state = CEPH_MOUNT_MOUNTING; + fsc->filp_gen = 1; atomic_long_set(&fsc->writeback_count, 0); @@ -829,6 +830,7 @@ static void ceph_umount_begin(struct super_block *sb) fsc->mount_state = CEPH_MOUNT_SHUTDOWN; ceph_osdc_abort_requests(&fsc->client->osdc, -EIO); ceph_mdsc_force_umount(fsc->mdsc); + fsc->filp_gen++; // invalidate open files } static int ceph_remount(struct super_block *sb, int *flags, char *data) |