summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJohn Garry <john.g.garry@oracle.com>2025-01-16 20:02:56 +0300
committerMikulas Patocka <mpatocka@redhat.com>2025-01-18 00:23:47 +0300
commit3194e36488e2dae05f9a822c73eaa367e47b2e3d (patch)
treeeb2c2089c158123926c2fdfd067903421435a663 /include/linux
parenta38425935f7886cef5fe04c796f36715e9d0ef3f (diff)
downloadlinux-3194e36488e2dae05f9a822c73eaa367e47b2e3d.tar.xz
dm-table: atomic writes support
Support stacking atomic write limits for DM devices. All the pre-existing code in blk_stack_atomic_writes_limits() already takes care of finding the aggregrate limits from the bottom devices. Feature flag DM_TARGET_ATOMIC_WRITES is introduced so that atomic writes can be enabled on personalities selectively. This is to ensure that atomic writes are only enabled when verified to be working properly (for a specific personality). In addition, it just may not make sense to enable atomic writes on some personalities (so this flag also helps there). Signed-off-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/device-mapper.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 8321f65897f3..bcc6d7b69470 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -299,6 +299,9 @@ struct target_type {
#define dm_target_supports_mixed_zoned_model(type) (false)
#endif
+#define DM_TARGET_ATOMIC_WRITES 0x00000400
+#define dm_target_supports_atomic_writes(type) ((type)->features & DM_TARGET_ATOMIC_WRITES)
+
struct dm_target {
struct dm_table *table;
struct target_type *type;