diff options
author | Joe Thornber <ejt@redhat.com> | 2014-09-17 05:17:39 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2014-11-10 15:25:30 -0500 |
commit | 5f274d886598c9fd26d2499bf3f68306f170e9db (patch) | |
tree | af0ded19382c65e832ea51e2b01efb40581c81dd /drivers/md/dm-thin.c | |
parent | f1afb36a6102b52949c2c6d8eb250eddcce3fc5f (diff) |
dm bio prison: introduce support for locking ranges of blocks
Ranges will be placed in the same cell if they overlap.
Range locking is a prerequisite for more efficient multi-block discard
support in both the cache and thin-provisioning targets.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-thin.c')
-rw-r--r-- | drivers/md/dm-thin.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index fb05f6a4bbfd..8c5504c0e894 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c | |||
@@ -115,7 +115,8 @@ static void build_data_key(struct dm_thin_device *td, | |||
115 | { | 115 | { |
116 | key->virtual = 0; | 116 | key->virtual = 0; |
117 | key->dev = dm_thin_dev_id(td); | 117 | key->dev = dm_thin_dev_id(td); |
118 | key->block = b; | 118 | key->block_begin = b; |
119 | key->block_end = b + 1ULL; | ||
119 | } | 120 | } |
120 | 121 | ||
121 | static void build_virtual_key(struct dm_thin_device *td, dm_block_t b, | 122 | static void build_virtual_key(struct dm_thin_device *td, dm_block_t b, |
@@ -123,7 +124,8 @@ static void build_virtual_key(struct dm_thin_device *td, dm_block_t b, | |||
123 | { | 124 | { |
124 | key->virtual = 1; | 125 | key->virtual = 1; |
125 | key->dev = dm_thin_dev_id(td); | 126 | key->dev = dm_thin_dev_id(td); |
126 | key->block = b; | 127 | key->block_begin = b; |
128 | key->block_end = b + 1ULL; | ||
127 | } | 129 | } |
128 | 130 | ||
129 | /*----------------------------------------------------------------*/ | 131 | /*----------------------------------------------------------------*/ |