Commit 7dd06a2
Mike Snitzer
dm: allow dm_accept_partial_bio() for dm_io without duplicate bios
The intent behind commit e6fc9f6 ("dm: flag clones created by
__send_duplicate_bios") was to formally disallow the use of
dm_accept_partial_bio() where it simply isn't possible -- due to
constraint that multiple bios cannot meaningfully update a shared
tio->len_ptr.
But that commit went too far and disallowed the case where "abormal"
IO (e.g. WRITE_ZEROES) is only using a single bio. Fix this by
not marking a dm_io with a single dm_target_io (and bio), that happens
to be created by __send_duplicate_bios, as DM_TIO_IS_DUPLICATE_BIO.
Also remove 'unsigned *len' parameter from alloc_multiple_bios().
This commit fixes a dm_accept_partial_bio() BUG_ON() with dm-zoned
when a WRITE_ZEROES bio is issued.
Fixes: 655f3aa ("dm: switch dm_target_io booleans over to proper flags")
Reported-by: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>1 parent 73d7b06 commit 7dd06a2
1 file changed
Lines changed: 6 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1323 | 1323 | | |
1324 | 1324 | | |
1325 | 1325 | | |
1326 | | - | |
1327 | | - | |
| 1326 | + | |
1328 | 1327 | | |
1329 | 1328 | | |
1330 | 1329 | | |
| |||
1335 | 1334 | | |
1336 | 1335 | | |
1337 | 1336 | | |
1338 | | - | |
| 1337 | + | |
1339 | 1338 | | |
1340 | 1339 | | |
1341 | 1340 | | |
| |||
1363 | 1362 | | |
1364 | 1363 | | |
1365 | 1364 | | |
1366 | | - | |
1367 | 1365 | | |
1368 | 1366 | | |
1369 | 1367 | | |
1370 | | - | |
| 1368 | + | |
| 1369 | + | |
1371 | 1370 | | |
1372 | 1371 | | |
1373 | 1372 | | |
| |||
1407 | 1406 | | |
1408 | 1407 | | |
1409 | 1408 | | |
1410 | | - | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
| 1409 | + | |
| 1410 | + | |
1414 | 1411 | | |
1415 | 1412 | | |
1416 | | - | |
1417 | | - | |
1418 | 1413 | | |
1419 | 1414 | | |
1420 | 1415 | | |
| |||
0 commit comments