Commit 7392c0a
Ming Lei
dm: Check for forbidden splitting of zone write operations
JIRA: https://issues.redhat.com/browse/RHEL-97177
commit 409f928
Author: Damien Le Moal <dlemoal@kernel.org>
Date: Wed Jun 25 18:33:27 2025 +0900
dm: Check for forbidden splitting of zone write operations
DM targets must not split zone append and write operations using
dm_accept_partial_bio() as doing so is forbidden for zone append BIOs,
breaks zone append emulation using regular write BIOs and potentially
creates deadlock situations with queue freeze operations.
Modify dm_accept_partial_bio() to add missing BUG_ON() checks for all
these cases, that is, check that the BIO is a write or write zeroes
operation. This change packs all the zone related checks together under
a static_branch_unlikely(&zoned_enabled) and done only if the target is
a zoned device.
Fixes: f211268 ("dm: Use the block layer zone append emulation")
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Mikulas Patocka <mpatocka@redhat.com>
Link: https://lore.kernel.org/r/20250625093327.548866-6-dlemoal@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Ming Lei <ming.lei@redhat.com>1 parent e68f64a commit 7392c0a
1 file changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1309 | 1309 | | |
1310 | 1310 | | |
1311 | 1311 | | |
1312 | | - | |
1313 | | - | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
1314 | 1315 | | |
1315 | 1316 | | |
1316 | 1317 | | |
| |||
1343 | 1344 | | |
1344 | 1345 | | |
1345 | 1346 | | |
1346 | | - | |
1347 | | - | |
1348 | 1347 | | |
1349 | 1348 | | |
1350 | 1349 | | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
1351 | 1360 | | |
1352 | 1361 | | |
1353 | 1362 | | |
| |||
0 commit comments