diff --git a/[refs] b/[refs] index 3f922fc2dd1f..f2462e9de3ec 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f4b90369d3a9ffe0f48f373c566578c142e95bf2 +refs/heads/master: 0e9c24ed7443d090e369a2eddfa13f7f0b5afbaf diff --git a/trunk/drivers/md/dm-table.c b/trunk/drivers/md/dm-table.c index 2e227fbf1622..f90069029aae 100644 --- a/trunk/drivers/md/dm-table.c +++ b/trunk/drivers/md/dm-table.c @@ -1319,6 +1319,9 @@ static bool dm_table_supports_flush(struct dm_table *t, unsigned flush) if (!ti->num_flush_requests) continue; + if (ti->flush_supported) + return 1; + if (ti->type->iterate_devices && ti->type->iterate_devices(ti, device_flush_capable, &flush)) return 1; diff --git a/trunk/include/linux/device-mapper.h b/trunk/include/linux/device-mapper.h index 8bdbbfce759a..bdd65e97a129 100644 --- a/trunk/include/linux/device-mapper.h +++ b/trunk/include/linux/device-mapper.h @@ -211,6 +211,12 @@ struct dm_target { /* Used to provide an error string from the ctr */ char *error; + /* + * Set if this target needs to receive flushes regardless of + * whether or not its underlying devices have support. + */ + bool flush_supported:1; + /* * Set if this target needs to receive discards regardless of * whether or not its underlying devices have support.