diff options
Diffstat (limited to 'drivers/md/dm-table.c')
| -rw-r--r-- | drivers/md/dm-table.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 5cd665c91ead..958275aca008 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c | |||
| @@ -1449,22 +1449,6 @@ static bool dm_table_supports_flush(struct dm_table *t, unsigned long flush) | |||
| 1449 | return false; | 1449 | return false; |
| 1450 | } | 1450 | } |
| 1451 | 1451 | ||
| 1452 | static bool dm_table_discard_zeroes_data(struct dm_table *t) | ||
| 1453 | { | ||
| 1454 | struct dm_target *ti; | ||
| 1455 | unsigned i = 0; | ||
| 1456 | |||
| 1457 | /* Ensure that all targets supports discard_zeroes_data. */ | ||
| 1458 | while (i < dm_table_get_num_targets(t)) { | ||
| 1459 | ti = dm_table_get_target(t, i++); | ||
| 1460 | |||
| 1461 | if (ti->discard_zeroes_data_unsupported) | ||
| 1462 | return false; | ||
| 1463 | } | ||
| 1464 | |||
| 1465 | return true; | ||
| 1466 | } | ||
| 1467 | |||
| 1468 | static int device_is_nonrot(struct dm_target *ti, struct dm_dev *dev, | 1452 | static int device_is_nonrot(struct dm_target *ti, struct dm_dev *dev, |
| 1469 | sector_t start, sector_t len, void *data) | 1453 | sector_t start, sector_t len, void *data) |
| 1470 | { | 1454 | { |
| @@ -1620,9 +1604,6 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q, | |||
| 1620 | } | 1604 | } |
| 1621 | blk_queue_write_cache(q, wc, fua); | 1605 | blk_queue_write_cache(q, wc, fua); |
| 1622 | 1606 | ||
| 1623 | if (!dm_table_discard_zeroes_data(t)) | ||
| 1624 | q->limits.discard_zeroes_data = 0; | ||
| 1625 | |||
| 1626 | /* Ensure that all underlying devices are non-rotational. */ | 1607 | /* Ensure that all underlying devices are non-rotational. */ |
| 1627 | if (dm_table_all_devices_attribute(t, device_is_nonrot)) | 1608 | if (dm_table_all_devices_attribute(t, device_is_nonrot)) |
| 1628 | queue_flag_set_unlocked(QUEUE_FLAG_NONROT, q); | 1609 | queue_flag_set_unlocked(QUEUE_FLAG_NONROT, q); |
