summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2010-08-05 11:54:01 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2010-08-05 11:54:01 +1000
commit0c1f7fadf938273b0d8e0457772dfe8e297ab208 (patch)
tree1552e16e73783649629b0ed1003d9980f9f9e71e /include
parent7aab830f593094524e14d3888e4118632b32183d (diff)
parent58e2490783e5a21b866eab05bd42d53d917b9306 (diff)
Merge branch 'quilt/device-mapper'
Conflicts: drivers/md/dm.c
Diffstat (limited to 'include')
-rw-r--r--include/linux/device-mapper.h16
-rw-r--r--include/linux/dm-ioctl.h5
-rw-r--r--include/linux/miscdevice.h1
3 files changed, 18 insertions, 4 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 1381cd97b4ed..2970022faa63 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -22,7 +22,7 @@ typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t;
union map_info {
void *ptr;
unsigned long long ll;
- unsigned flush_request;
+ unsigned target_request_nr;
};
/*
@@ -174,12 +174,18 @@ struct dm_target {
* A number of zero-length barrier requests that will be submitted
* to the target for the purpose of flushing cache.
*
- * The request number will be placed in union map_info->flush_request.
+ * The request number will be placed in union map_info->target_request_nr.
* It is a responsibility of the target driver to remap these requests
* to the real underlying devices.
*/
unsigned num_flush_requests;
+ /*
+ * The number of discard requests that will be submitted to the
+ * target. map_info->request_nr is used just like num_flush_requests.
+ */
+ unsigned num_discard_requests;
+
/* target specific data */
void *private;
@@ -392,6 +398,12 @@ void *dm_vcalloc(unsigned long nmemb, unsigned long elem_size);
#define dm_array_too_big(fixed, obj, num) \
((num) > (UINT_MAX - (fixed)) / (obj))
+/*
+ * Sector offset taken relative to the start of the target instead of
+ * relative to the start of the device.
+ */
+#define dm_target_offset(ti, sector) ((sector) - (ti)->begin)
+
static inline sector_t to_sector(unsigned long n)
{
return (n >> SECTOR_SHIFT);
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h
index 2c445e113790..49eab360d5d4 100644
--- a/include/linux/dm-ioctl.h
+++ b/include/linux/dm-ioctl.h
@@ -11,6 +11,7 @@
#include <linux/types.h>
#define DM_DIR "mapper" /* Slashes not supported */
+#define DM_CONTROL_NODE "control"
#define DM_MAX_TYPE_NAME 16
#define DM_NAME_LEN 128
#define DM_UUID_LEN 129
@@ -266,9 +267,9 @@ enum {
#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
#define DM_VERSION_MAJOR 4
-#define DM_VERSION_MINOR 17
+#define DM_VERSION_MINOR 18
#define DM_VERSION_PATCHLEVEL 0
-#define DM_VERSION_EXTRA "-ioctl (2010-03-05)"
+#define DM_VERSION_EXTRA "-ioctl (2010-06-29)"
/* Status bits */
#define DM_READONLY_FLAG (1 << 0) /* In/Out */
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
index f6c9b7dcb9fd..bafffc737903 100644
--- a/include/linux/miscdevice.h
+++ b/include/linux/miscdevice.h
@@ -38,6 +38,7 @@
#define KVM_MINOR 232
#define BTRFS_MINOR 234
#define AUTOFS_MINOR 235
+#define MAPPER_CTRL_MINOR 236
#define MISC_DYNAMIC_MINOR 255
struct device;