diff options
author | Joe Thornber <ejt@redhat.com> | 2015-04-16 12:58:35 +0100 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2015-06-11 17:13:05 -0400 |
commit | 34fbcf6257eb3f39a5b78a4f51b40f881b82033b (patch) | |
tree | 6ea989052b2fc6fe70afcacd19bd19c89d4efba3 /drivers/dio | |
parent | 6550f075f5087459f64c1af71298fc50b102af11 (diff) | |
download | linux-34fbcf6257eb3f39a5b78a4f51b40f881b82033b.tar.gz linux-34fbcf6257eb3f39a5b78a4f51b40f881b82033b.tar.bz2 linux-34fbcf6257eb3f39a5b78a4f51b40f881b82033b.zip |
dm thin: range discard support
Previously REQ_DISCARD bios have been split into block sized chunks
before submission to the thin target. There are a couple of issues with
this:
- If the block size is small, a large discard request can
get broken up into a great many bios which is both slow and causes
a lot of memory pressure.
- The thin pool block size and the discard granularity for the
underlying data device need to be compatible if we want to passdown
the discard.
This patch relaxes the block size granularity for thin devices. It
makes use of the recent range locking added to the bio_prison to
quiesce a whole range of thin blocks before unmapping them. Once a
thin range has been unmapped the discard can then be passed down to
the data device for those sub ranges where the data blocks are no
longer used (ie. they weren't shared in the first place).
This patch also doesn't make any apologies about open-coding portions
of block core as a means to supporting async discard completions in the
near-term -- if/when late bio splitting lands it'll all get cleaned up.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/dio')
0 files changed, 0 insertions, 0 deletions