dm: flag clones created by __send_duplicate_bios
authorMike Snitzer <snitzer@redhat.com>
Mon, 14 Feb 2022 18:28:15 +0000 (13:28 -0500)
committerMike Snitzer <snitzer@redhat.com>
Wed, 16 Feb 2022 20:47:39 +0000 (15:47 -0500)
commit919ffcdabb307113be95917fbee10933f939acd1
tree7424331b85d919970527044718593d5d699d9a66
parent8fde2c69a2f8f424fd4b35f93429814a96ed6d60
dm: flag clones created by __send_duplicate_bios

Formally disallow dm_accept_partial_bio() on clones created by
__send_duplicate_bios() because their len_ptr points to a shared
unsigned int.  __send_duplicate_bios() is only used for flush bios
and other "abnormal" bios (discards, writezeroes, etc). And
dm_accept_partial_bio() already didn't support flush bios.

Also refactor __send_changing_extent_only() to reflect it cannot fail.
As such __send_changing_extent_only() can update the clone_info before
__send_duplicate_bios() is called to fan-out __map_bio() calls.

Reviewed-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-core.h
drivers/md/dm.c