From: Greg Kroah-Hartman Date: Thu, 3 Oct 2019 15:08:59 +0000 (+0200) Subject: fix up btrfs patch for 4.4 and 4.9 so that quilt can handle it X-Git-Tag: v4.4.195~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=845b91e4153349bf38320b2e0d8445d084d00052;p=thirdparty%2Fkernel%2Fstable-queue.git fix up btrfs patch for 4.4 and 4.9 so that quilt can handle it --- diff --git a/queue-4.4/btrfs-fix-race-setting-up-and-completing-qgroup-resc.patch b/queue-4.4/btrfs-fix-race-setting-up-and-completing-qgroup-resc.patch index b832967ac3d..aeca59d5625 100644 --- a/queue-4.4/btrfs-fix-race-setting-up-and-completing-qgroup-resc.patch +++ b/queue-4.4/btrfs-fix-race-setting-up-and-completing-qgroup-resc.patch @@ -87,14 +87,14 @@ because fs_info->qgroup_rescan_running is set to false by CPU 2. This race is making test case btrfs/171 (from fstests) to fail often: btrfs/171 9s ... - output mismatch (see /home/fdmanana/git/hub/xfstests/results//btrfs/171.out.bad) - --- tests/btrfs/171.out 2018-09-16 21:30:48.505104287 +0100 - +++ /home/fdmanana/git/hub/xfstests/results//btrfs/171.out.bad 2019-09-19 02:01:36.938486039 +0100 - @@ -1,2 +1,3 @@ - QA output created by 171 - +ERROR: quota rescan failed: Operation now in progress - Silence is golden - ... - (Run 'diff -u /home/fdmanana/git/hub/xfstests/tests/btrfs/171.out /home/fdmanana/git/hub/xfstests/results//btrfs/171.out.bad' to see the entire diff) +# --- tests/btrfs/171.out 2018-09-16 21:30:48.505104287 +0100 +# +++ /home/fdmanana/git/hub/xfstests/results//btrfs/171.out.bad 2019-09-19 02:01:36.938486039 +0100 +# @@ -1,2 +1,3 @@ +# QA output created by 171 +# +ERROR: quota rescan failed: Operation now in progress +# Silence is golden +# ... +# (Run 'diff -u /home/fdmanana/git/hub/xfstests/tests/btrfs/171.out /home/fdmanana/git/hub/xfstests/results//btrfs/171.out.bad' to see the entire diff) That is because the test calls the btrfs-progs commands "qgroup quota rescan -w", "qgroup assign" and "qgroup remove" in a sequence that makes @@ -135,14 +135,12 @@ Signed-off-by: Filipe Manana Signed-off-by: David Sterba Signed-off-by: Sasha Levin --- - fs/btrfs/qgroup.c | 33 +++++++++++++++++++-------------- + fs/btrfs/qgroup.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) -diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c -index 90e29d40aa82e..734babb6626c4 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c -@@ -2328,9 +2328,6 @@ static void btrfs_qgroup_rescan_worker(struct btrfs_work *work) +@@ -2328,9 +2328,6 @@ out: btrfs_free_path(path); mutex_lock(&fs_info->qgroup_rescan_lock); @@ -152,7 +150,7 @@ index 90e29d40aa82e..734babb6626c4 100644 if (err > 0 && fs_info->qgroup_flags & BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT) { fs_info->qgroup_flags &= ~BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT; -@@ -2346,16 +2343,30 @@ static void btrfs_qgroup_rescan_worker(struct btrfs_work *work) +@@ -2346,16 +2343,30 @@ out: trans = btrfs_start_transaction(fs_info->quota_root, 1); if (IS_ERR(trans)) { err = PTR_ERR(trans); @@ -188,7 +186,7 @@ index 90e29d40aa82e..734babb6626c4 100644 btrfs_end_transaction(trans, fs_info->quota_root); if (btrfs_fs_closing(fs_info)) { -@@ -2366,12 +2377,6 @@ static void btrfs_qgroup_rescan_worker(struct btrfs_work *work) +@@ -2366,12 +2377,6 @@ out: } else { btrfs_err(fs_info, "qgroup scan failed with %d", err); } @@ -201,6 +199,3 @@ index 90e29d40aa82e..734babb6626c4 100644 } /* --- -2.20.1 - diff --git a/queue-4.9/btrfs-fix-race-setting-up-and-completing-qgroup-resc.patch b/queue-4.9/btrfs-fix-race-setting-up-and-completing-qgroup-resc.patch index 1a06a47cc5c..501d8724972 100644 --- a/queue-4.9/btrfs-fix-race-setting-up-and-completing-qgroup-resc.patch +++ b/queue-4.9/btrfs-fix-race-setting-up-and-completing-qgroup-resc.patch @@ -87,14 +87,14 @@ because fs_info->qgroup_rescan_running is set to false by CPU 2. This race is making test case btrfs/171 (from fstests) to fail often: btrfs/171 9s ... - output mismatch (see /home/fdmanana/git/hub/xfstests/results//btrfs/171.out.bad) - --- tests/btrfs/171.out 2018-09-16 21:30:48.505104287 +0100 - +++ /home/fdmanana/git/hub/xfstests/results//btrfs/171.out.bad 2019-09-19 02:01:36.938486039 +0100 - @@ -1,2 +1,3 @@ - QA output created by 171 - +ERROR: quota rescan failed: Operation now in progress - Silence is golden - ... - (Run 'diff -u /home/fdmanana/git/hub/xfstests/tests/btrfs/171.out /home/fdmanana/git/hub/xfstests/results//btrfs/171.out.bad' to see the entire diff) +# --- tests/btrfs/171.out 2018-09-16 21:30:48.505104287 +0100 +# +++ /home/fdmanana/git/hub/xfstests/results//btrfs/171.out.bad 2019-09-19 02:01:36.938486039 +0100 +# @@ -1,2 +1,3 @@ +# QA output created by 171 +# +ERROR: quota rescan failed: Operation now in progress +# Silence is golden +# ... +# (Run 'diff -u /home/fdmanana/git/hub/xfstests/tests/btrfs/171.out /home/fdmanana/git/hub/xfstests/results//btrfs/171.out.bad' to see the entire diff) That is because the test calls the btrfs-progs commands "qgroup quota rescan -w", "qgroup assign" and "qgroup remove" in a sequence that makes @@ -135,14 +135,12 @@ Signed-off-by: Filipe Manana Signed-off-by: David Sterba Signed-off-by: Sasha Levin --- - fs/btrfs/qgroup.c | 33 +++++++++++++++++++-------------- + fs/btrfs/qgroup.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) -diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c -index 088dc7d38c136..0355e6d9e21cb 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c -@@ -2380,9 +2380,6 @@ static void btrfs_qgroup_rescan_worker(struct btrfs_work *work) +@@ -2380,9 +2380,6 @@ out: btrfs_free_path(path); mutex_lock(&fs_info->qgroup_rescan_lock); @@ -152,7 +150,7 @@ index 088dc7d38c136..0355e6d9e21cb 100644 if (err > 0 && fs_info->qgroup_flags & BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT) { fs_info->qgroup_flags &= ~BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT; -@@ -2398,16 +2395,30 @@ static void btrfs_qgroup_rescan_worker(struct btrfs_work *work) +@@ -2398,16 +2395,30 @@ out: trans = btrfs_start_transaction(fs_info->quota_root, 1); if (IS_ERR(trans)) { err = PTR_ERR(trans); @@ -188,7 +186,7 @@ index 088dc7d38c136..0355e6d9e21cb 100644 btrfs_end_transaction(trans, fs_info->quota_root); if (btrfs_fs_closing(fs_info)) { -@@ -2418,12 +2429,6 @@ static void btrfs_qgroup_rescan_worker(struct btrfs_work *work) +@@ -2418,12 +2429,6 @@ out: } else { btrfs_err(fs_info, "qgroup scan failed with %d", err); } @@ -201,6 +199,3 @@ index 088dc7d38c136..0355e6d9e21cb 100644 } /* --- -2.20.1 -