Mike Snitzer 7dd06a2548 dm: allow dm_accept_partial_bio() for dm_io without duplicate bios
The intent behind commit e6fc9f62ce6e ("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: 655f3aad7aa4 ("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>
2022-04-14 20:01:54 -04:00
..
2022-03-28 12:41:28 -07:00
2022-03-02 12:15:54 -05:00
2022-03-24 19:37:53 -07:00
2022-03-24 19:37:53 -07:00
2022-03-24 19:37:53 -07:00
2022-03-24 19:37:53 -07:00
2022-03-24 19:37:53 -07:00
2021-12-04 08:58:51 -08:00
2022-01-06 08:37:03 -08:00
2022-03-24 19:37:53 -07:00
2022-03-21 17:16:01 -07:00
2022-02-22 21:11:08 -05:00
2022-02-22 21:11:08 -05:00
2022-03-08 15:16:54 -08:00
2022-03-26 11:51:46 -07:00
2022-03-08 15:16:54 -08:00
2022-03-26 11:51:46 -07:00
2022-03-26 11:51:46 -07:00
2022-01-06 08:37:02 -08:00
2022-03-24 19:37:53 -07:00
2022-03-08 15:16:54 -08:00