diff options
author | Bryn Reeves <breeves@redhat.com> | 2006-10-03 04:15:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 11:04:16 -0400 |
commit | 999d816851c3e080412a19558f111d01852d2f04 (patch) | |
tree | 8b75a8e97d6fa7c41e81169e9b2ba5f7806e23a9 /drivers/md/dm-table.c | |
parent | 3cb4021453a69585e458ec2177677c0c1300dccf (diff) |
[PATCH] dm table: add target flush
This patch adds support for a per-target dm_flush_fn method. This is needed
to allow dm-loop to invalidate page cache mappings in response to BLKFLSBUF
ioctl commands.
Signed-off-by: Bryn Reeves <breeves@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r-- | drivers/md/dm-table.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 4920998efeeb..05befa91807a 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c | |||
@@ -1001,6 +1001,11 @@ int dm_table_flush_all(struct dm_table *t) | |||
1001 | { | 1001 | { |
1002 | struct list_head *d, *devices = dm_table_get_devices(t); | 1002 | struct list_head *d, *devices = dm_table_get_devices(t); |
1003 | int ret = 0; | 1003 | int ret = 0; |
1004 | unsigned i; | ||
1005 | |||
1006 | for (i = 0; i < t->num_targets; i++) | ||
1007 | if (t->targets[i].type->flush) | ||
1008 | t->targets[i].type->flush(&t->targets[i]); | ||
1004 | 1009 | ||
1005 | for (d = devices->next; d != devices; d = d->next) { | 1010 | for (d = devices->next; d != devices; d = d->next) { |
1006 | struct dm_dev *dd = list_entry(d, struct dm_dev, list); | 1011 | struct dm_dev *dd = list_entry(d, struct dm_dev, list); |