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>
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user