]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop btrfs-set-cache_block_group_error-if-we-find-an-error.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Aug 2023 21:44:30 +0000 (23:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Aug 2023 21:44:30 +0000 (23:44 +0200)
From 4.19 and 4.14

queue-4.14/btrfs-set-cache_block_group_error-if-we-find-an-error.patch [deleted file]
queue-4.14/series
queue-4.19/btrfs-set-cache_block_group_error-if-we-find-an-error.patch [deleted file]
queue-4.19/series

diff --git a/queue-4.14/btrfs-set-cache_block_group_error-if-we-find-an-error.patch b/queue-4.14/btrfs-set-cache_block_group_error-if-we-find-an-error.patch
deleted file mode 100644 (file)
index 75966d6..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-From 92fb94b69c6accf1e49fff699640fa0ce03dc910 Mon Sep 17 00:00:00 2001
-From: Josef Bacik <josef@toxicpanda.com>
-Date: Wed, 2 Aug 2023 09:20:24 -0400
-Subject: btrfs: set cache_block_group_error if we find an error
-
-From: Josef Bacik <josef@toxicpanda.com>
-
-commit 92fb94b69c6accf1e49fff699640fa0ce03dc910 upstream.
-
-We set cache_block_group_error if btrfs_cache_block_group() returns an
-error, this is because we could end up not finding space to allocate and
-mistakenly return -ENOSPC, and which could then abort the transaction
-with the incorrect errno, and in the case of ENOSPC result in a
-WARN_ON() that will trip up tests like generic/475.
-
-However there's the case where multiple threads can be racing, one
-thread gets the proper error, and the other thread doesn't actually call
-btrfs_cache_block_group(), it instead sees ->cached ==
-BTRFS_CACHE_ERROR.  Again the result is the same, we fail to allocate
-our space and return -ENOSPC.  Instead we need to set
-cache_block_group_error to -EIO in this case to make sure that if we do
-not make our allocation we get the appropriate error returned back to
-the caller.
-
-CC: stable@vger.kernel.org # 4.14+
-Signed-off-by: Josef Bacik <josef@toxicpanda.com>
-Signed-off-by: David Sterba <dsterba@suse.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- fs/btrfs/extent-tree.c |    5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
---- a/fs/btrfs/extent-tree.c
-+++ b/fs/btrfs/extent-tree.c
-@@ -7724,8 +7724,11 @@ have_block_group:
-                       ret = 0;
-               }
--              if (unlikely(block_group->cached == BTRFS_CACHE_ERROR))
-+              if (unlikely(block_group->cached == BTRFS_CACHE_ERROR)) {
-+                      if (!cache_block_group_error)
-+                              cache_block_group_error = -EIO;
-                       goto loop;
-+              }
-               /*
-                * Ok we want to try and use the cluster allocator, so
index cbd851844097bd73ec4b3a93eaceeec3a4151f17..8ad856d2bbf93f703fbda0b7c94171352e0f864d 100644 (file)
@@ -18,4 +18,3 @@ dccp-fix-data-race-around-dp-dccps_mss_cache.patch
 drivers-net-prevent-tun_build_skb-to-exceed-the-packet-size-limit.patch
 ib-hfi1-fix-possible-panic-during-hotplug-remove.patch
 btrfs-don-t-stop-integrity-writeback-too-early.patch
-btrfs-set-cache_block_group_error-if-we-find-an-error.patch
diff --git a/queue-4.19/btrfs-set-cache_block_group_error-if-we-find-an-error.patch b/queue-4.19/btrfs-set-cache_block_group_error-if-we-find-an-error.patch
deleted file mode 100644 (file)
index 07fcc59..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-From 92fb94b69c6accf1e49fff699640fa0ce03dc910 Mon Sep 17 00:00:00 2001
-From: Josef Bacik <josef@toxicpanda.com>
-Date: Wed, 2 Aug 2023 09:20:24 -0400
-Subject: btrfs: set cache_block_group_error if we find an error
-
-From: Josef Bacik <josef@toxicpanda.com>
-
-commit 92fb94b69c6accf1e49fff699640fa0ce03dc910 upstream.
-
-We set cache_block_group_error if btrfs_cache_block_group() returns an
-error, this is because we could end up not finding space to allocate and
-mistakenly return -ENOSPC, and which could then abort the transaction
-with the incorrect errno, and in the case of ENOSPC result in a
-WARN_ON() that will trip up tests like generic/475.
-
-However there's the case where multiple threads can be racing, one
-thread gets the proper error, and the other thread doesn't actually call
-btrfs_cache_block_group(), it instead sees ->cached ==
-BTRFS_CACHE_ERROR.  Again the result is the same, we fail to allocate
-our space and return -ENOSPC.  Instead we need to set
-cache_block_group_error to -EIO in this case to make sure that if we do
-not make our allocation we get the appropriate error returned back to
-the caller.
-
-CC: stable@vger.kernel.org # 4.14+
-Signed-off-by: Josef Bacik <josef@toxicpanda.com>
-Signed-off-by: David Sterba <dsterba@suse.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- fs/btrfs/extent-tree.c |    5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
---- a/fs/btrfs/extent-tree.c
-+++ b/fs/btrfs/extent-tree.c
-@@ -7392,8 +7392,11 @@ have_block_group:
-                       ret = 0;
-               }
--              if (unlikely(block_group->cached == BTRFS_CACHE_ERROR))
-+              if (unlikely(block_group->cached == BTRFS_CACHE_ERROR)) {
-+                      if (!cache_block_group_error)
-+                              cache_block_group_error = -EIO;
-                       goto loop;
-+              }
-               /*
-                * Ok we want to try and use the cluster allocator, so
index 765f103fc4929ca1275eed3bd540127b778f09f3..e8a01f0b5756bbfb42705fe445d9d568c41440b1 100644 (file)
@@ -23,4 +23,3 @@ ib-hfi1-fix-possible-panic-during-hotplug-remove.patch
 wifi-cfg80211-fix-sband-iftype-data-lookup-for-ap_vlan.patch
 ibmvnic-handle-dma-unmapping-of-login-buffs-in-release-functions.patch
 btrfs-don-t-stop-integrity-writeback-too-early.patch
-btrfs-set-cache_block_group_error-if-we-find-an-error.patch