Josef Bacik
92fb94b69c
btrfs: set cache_block_group_error if we find an error
...
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>
2023-08-10 17:16:45 +02:00
..
2023-06-19 13:59:30 +02:00
2022-12-05 18:00:58 +01:00
2022-12-05 18:00:58 +01:00
2023-01-19 09:24:28 +01:00
2023-01-19 09:24:27 +01:00
2023-06-19 13:59:30 +02:00
2023-06-19 13:59:30 +02:00
2023-05-09 22:09:11 +02:00
2023-05-09 22:09:11 +02:00
2023-06-19 13:59:36 +02:00
2023-06-19 13:59:36 +02:00
2023-08-10 16:44:14 +02:00
2023-08-10 16:44:14 +02:00
2023-07-20 19:22:54 +02:00
2023-06-19 13:59:24 +02:00
2023-06-19 19:47:58 +02:00
2023-06-19 13:59:34 +02:00
2022-05-16 17:03:12 +02:00
2023-06-19 17:01:44 +02:00
2023-06-19 13:59:36 +02:00
2023-06-19 13:59:39 +02:00
2023-06-19 13:59:39 +02:00
2023-06-19 13:59:30 +02:00
2022-12-05 18:00:46 +01:00
2023-04-17 18:01:19 +02:00
2022-12-05 18:00:44 +01:00
2023-03-06 19:28:19 +01:00
2022-12-05 18:00:43 +01:00
2023-06-19 13:59:32 +02:00
2023-06-19 13:59:32 +02:00
2023-06-19 13:59:34 +02:00
2022-12-05 18:00:47 +01:00
2022-12-05 18:00:46 +01:00
2022-12-05 18:00:46 +01:00
2023-06-19 13:59:25 +02:00
2023-06-19 13:59:25 +02:00
2023-08-10 17:14:42 +02:00
2023-06-19 13:59:27 +02:00
2022-12-05 18:00:47 +01:00
2022-12-05 18:00:41 +01:00
2023-08-10 17:04:09 +02:00
2023-06-19 13:59:35 +02:00
2023-06-19 13:59:33 +02:00
2023-06-19 13:59:33 +02:00
2023-06-19 13:59:30 +02:00
2023-06-19 13:59:30 +02:00
2023-08-10 17:16:45 +02:00
2023-06-19 13:59:24 +02:00
2023-06-19 13:59:37 +02:00
2023-06-19 13:59:32 +02:00
2023-06-19 13:59:38 +02:00
2022-12-05 18:00:56 +01:00
2023-06-19 13:59:24 +02:00
2023-06-19 13:59:24 +02:00
2023-07-24 18:06:05 +02:00
2023-05-10 14:51:27 +02:00
2023-02-13 17:50:35 +01:00
2023-06-19 20:14:44 +02:00
2023-04-17 18:01:19 +02:00
2023-06-19 13:59:25 +02:00
2023-08-10 17:07:10 +02:00
2023-06-19 13:59:26 +02:00
2023-01-19 09:24:27 +01:00
2023-04-17 18:01:22 +02:00
2023-06-19 13:59:35 +02:00
2023-04-17 18:01:17 +02:00
2023-02-15 19:38:50 +01:00
2023-04-17 18:01:18 +02:00
2023-06-19 13:59:34 +02:00
2023-02-13 17:50:35 +01:00
2023-06-19 13:59:31 +02:00
2023-06-19 13:59:31 +02:00
2023-06-19 13:59:22 +02:00
2023-06-19 13:59:37 +02:00
2023-06-19 13:59:37 +02:00
2022-12-05 18:00:47 +01:00
2022-12-05 18:00:47 +01:00
2023-06-19 13:59:22 +02:00
2023-06-19 13:59:22 +02:00
2022-12-05 18:00:47 +01:00
2022-12-05 18:00:40 +01:00
2023-07-18 03:14:11 +02:00
2022-12-05 18:00:43 +01:00
2023-07-18 03:13:15 +02:00
2023-06-19 13:59:24 +02:00
2022-12-05 18:00:59 +01:00
2022-12-05 18:00:42 +01:00
2019-04-29 19:02:49 +02:00
2022-12-05 18:00:53 +01:00
2020-03-23 17:01:54 +01:00
2023-08-10 17:13:13 +02:00
2023-06-19 13:59:36 +02:00
2022-12-05 18:00:47 +01:00
2022-12-05 18:00:44 +01:00
2023-06-19 13:59:40 +02:00
2023-04-17 18:01:24 +02:00
2023-06-19 13:59:39 +02:00
2022-12-05 18:00:41 +01:00
2023-04-17 18:01:19 +02:00
2023-04-17 18:01:18 +02:00
2023-06-19 13:59:35 +02:00
2023-06-19 13:59:35 +02:00
2023-06-19 13:59:23 +02:00
2022-12-05 18:00:47 +01:00
2023-04-17 18:01:18 +02:00
2023-02-13 17:50:35 +01:00
2023-07-26 13:57:47 +02:00
2023-06-19 13:59:26 +02:00
2023-08-10 17:14:42 +02:00
2023-06-19 13:59:25 +02:00
2023-06-19 13:59:39 +02:00
2023-06-19 13:59:26 +02:00
2023-06-19 13:59:38 +02:00
2022-12-05 18:00:48 +01:00
2022-12-05 18:00:50 +01:00
2022-12-05 18:00:50 +01:00
2022-12-05 18:00:46 +01:00
2022-12-05 18:00:46 +01:00
2023-01-01 15:46:48 -08:00
2022-12-05 18:00:47 +01:00
2023-07-11 17:32:14 +02:00
2023-06-19 13:59:34 +02:00
2023-03-06 09:57:12 +01:00
2019-04-29 19:02:44 +02:00
2023-06-19 13:59:34 +02:00
2023-07-20 19:18:14 +02:00
2023-06-19 13:59:33 +02:00
2023-06-19 13:59:34 +02:00