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
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- 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);
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);
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);
}
}
/*
---
-2.20.1
-
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
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- 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);
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);
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);
}
}
/*
---
-2.20.1
-