]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/device-mapper.h
Merge branch 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu...
[karo-tx-linux.git] / include / linux / device-mapper.h
index 2970022faa632715461ab11ea8955cf3aa0fb1c0..272496d1fae41bbb7de1db89b1131ab87283972b 100644 (file)
@@ -193,6 +193,13 @@ struct dm_target {
        char *error;
 };
 
+/* Each target can link one of these into the table */
+struct dm_target_callbacks {
+       struct list_head list;
+       int (*congested_fn) (struct dm_target_callbacks *, int);
+       void (*unplug_fn)(struct dm_target_callbacks *);
+};
+
 int dm_register_target(struct target_type *t);
 void dm_unregister_target(struct target_type *t);
 
@@ -268,6 +275,11 @@ int dm_table_create(struct dm_table **result, fmode_t mode,
 int dm_table_add_target(struct dm_table *t, const char *type,
                        sector_t start, sector_t len, char *params);
 
+/*
+ * Target_ctr should call this if it needs to add any callbacks.
+ */
+void dm_table_add_target_callbacks(struct dm_table *t, struct dm_target_callbacks *cb);
+
 /*
  * Finally call this to make the table ready for use.
  */