mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 01:33:00 -04:00
[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 <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
3cb4021453
commit
999d816851
3 changed files with 8 additions and 1 deletions
|
|
@ -1001,6 +1001,11 @@ int dm_table_flush_all(struct dm_table *t)
|
|||
{
|
||||
struct list_head *d, *devices = dm_table_get_devices(t);
|
||||
int ret = 0;
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < t->num_targets; i++)
|
||||
if (t->targets[i].type->flush)
|
||||
t->targets[i].type->flush(&t->targets[i]);
|
||||
|
||||
for (d = devices->next; d != devices; d = d->next) {
|
||||
struct dm_dev *dd = list_entry(d, struct dm_dev, list);
|
||||
|
|
|
|||
Loading…
Reference in a new issue