Naohiro Aota
b1934cd606
btrfs: zoned: handle broken write pointer on zones
...
Btrfs rejects to mount a FS if it finds a block group with a broken write
pointer (e.g, unequal write pointers on two zones of RAID1 block group).
Since such case can happen easily with a power-loss or crash of a system,
we need to handle the case more gently.
Handle such block group by making it unallocatable, so that there will be
no writes into it. That can be done by setting the allocation pointer at
the end of allocating region (= block_group->zone_capacity). Then, existing
code handle zone_unusable properly.
Having proper zone_capacity is necessary for the change. So, set it as fast
as possible.
We cannot handle RAID0 and RAID10 case like this. But, they are anyway
unable to read because of a missing stripe.
Fixes: 265f7237dd25 ("btrfs: zoned: allow DUP on meta-data block groups")
Fixes: 568220fa9657 ("btrfs: zoned: support RAID0/1/10 on top of raid stripe tree")
CC: stable@vger.kernel.org # 6.1+
Reported-by: HAN Yuwei <hrx@bupt.moe>
Cc: Xuefer <xuefer@gmail.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2024-09-02 23:39:34 +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-08-27 01:34:08 +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-08-13 15:36:57 +02:00
2024-07-11 15:52:25 +02:00
2024-08-13 13:43:28 +02: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-08-26 16:58:13 +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-08-15 20:35:56 +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-15 20:35:44 +02: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-09-02 20:18:08 +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-08-15 20:35:32 +02:00
2024-07-11 15:33:28 +02:00
2024-08-27 16:42:09 +02:00
2024-08-27 16:42:09 +02:00
2024-07-11 15:33:28 +02:00
2024-07-11 15:33:22 +02:00
2024-08-16 21:22:39 +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-15 20:35:52 +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-09-02 23:39:34 +02:00
2024-07-19 17:20:23 +02:00
2024-07-11 15:52:25 +02:00