Qu Wenruo
31723c9542
btrfs: tree-checker: reject BTRFS_FT_UNKNOWN dir type
...
[REPORT]
There is a bug report that kernel is rejecting a mismatching inode mode
and its dir item:
[ 1881.553937] BTRFS critical (device dm-0): inode mode mismatch with
dir: inode mode=040700 btrfs type=2 dir type=0
[CAUSE]
It looks like the inode mode is correct, while the dir item type
0 is BTRFS_FT_UNKNOWN, which should not be generated by btrfs at all.
This may be caused by a memory bit flip.
[ENHANCEMENT]
Although tree-checker is not able to do any cross-leaf verification, for
this particular case we can at least reject any dir type with
BTRFS_FT_UNKNOWN.
So here we enhance the dir type check from [0, BTRFS_FT_MAX), to
(0, BTRFS_FT_MAX).
Although the existing corruption can not be fixed just by such enhanced
checking, it should prevent the same 0x2->0x0 bitflip for dir type to
reach disk in the future.
Reported-by: Kota <nospam@kota.moe>
Link: https://lore.kernel.org/linux-btrfs/CACsxjPYnQF9ZF-0OhH16dAx50=BXXOcP74MxBc3BG+xae4vTTw@mail.gmail.com/
CC: stable@vger.kernel.org # 5.4+
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2024-08-13 13:42:26 +02:00
..
2024-07-25 23:54:06 +02:00
2024-03-04 16:24:46 +01:00
2024-07-11 15:33:28 +02:00
2024-03-04 16:24:46 +01:00
2024-03-04 16:24:49 +01:00
2024-03-04 16:24:46 +01:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:06 +02:00
2024-03-04 16:24:53 +01:00
2024-07-11 15:33:29 +02:00
2024-03-04 16:24:49 +01:00
2024-07-29 19:21:19 +02:00
2024-07-11 15:33:28 +02:00
2024-05-07 21:31:06 +02:00
2024-03-04 16:24:49 +01:00
2024-07-11 15:33:29 +02:00
2024-07-11 16:32:22 +02:00
2024-07-11 15:33:28 +02:00
2024-07-11 15:52:25 +02:00
2024-07-29 19:21:22 +02:00
2024-07-11 15:52:25 +02:00
2024-03-04 16:24:49 +01:00
2024-07-11 15:33:22 +02:00
2024-07-11 15:33:22 +02:00
2024-07-11 15:33:28 +02:00
2024-07-11 15:33:28 +02:00
2024-08-13 13:42:26 +02:00
2024-08-13 13:42:26 +02:00
2024-07-11 15:33:19 +02:00
2024-03-04 16:24:49 +01:00
2024-07-11 15:33:22 +02:00
2024-07-11 15:33:22 +02:00
2024-07-29 19:21:22 +02:00
2024-07-11 15:33:29 +02:00
2023-06-19 13:59:25 +02:00
2023-06-19 13:59:25 +02:00
2024-07-17 12:38:04 -07:00
2024-07-11 15:33:22 +02:00
2024-07-11 15:33:25 +02:00
2024-03-04 16:24:49 +01:00
2024-07-11 15:52:25 +02:00
2024-07-11 15:52:25 +02:00
2024-07-30 19:28:36 -07:00
2024-07-11 15:33:22 +02:00
2024-07-11 15:33:26 +02:00
2024-03-04 16:24:49 +01:00
2024-08-13 13:42:26 +02:00
2024-07-11 15:33:26 +02:00
2024-07-11 15:33:20 +02:00
2024-07-11 15:33:20 +02:00
2024-07-11 15:33:29 +02:00
2024-05-07 21:31:03 +02:00
2024-08-02 22:32:40 +02:00
2024-07-11 15:33:29 +02:00
2024-07-29 19:21:19 +02:00
2024-03-04 16:24:49 +01:00
2024-07-11 15:33:26 +02:00
2024-03-04 16:24:49 +01:00
2023-02-13 17:50:35 +01:00
2024-07-19 14:34:52 -07:00
2024-07-11 15:33:27 +02:00
2024-03-04 16:24:49 +01:00
2024-08-07 09:53:41 -07:00
2024-07-17 12:38:04 -07:00
2024-07-11 15:33:22 +02:00
2023-10-12 16:44:05 +02:00
2024-05-07 21:31:06 +02:00
2024-07-11 15:33:22 +02:00
2023-12-15 23:00:04 +01:00
2024-07-11 15:33:22 +02:00
2024-07-11 15:52:25 +02:00
2024-07-11 15:33:29 +02:00
2024-07-11 15:33:29 +02:00
2023-12-15 20:27:02 +01:00
2024-07-11 15:33:22 +02:00
2024-07-11 15:33:28 +02:00
2024-07-11 15:33:28 +02:00
2024-03-04 16:24:46 +01:00
2024-03-04 16:24:49 +01:00
2024-08-02 22:44:27 +02:00
2024-03-04 16:24:49 +01:00
2024-07-11 15:33:29 +02:00
2024-07-11 15:33:29 +02:00
2024-07-11 15:33:27 +02:00
2024-07-11 15:33:27 +02:00
2024-07-11 15:33:30 +02:00
2024-03-04 16:24:49 +01:00
2024-07-11 15:33:28 +02:00
2024-07-11 15:33:28 +02:00
2024-03-04 16:24:49 +01:00
2024-07-02 19:14:57 +02:00
2024-03-04 16:24:49 +01:00
2024-07-11 15:33:18 +02:00
2024-03-04 16:24:49 +01:00
2024-07-21 17:15:46 -07:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:06 +02:00
2024-04-02 19:18:23 +02:00
2024-08-01 17:15:07 +02:00
2024-03-04 16:24:49 +01:00
2024-07-21 17:15:46 -07:00
2024-07-11 15:33:28 +02:00
2024-07-29 19:21:19 +02:00
2024-07-29 19:21:19 +02:00
2024-07-11 15:33:28 +02:00
2024-07-11 15:33:22 +02:00
2024-08-01 17:30:50 +02:00
2024-07-19 17:20:23 +02:00
2024-07-11 15:33:30 +02:00
2024-03-04 16:24:49 +01:00
2024-07-11 15:52:25 +02:00
2024-07-11 15:33:28 +02:00
2024-08-13 13:42:26 +02:00
2024-05-02 22:11:13 +02:00
2024-07-11 15:33:25 +02:00
2024-07-11 15:33:24 +02:00
2024-05-07 21:31:06 +02:00
2024-03-04 16:24:49 +01:00
2024-07-11 15:33:26 +02:00
2024-07-11 15:33:26 +02:00
2024-07-11 15:33:22 +02:00
2024-07-11 15:33:22 +02:00
2024-03-04 16:24:46 +01:00
2024-03-04 16:24:49 +01:00
2024-07-11 15:33:27 +02:00
2024-07-11 15:33:22 +02:00
2024-07-11 15:33:29 +02:00
2024-07-11 15:33:22 +02:00
2024-07-11 15:52:25 +02:00
2024-07-19 17:20:23 +02:00
2024-07-19 17:20:23 +02:00
2024-07-11 15:52:25 +02:00