From de1965c96a73be4127b073fdcbe8ea0858c85664 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 3 Oct 2019 17:05:36 +0200 Subject: [PATCH] fix up 4.14 patch so that quilt can handle it. --- ...etting-up-and-completing-qgroup-resc.patch | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/queue-4.14/btrfs-fix-race-setting-up-and-completing-qgroup-resc.patch b/queue-4.14/btrfs-fix-race-setting-up-and-completing-qgroup-resc.patch index b6f1d64a6b2..e2fdded5d06 100644 --- a/queue-4.14/btrfs-fix-race-setting-up-and-completing-qgroup-resc.patch +++ b/queue-4.14/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 b20df81d76208..f0bb324a05581 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c -@@ -2645,9 +2645,6 @@ static void btrfs_qgroup_rescan_worker(struct btrfs_work *work) +@@ -2645,9 +2645,6 @@ out: btrfs_free_path(path); mutex_lock(&fs_info->qgroup_rescan_lock); @@ -152,7 +150,7 @@ index b20df81d76208..f0bb324a05581 100644 if (err > 0 && fs_info->qgroup_flags & BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT) { fs_info->qgroup_flags &= ~BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT; -@@ -2663,16 +2660,30 @@ static void btrfs_qgroup_rescan_worker(struct btrfs_work *work) +@@ -2663,16 +2660,30 @@ out: trans = btrfs_start_transaction(fs_info->quota_root, 1); if (IS_ERR(trans)) { err = PTR_ERR(trans); @@ -188,7 +186,7 @@ index b20df81d76208..f0bb324a05581 100644 btrfs_end_transaction(trans); if (btrfs_fs_closing(fs_info)) { -@@ -2683,12 +2694,6 @@ static void btrfs_qgroup_rescan_worker(struct btrfs_work *work) +@@ -2683,12 +2694,6 @@ out: } else { btrfs_err(fs_info, "qgroup scan failed with %d", err); } @@ -201,6 +199,3 @@ index b20df81d76208..f0bb324a05581 100644 } /* --- -2.20.1 - -- 2.47.2