diff options
Diffstat (limited to 'drivers/md/dm-delay.c')
-rw-r--r-- | drivers/md/dm-delay.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/md/dm-delay.c b/drivers/md/dm-delay.c index 8ad8a9044bbf..4e5b843cd4d7 100644 --- a/drivers/md/dm-delay.c +++ b/drivers/md/dm-delay.c | |||
@@ -318,9 +318,26 @@ static int delay_status(struct dm_target *ti, status_type_t type, | |||
318 | return 0; | 318 | return 0; |
319 | } | 319 | } |
320 | 320 | ||
321 | static int delay_iterate_devices(struct dm_target *ti, | ||
322 | iterate_devices_callout_fn fn, void *data) | ||
323 | { | ||
324 | struct delay_c *dc = ti->private; | ||
325 | int ret = 0; | ||
326 | |||
327 | ret = fn(ti, dc->dev_read, dc->start_read, data); | ||
328 | if (ret) | ||
329 | goto out; | ||
330 | |||
331 | if (dc->dev_write) | ||
332 | ret = fn(ti, dc->dev_write, dc->start_write, data); | ||
333 | |||
334 | out: | ||
335 | return ret; | ||
336 | } | ||
337 | |||
321 | static struct target_type delay_target = { | 338 | static struct target_type delay_target = { |
322 | .name = "delay", | 339 | .name = "delay", |
323 | .version = {1, 0, 2}, | 340 | .version = {1, 1, 0}, |
324 | .module = THIS_MODULE, | 341 | .module = THIS_MODULE, |
325 | .ctr = delay_ctr, | 342 | .ctr = delay_ctr, |
326 | .dtr = delay_dtr, | 343 | .dtr = delay_dtr, |
@@ -328,6 +345,7 @@ static struct target_type delay_target = { | |||
328 | .presuspend = delay_presuspend, | 345 | .presuspend = delay_presuspend, |
329 | .resume = delay_resume, | 346 | .resume = delay_resume, |
330 | .status = delay_status, | 347 | .status = delay_status, |
348 | .iterate_devices = delay_iterate_devices, | ||
331 | }; | 349 | }; |
332 | 350 | ||
333 | static int __init dm_delay_init(void) | 351 | static int __init dm_delay_init(void) |