aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device-mapper.h
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2009-06-22 05:12:20 -0400
committerAlasdair G Kergon <agk@redhat.com>2009-06-22 05:12:20 -0400
commitf9ab94cee313746573b2d693bc2afb807ebb0998 (patch)
tree150155f364db0f26c7217e1f92d31344aa67a3f0 /include/linux/device-mapper.h
parent27eaa14975d8b53f0bad422e53cdf8e5f6dd44ec (diff)
dm: introduce num_flush_requests
Introduce num_flush_requests for a target to set to say how many flush instructions (empty barriers) it wants to receive. These are sent by __clone_and_map_empty_barrier with map_info->flush_request going from 0 to (num_flush_requests - 1). Old targets without flush support won't receive any flush requests. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'include/linux/device-mapper.h')
-rw-r--r--include/linux/device-mapper.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 49c2362977fd..fc36a4d07723 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -21,6 +21,7 @@ typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t;
21union map_info { 21union map_info {
22 void *ptr; 22 void *ptr;
23 unsigned long long ll; 23 unsigned long long ll;
24 unsigned flush_request;
24}; 25};
25 26
26/* 27/*
@@ -168,6 +169,16 @@ struct dm_target {
168 sector_t split_io; 169 sector_t split_io;
169 170
170 /* 171 /*
172 * A number of zero-length barrier requests that will be submitted
173 * to the target for the purpose of flushing cache.
174 *
175 * The request number will be placed in union map_info->flush_request.
176 * It is a responsibility of the target driver to remap these requests
177 * to the real underlying devices.
178 */
179 unsigned num_flush_requests;
180
181 /*
171 * These are automatically filled in by 182 * These are automatically filled in by
172 * dm_table_get_device. 183 * dm_table_get_device.
173 */ 184 */