提交 7dea378b 编写于 作者: M Mike Snitzer

dm: do not set 'discards_supported' in targets that do not need it

The DM target's 'discards_supported' flag is intended to act as an
override.  Meaning, even if the underlying storage doesn't support
discards the DM target will.
Signed-off-by: NMike Snitzer <snitzer@redhat.com>
上级 8a74d29d
...@@ -1513,7 +1513,6 @@ static int era_ctr(struct dm_target *ti, unsigned argc, char **argv) ...@@ -1513,7 +1513,6 @@ static int era_ctr(struct dm_target *ti, unsigned argc, char **argv)
ti->flush_supported = true; ti->flush_supported = true;
ti->num_discard_bios = 1; ti->num_discard_bios = 1;
ti->discards_supported = true;
era->callbacks.congested_fn = era_is_congested; era->callbacks.congested_fn = era_is_congested;
dm_table_add_target_callbacks(ti->table, &era->callbacks); dm_table_add_target_callbacks(ti->table, &era->callbacks);
......
...@@ -2887,9 +2887,6 @@ static void configure_discard_support(struct raid_set *rs) ...@@ -2887,9 +2887,6 @@ static void configure_discard_support(struct raid_set *rs)
bool raid456; bool raid456;
struct dm_target *ti = rs->ti; struct dm_target *ti = rs->ti;
/* Assume discards not supported until after checks below. */
ti->discards_supported = false;
/* /*
* XXX: RAID level 4,5,6 require zeroing for safety. * XXX: RAID level 4,5,6 require zeroing for safety.
*/ */
...@@ -2914,9 +2911,6 @@ static void configure_discard_support(struct raid_set *rs) ...@@ -2914,9 +2911,6 @@ static void configure_discard_support(struct raid_set *rs)
} }
} }
/* All RAID members properly support discards */
ti->discards_supported = true;
/* /*
* RAID1 and RAID10 personalities require bio splitting, * RAID1 and RAID10 personalities require bio splitting,
* RAID0/4/5/6 don't and process large discard bios properly. * RAID0/4/5/6 don't and process large discard bios properly.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册