Commit 06961c4
Mike Snitzer
dm: split discards further if target sets max_discard_granularity
The block core (bio_split_discard) will already split discards based
on the 'discard_granularity' and 'max_discard_sectors' queue_limits.
But the DM thin target also needs to ensure that it doesn't receive a
discard that spans a 'max_discard_sectors' boundary.
Introduce a dm_target 'max_discard_granularity' flag that if set will
cause DM core to split discard bios relative to 'max_discard_sectors'.
This treats 'discard_granularity' as a "min_discard_granularity" and
'max_discard_sectors' as a "max_discard_granularity".
Requested-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>1 parent bb46c56 commit 06961c4
3 files changed
Lines changed: 27 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1162 | 1162 | | |
1163 | 1163 | | |
1164 | 1164 | | |
1165 | | - | |
| 1165 | + | |
| 1166 | + | |
1166 | 1167 | | |
1167 | 1168 | | |
1168 | 1169 | | |
| |||
1173 | 1174 | | |
1174 | 1175 | | |
1175 | 1176 | | |
1176 | | - | |
| 1177 | + | |
1177 | 1178 | | |
1178 | 1179 | | |
1179 | 1180 | | |
1180 | | - | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
1181 | 1187 | | |
1182 | 1188 | | |
1183 | 1189 | | |
| |||
1565 | 1571 | | |
1566 | 1572 | | |
1567 | 1573 | | |
1568 | | - | |
| 1574 | + | |
| 1575 | + | |
1569 | 1576 | | |
1570 | 1577 | | |
1571 | 1578 | | |
1572 | 1579 | | |
1573 | | - | |
| 1580 | + | |
1574 | 1581 | | |
1575 | 1582 | | |
1576 | 1583 | | |
| |||
1606 | 1613 | | |
1607 | 1614 | | |
1608 | 1615 | | |
| 1616 | + | |
1609 | 1617 | | |
1610 | 1618 | | |
1611 | 1619 | | |
1612 | 1620 | | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
1613 | 1626 | | |
1614 | 1627 | | |
1615 | 1628 | | |
| |||
1630 | 1643 | | |
1631 | 1644 | | |
1632 | 1645 | | |
1633 | | - | |
| 1646 | + | |
1634 | 1647 | | |
1635 | 1648 | | |
1636 | 1649 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
361 | 367 | | |
362 | 368 | | |
363 | 369 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
| 289 | + | |
290 | 290 | | |
291 | | - | |
| 291 | + | |
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| |||
0 commit comments