]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.4/ceph-flush-dirty-inodes-before-proceeding-with-remount.patch
drop drm-rockchip-shutdown-drm-subsystem-on-shutdown.patch from 4.4.y and 4.9.y
[thirdparty/kernel/stable-queue.git] / queue-4.4 / ceph-flush-dirty-inodes-before-proceeding-with-remount.patch
1 From 00abf69dd24f4444d185982379c5cc3bb7b6d1fc Mon Sep 17 00:00:00 2001
2 From: Jeff Layton <jlayton@kernel.org>
3 Date: Tue, 7 May 2019 09:20:54 -0400
4 Subject: ceph: flush dirty inodes before proceeding with remount
5
6 From: Jeff Layton <jlayton@kernel.org>
7
8 commit 00abf69dd24f4444d185982379c5cc3bb7b6d1fc upstream.
9
10 xfstest generic/452 was triggering a "Busy inodes after umount" warning.
11 ceph was allowing the mount to go read-only without first flushing out
12 dirty inodes in the cache. Ensure we sync out the filesystem before
13 allowing a remount to proceed.
14
15 Cc: stable@vger.kernel.org
16 Link: http://tracker.ceph.com/issues/39571
17 Signed-off-by: Jeff Layton <jlayton@kernel.org>
18 Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
19 Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
20 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21
22 ---
23 fs/ceph/super.c | 7 +++++++
24 1 file changed, 7 insertions(+)
25
26 --- a/fs/ceph/super.c
27 +++ b/fs/ceph/super.c
28 @@ -712,6 +712,12 @@ static void ceph_umount_begin(struct sup
29 return;
30 }
31
32 +static int ceph_remount(struct super_block *sb, int *flags, char *data)
33 +{
34 + sync_filesystem(sb);
35 + return 0;
36 +}
37 +
38 static const struct super_operations ceph_super_ops = {
39 .alloc_inode = ceph_alloc_inode,
40 .destroy_inode = ceph_destroy_inode,
41 @@ -719,6 +725,7 @@ static const struct super_operations cep
42 .drop_inode = ceph_drop_inode,
43 .sync_fs = ceph_sync_fs,
44 .put_super = ceph_put_super,
45 + .remount_fs = ceph_remount,
46 .show_options = ceph_show_options,
47 .statfs = ceph_statfs,
48 .umount_begin = ceph_umount_begin,