diff options
author | Mike Snitzer <snitzer@redhat.com> | 2009-06-22 10:12:33 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2009-06-22 10:12:33 +0100 |
commit | af4874e03ed82f050d5872d8c39ce64bf16b5c38 (patch) | |
tree | 38aa5dee43b4bb7a369995d4f38dee992cb051e0 /include/linux/device-mapper.h | |
parent | 1197764e403d97231eb6da2b1e16f511a7fd3101 (diff) | |
download | kernel_samsung_crespo-af4874e03ed82f050d5872d8c39ce64bf16b5c38.zip kernel_samsung_crespo-af4874e03ed82f050d5872d8c39ce64bf16b5c38.tar.gz kernel_samsung_crespo-af4874e03ed82f050d5872d8c39ce64bf16b5c38.tar.bz2 |
dm target:s introduce iterate devices fn
Add .iterate_devices to 'struct target_type' to allow a function to be
called for all devices in a DM target. Implemented it for all targets
except those in dm-snap.c (origin and snapshot).
(The raid1 version number jumps to 1.12 because we originally reserved
1.1 to 1.11 for 'block_on_error' but ended up using 'handle_errors'
instead.)
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: martin.petersen@oracle.com
Diffstat (limited to 'include/linux/device-mapper.h')
-rw-r--r-- | include/linux/device-mapper.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 236880c..deac3b4 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h @@ -11,6 +11,7 @@ #include <linux/bio.h> #include <linux/blkdev.h> +struct dm_dev; struct dm_target; struct dm_table; struct mapped_device; @@ -81,6 +82,15 @@ typedef int (*dm_ioctl_fn) (struct dm_target *ti, unsigned int cmd, typedef int (*dm_merge_fn) (struct dm_target *ti, struct bvec_merge_data *bvm, struct bio_vec *biovec, int max_size); +typedef int (*iterate_devices_callout_fn) (struct dm_target *ti, + struct dm_dev *dev, + sector_t physical_start, + void *data); + +typedef int (*dm_iterate_devices_fn) (struct dm_target *ti, + iterate_devices_callout_fn fn, + void *data); + /* * Returns: * 0: The target can handle the next I/O immediately. @@ -139,6 +149,7 @@ struct target_type { dm_ioctl_fn ioctl; dm_merge_fn merge; dm_busy_fn busy; + dm_iterate_devices_fn iterate_devices; /* For internal device-mapper use. */ struct list_head list; |