]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
dm: flag clones created by __send_duplicate_bios
authorMike Snitzer <snitzer@redhat.com>
Fri, 18 Feb 2022 04:40:30 +0000 (23:40 -0500)
committerMike Snitzer <snitzer@redhat.com>
Mon, 21 Feb 2022 20:36:32 +0000 (15:36 -0500)
commite6fc9f62ce6e412acb1699a5373174aa42ca2bd3
treec9764ff1c2908421d86f80dca564eeb218b249c4
parent300432f58b99449076f8a662504bb74cb452efcf
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