Filipe Manana
d5e09e385e
btrfs: abort transaction on generation mismatch when marking eb as dirty
...
[ Upstream commit 50564b651d ]
When marking an extent buffer as dirty, at btrfs_mark_buffer_dirty(),
we check if its generation matches the running transaction and if not we
just print a warning. Such mismatch is an indicator that something really
went wrong and only printing a warning message (and stack trace) is not
enough to prevent a corruption. Allowing a transaction to commit with such
an extent buffer will trigger an error if we ever try to read it from disk
due to a generation mismatch with its parent generation.
So abort the current transaction with -EUCLEAN if we notice a generation
mismatch. For this we need to pass a transaction handle to
btrfs_mark_buffer_dirty() which is always available except in test code,
in which case we can pass NULL since it operates on dummy extent buffers
and all test roots have a single node/leaf (root node at level 0).
Signed-off-by: Filipe Manana <fdmanana@suse.com >
Reviewed-by: David Sterba <dsterba@suse.com >
Signed-off-by: David Sterba <dsterba@suse.com >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-11-28 17:19:35 +00:00
..
2023-11-28 17:19:35 +00:00
2022-12-05 18:00:58 +01:00
2023-08-21 14:52:13 +02: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-10-23 17:17:30 +02:00
2023-10-23 17:17:30 +02:00
2023-06-19 13:59:36 +02:00
2023-06-19 13:59:36 +02:00
2023-11-28 17:19:35 +00:00
2023-08-21 14:52:12 +02:00
2023-07-20 19:22:54 +02:00
2023-06-19 13:59:24 +02:00
2023-08-21 14:52:14 +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-11-28 17:19:35 +00:00
2023-11-28 17:19:35 +00: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-11-28 17:19:35 +00:00
2023-10-11 11:37:19 +02:00
2023-09-20 20:42:18 +02:00
2023-09-20 20:42:18 +02:00
2023-11-28 17:19:35 +00:00
2022-12-05 18:00:47 +01:00
2023-11-28 17:19:35 +00: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-11-28 17:19:35 +00:00
2023-11-28 17:19:35 +00:00
2022-12-05 18:00:47 +01:00
2022-12-05 18:00:41 +01:00
2023-09-20 20:44:57 +02:00
2023-08-21 14:52:19 +02:00
2023-08-18 14:38:10 +02:00
2023-06-19 13:59:33 +02:00
2023-08-21 14:52:12 +02:00
2023-08-21 14:52:12 +02:00
2023-11-28 17:19:35 +00:00
2023-08-21 14:54:47 +02:00
2023-11-28 17:19:35 +00:00
2023-08-21 14:54:48 +02:00
2023-11-28 17:19:35 +00:00
2022-12-05 18:00:56 +01:00
2023-11-28 17:19:35 +00:00
2023-06-19 13:59:24 +02:00
2023-11-28 17:19:35 +00:00
2023-05-10 14:51:27 +02:00
2023-02-13 17:50:35 +01:00
2023-08-21 14:52:19 +02:00
2023-11-28 17:19:35 +00:00
2023-06-19 13:59:25 +02:00
2023-11-28 17:19:35 +00:00
2023-11-28 17:19:35 +00:00
2023-01-19 09:24:27 +01:00
2023-09-08 14:21:27 +02:00
2023-06-19 13:59:35 +02:00
2023-09-08 14:10:49 +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-08-21 14:54:48 +02:00
2023-08-21 14:54:48 +02:00
2023-08-24 16:20:18 -07:00
2023-09-08 14:10:59 +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-08-21 14:54:48 +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-11-28 17:19:35 +00:00
2022-12-05 18:00:43 +01:00
2023-08-21 14:54:48 +02:00
2023-08-21 14:52:12 +02:00
2022-12-05 18:00:59 +01:00
2022-12-05 18:00:42 +01:00
2023-07-13 10:28:04 +02:00
2020-03-23 17:01:54 +01:00
2023-11-28 17:19:35 +00:00
2023-06-19 13:59:36 +02:00
2023-11-28 17:19:35 +00:00
2022-12-05 18:00:44 +01:00
2023-11-20 11:59:39 +01:00
2023-04-17 18:01:24 +02:00
2023-08-21 14:54:46 +02:00
2022-12-05 18:00:41 +01:00
2023-08-21 14:52: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-10-10 15:27:56 +02:00
2022-12-05 18:00:47 +01:00
2023-08-21 14:52:12 +02:00
2023-02-13 17:50:35 +01:00
2023-09-26 09:44:08 -07:00
2023-10-04 01:03:59 +02:00
2023-08-12 13:28:55 -07:00
2023-06-19 13:59:25 +02:00
2023-11-28 17:19:35 +00: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
2023-11-28 17:19:35 +00:00
2022-12-05 18:00:46 +01:00
2023-09-13 18:40:54 +02:00
2022-12-05 18:00:47 +01:00
2023-11-28 17:19:35 +00:00
2023-08-21 14:54:48 +02:00
2023-11-28 17:19:35 +00:00
2023-06-19 13:59:34 +02:00
2023-08-22 14:19:59 +02:00
2023-08-21 14:52:19 +02:00
2023-06-19 13:59:34 +02:00