Commit 99d03c141b40914b67d63c9d23b8da4386422ed7
Committed by
Alasdair G Kergon
1 parent
9d357b0787
Exists in
master
and in
7 other branches
dm: per target unplug callback support
Add per-target unplug callback support. Cc: linux-raid@vger.kernel.org Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Showing 2 changed files with 6 additions and 0 deletions Side-by-side Diff
drivers/md/dm-table.c
... | ... | @@ -1278,6 +1278,7 @@ |
1278 | 1278 | { |
1279 | 1279 | struct dm_dev_internal *dd; |
1280 | 1280 | struct list_head *devices = dm_table_get_devices(t); |
1281 | + struct dm_target_callbacks *cb; | |
1281 | 1282 | |
1282 | 1283 | list_for_each_entry(dd, devices, list) { |
1283 | 1284 | struct request_queue *q = bdev_get_queue(dd->dm_dev.bdev); |
... | ... | @@ -1290,6 +1291,10 @@ |
1290 | 1291 | dm_device_name(t->md), |
1291 | 1292 | bdevname(dd->dm_dev.bdev, b)); |
1292 | 1293 | } |
1294 | + | |
1295 | + list_for_each_entry(cb, &t->target_callbacks, list) | |
1296 | + if (cb->unplug_fn) | |
1297 | + cb->unplug_fn(cb); | |
1293 | 1298 | } |
1294 | 1299 | |
1295 | 1300 | struct mapped_device *dm_table_get_md(struct dm_table *t) |
include/linux/device-mapper.h