Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / include / linux / device-mapper.h
index 7abe54e..aee10b2 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2001 Sistina Software (UK) Limited.
+ * Copyright (C) 2004 Red Hat, Inc. All rights reserved.
  *
  * This file is released under the LGPL.
  */
@@ -51,12 +52,15 @@ typedef int (*dm_endio_fn) (struct dm_target *ti,
                            struct bio *bio, int error,
                            union map_info *map_context);
 
-typedef void (*dm_suspend_fn) (struct dm_target *ti);
+typedef void (*dm_presuspend_fn) (struct dm_target *ti);
+typedef void (*dm_postsuspend_fn) (struct dm_target *ti);
 typedef void (*dm_resume_fn) (struct dm_target *ti);
 
 typedef int (*dm_status_fn) (struct dm_target *ti, status_type_t status_type,
                             char *result, unsigned int maxlen);
 
+typedef int (*dm_message_fn) (struct dm_target *ti, unsigned argc, char **argv);
+
 void dm_error(const char *message);
 
 /*
@@ -79,18 +83,21 @@ struct target_type {
        dm_dtr_fn dtr;
        dm_map_fn map;
        dm_endio_fn end_io;
-       dm_suspend_fn suspend;
+       dm_presuspend_fn presuspend;
+       dm_postsuspend_fn postsuspend;
        dm_resume_fn resume;
        dm_status_fn status;
+       dm_message_fn message;
 };
 
 struct io_restrictions {
-       unsigned short          max_sectors;
+       unsigned int            max_sectors;
        unsigned short          max_phys_segments;
        unsigned short          max_hw_segments;
        unsigned short          hardsect_size;
        unsigned int            max_segment_size;
        unsigned long           seg_boundary_mask;
+       unsigned char           no_cluster; /* inverted so that 0 is default */
 };
 
 struct dm_target {
@@ -102,6 +109,7 @@ struct dm_target {
        sector_t len;
 
        /* FIXME: turn this into a mask, and merge with io_restrictions */
+       /* Always a power of 2 */
        sector_t split_io;
 
        /*