aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-core.h
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2022-02-17 23:40:30 -0500
committerMike Snitzer <snitzer@redhat.com>2022-02-21 15:36:32 -0500
commite6fc9f62ce6e412acb1699a5373174aa42ca2bd3 (patch)
treec9764ff1c2908421d86f80dca564eeb218b249c4 /drivers/md/dm-core.h
parentdm: reduce dm_io and dm_target_io struct sizes (diff)
downloadlinux-dev-e6fc9f62ce6e412acb1699a5373174aa42ca2bd3.tar.xz
linux-dev-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.h3
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;
};