aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMilan Broz <mbroz@redhat.com>2008-07-21 12:00:37 +0100
committerAlasdair G Kergon <agk@redhat.com>2008-07-21 12:00:37 +0100
commitf6fccb1213ba3d661baeb2a5eee0a9701dc03e1b (patch)
tree456671e791f8a61b40e0d622591b902ca1351ae7 /include
parentdm snapshot: use per device mempools (diff)
downloadlinux-dev-f6fccb1213ba3d661baeb2a5eee0a9701dc03e1b.tar.xz
linux-dev-f6fccb1213ba3d661baeb2a5eee0a9701dc03e1b.zip
dm: introduce merge_bvec_fn
Introduce a bvec merge function for device mapper devices for dynamic size restrictions. This code ensures the requested biovec lies within a single target and then calls a target-specific function to check against any constraints imposed by underlying devices. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/device-mapper.h6
-rw-r--r--include/linux/dm-ioctl.h4
2 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 0d8d419d191a..a90222e3297d 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -9,11 +9,13 @@
#define _LINUX_DEVICE_MAPPER_H
#include <linux/bio.h>
+#include <linux/blkdev.h>
struct dm_target;
struct dm_table;
struct dm_dev;
struct mapped_device;
+struct bio_vec;
typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t;
@@ -72,6 +74,9 @@ typedef int (*dm_ioctl_fn) (struct dm_target *ti, struct inode *inode,
struct file *filp, unsigned int cmd,
unsigned long arg);
+typedef int (*dm_merge_fn) (struct dm_target *ti, struct bvec_merge_data *bvm,
+ struct bio_vec *biovec, int max_size);
+
void dm_error(const char *message);
/*
@@ -107,6 +112,7 @@ struct target_type {
dm_status_fn status;
dm_message_fn message;
dm_ioctl_fn ioctl;
+ dm_merge_fn merge;
};
struct io_restrictions {
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h
index b03c41bbfa14..28c2940eb30d 100644
--- a/include/linux/dm-ioctl.h
+++ b/include/linux/dm-ioctl.h
@@ -256,9 +256,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 13
+#define DM_VERSION_MINOR 14
#define DM_VERSION_PATCHLEVEL 0
-#define DM_VERSION_EXTRA "-ioctl (2007-10-18)"
+#define DM_VERSION_EXTRA "-ioctl (2008-04-23)"
/* Status bits */
#define DM_READONLY_FLAG (1 << 0) /* In/Out */