summaryrefslogtreecommitdiff
path: root/include/linux/device-mapper.h
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@kernel.org>2023-04-14 12:07:27 -0400
committerMike Snitzer <snitzer@kernel.org>2023-04-14 12:07:27 -0400
commit13f6facf3faeed34ca381aef4c9b153c7aed3972 (patch)
tree5b178e7ae69f1c9b7c10e91fa20c1acfaee0631a /include/linux/device-mapper.h
parent3664ff82dae1ef9f14f7763d3dd30565e7ef9e14 (diff)
dm: allow targets to require splitting WRITE_ZEROES and SECURE_ERASE
Introduce max_write_zeroes_granularity and max_secure_erase_granularity flags in the dm_target struct. If a target sets these then DM core will split IO of these operation types accordingly (in terms of max_write_zeroes_sectors and max_secure_erase_sectors respectively). Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'include/linux/device-mapper.h')
-rw-r--r--include/linux/device-mapper.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index f2d9afb8a7e9..983f1f0402b5 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -359,12 +359,24 @@ struct dm_target {
bool discards_supported:1;
/*
- * Set if this target requires that discards be split on both
- * 'discard_granularity' and 'max_discard_sectors' boundaries.
+ * Set if this target requires that discards be split on
+ * 'max_discard_sectors' boundaries.
*/
bool max_discard_granularity:1;
/*
+ * Set if this target requires that secure_erases be split on
+ * 'max_secure_erase_sectors' boundaries.
+ */
+ bool max_secure_erase_granularity:1;
+
+ /*
+ * Set if this target requires that write_zeroes be split on
+ * 'max_write_zeroes_sectors' boundaries.
+ */
+ bool max_write_zeroes_granularity:1;
+
+ /*
* Set if we need to limit the number of in-flight bios when swapping.
*/
bool limit_swap_bios:1;