nfsd: common grace period control
[safe/jmp/linux-2.6] / include / linux / device-mapper.h
index a68829e..a90222e 100644 (file)
@@ -8,14 +8,14 @@
 #ifndef _LINUX_DEVICE_MAPPER_H
 #define _LINUX_DEVICE_MAPPER_H
 
-#ifdef __KERNEL__
-
 #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;
 
@@ -74,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);
 
 /*
@@ -109,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 {
@@ -252,12 +256,6 @@ void dm_table_event(struct dm_table *t);
  */
 int dm_swap_table(struct mapped_device *md, struct dm_table *t);
 
-/*
- * Prepare a table for a device that will error all I/O.
- * To make it active, call dm_suspend(), dm_swap_table() then dm_resume().
- */
-int dm_create_error_table(struct dm_table **result, struct mapped_device *md);
-
 /*-----------------------------------------------------------------
  * Macros.
  *---------------------------------------------------------------*/
@@ -350,5 +348,4 @@ static inline unsigned long to_bytes(sector_t n)
        return (n << SECTOR_SHIFT);
 }
 
-#endif /* __KERNEL__ */
 #endif /* _LINUX_DEVICE_MAPPER_H */