diff options
author | Mike Snitzer <snitzer@redhat.com> | 2022-02-17 23:40:30 -0500 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2022-02-21 15:36:32 -0500 |
commit | e6fc9f62ce6e412acb1699a5373174aa42ca2bd3 (patch) | |
tree | c9764ff1c2908421d86f80dca564eeb218b249c4 /drivers/md/dm-core.h | |
parent | 300432f58b99449076f8a662504bb74cb452efcf (diff) | |
download | lwn-e6fc9f62ce6e412acb1699a5373174aa42ca2bd3.tar.gz lwn-e6fc9f62ce6e412acb1699a5373174aa42ca2bd3.zip |
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>
Diffstat (limited to 'drivers/md/dm-core.h')
-rw-r--r-- | drivers/md/dm-core.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-core.h b/drivers/md/dm-core.h index a86b5dacef0e..33ef92e90462 100644 --- a/drivers/md/dm-core.h +++ b/drivers/md/dm-core.h @@ -215,7 +215,8 @@ struct dm_target_io { struct dm_io *io; struct dm_target *ti; unsigned int *len_ptr; - bool inside_dm_io; + bool inside_dm_io:1; + bool is_duplicate_bio:1; sector_t old_sector; struct bio clone; }; |