aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/device-mapper/cache-policies.txt16
-rw-r--r--Documentation/device-mapper/cache.txt51
-rw-r--r--Documentation/device-mapper/thin-provisioning.txt7
-rw-r--r--drivers/md/Kconfig11
-rw-r--r--drivers/md/Makefile1
-rw-r--r--drivers/md/dm-bufio.c36
-rw-r--r--drivers/md/dm-bufio.h12
-rw-r--r--drivers/md/dm-builtin.c48
-rw-r--r--drivers/md/dm-cache-policy-mq.c70
-rw-r--r--drivers/md/dm-cache-policy.c4
-rw-r--r--drivers/md/dm-cache-policy.h6
-rw-r--r--drivers/md/dm-cache-target.c20
-rw-r--r--drivers/md/dm-delay.c35
-rw-r--r--drivers/md/dm-log-userspace-base.c206
-rw-r--r--drivers/md/dm-snap-persistent.c87
-rw-r--r--drivers/md/dm-snap.c10
-rw-r--r--drivers/md/dm-sysfs.c5
-rw-r--r--drivers/md/dm-table.c22
-rw-r--r--drivers/md/dm-thin-metadata.c20
-rw-r--r--drivers/md/dm-thin-metadata.h4
-rw-r--r--drivers/md/dm-thin.c284
-rw-r--r--drivers/md/dm.c15
-rw-r--r--drivers/md/dm.h17
-rw-r--r--drivers/md/persistent-data/dm-block-manager.c2
-rw-r--r--drivers/md/persistent-data/dm-btree.c33
-rw-r--r--drivers/md/persistent-data/dm-btree.h8
-rw-r--r--drivers/md/persistent-data/dm-space-map-common.c6
-rw-r--r--drivers/md/persistent-data/dm-space-map-metadata.c32
-rw-r--r--include/uapi/linux/dm-log-userspace.h20
29 files changed, 767 insertions, 321 deletions
diff --git a/Documentation/device-mapper/cache-policies.txt b/Documentation/device-mapper/cache-policies.txt
index df52a849957f..66c2774c0c64 100644
--- a/Documentation/device-mapper/cache-policies.txt
+++ b/Documentation/device-mapper/cache-policies.txt
@@ -40,8 +40,11 @@ on hit count on entry. The policy aims to take different cache miss
40costs into account and to adjust to varying load patterns automatically. 40costs into account and to adjust to varying load patterns automatically.
41 41
42Message and constructor argument pairs are: 42Message and constructor argument pairs are:
43 'sequential_threshold <#nr_sequential_ios>' and 43 'sequential_threshold <#nr_sequential_ios>'
44 'random_threshold <#nr_random_ios>'. 44 'random_threshold <#nr_random_ios>'
45 'read_promote_adjustment <value>'
46 'write_promote_adjustment <value>'
47 'discard_promote_adjustment <value>'
45 48
46The sequential threshold indicates the number of contiguous I/Os 49The sequential threshold indicates the number of contiguous I/Os
47required before a stream is treated as sequential. The random threshold 50required before a stream is treated as sequential. The random threshold
@@ -55,6 +58,15 @@ since spindles tend to have good bandwidth. The io_tracker counts
55contiguous I/Os to try to spot when the io is in one of these sequential 58contiguous I/Os to try to spot when the io is in one of these sequential
56modes. 59modes.
57 60
61Internally the mq policy maintains a promotion threshold variable. If
62the hit count of a block not in the cache goes above this threshold it
63gets promoted to the cache. The read, write and discard promote adjustment
64tunables allow you to tweak the promotion threshold by adding a small
65value based on the io type. They default to 4, 8 and 1 respectively.
66If you're trying to quickly warm a new cache device you may wish to
67reduce these to encourage promotion. Remember to switch them back to
68their defaults after the cache fills though.
69
58cleaner 70cleaner
59------- 71-------
60 72
diff --git a/Documentation/device-mapper/cache.txt b/Documentation/device-mapper/cache.txt
index 719320b5ed3f..e6b72d355151 100644
--- a/Documentation/device-mapper/cache.txt
+++ b/Documentation/device-mapper/cache.txt
@@ -217,36 +217,43 @@ the characteristics of a specific policy, always request it by name.
217Status 217Status
218------ 218------
219 219
220<#used metadata blocks>/<#total metadata blocks> <#read hits> <#read misses> 220<metadata block size> <#used metadata blocks>/<#total metadata blocks>
221<#write hits> <#write misses> <#demotions> <#promotions> <#blocks in cache> 221<cache block size> <#used cache blocks>/<#total cache blocks>
222<#dirty> <#features> <features>* <#core args> <core args>* <#policy args> 222<#read hits> <#read misses> <#write hits> <#write misses>
223<policy args>* 223<#demotions> <#promotions> <#dirty> <#features> <features>*
224 224<#core args> <core args>* <policy name> <#policy args> <policy args>*
225#used metadata blocks : Number of metadata blocks used 225
226#total metadata blocks : Total number of metadata blocks 226metadata block size : Fixed block size for each metadata block in
227#read hits : Number of times a READ bio has been mapped 227 sectors
228#used metadata blocks : Number of metadata blocks used
229#total metadata blocks : Total number of metadata blocks
230cache block size : Configurable block size for the cache device
231 in sectors
232#used cache blocks : Number of blocks resident in the cache
233#total cache blocks : Total number of cache blocks
234#read hits : Number of times a READ bio has been mapped
228 to the cache 235 to the cache
229#read misses : Number of times a READ bio has been mapped 236#read misses : Number of times a READ bio has been mapped
230 to the origin 237 to the origin
231#write hits : Number of times a WRITE bio has been mapped 238#write hits : Number of times a WRITE bio has been mapped
232 to the cache 239 to the cache
233#write misses : Number of times a WRITE bio has been 240#write misses : Number of times a WRITE bio has been
234 mapped to the origin 241 mapped to the origin
235#demotions : Number of times a block has been removed 242#demotions : Number of times a block has been removed
236 from the cache 243 from the cache
237#promotions : Number of times a block has been moved to 244#promotions : Number of times a block has been moved to
238 the cache 245 the cache
239#blocks in cache : Number of blocks resident in the cache 246#dirty : Number of blocks in the cache that differ
240#dirty : Number of blocks in the cache that differ
241 from the origin 247 from the origin
242#feature args : Number of feature args to follow 248#feature args : Number of feature args to follow
243feature args : 'writethrough' (optional) 249feature args : 'writethrough' (optional)
244#core args : Number of core arguments (must be even) 250#core args : Number of core arguments (must be even)
245core args : Key/value pairs for tuning the core 251core args : Key/value pairs for tuning the core
246 e.g. migration_threshold 252 e.g. migration_threshold
247#policy args : Number of policy arguments to follow (must be even) 253policy name : Name of the policy
248policy args : Key/value pairs 254#policy args : Number of policy arguments to follow (must be even)
249 e.g. 'sequential_threshold 1024 255policy args : Key/value pairs
256 e.g. sequential_threshold
250 257
251Messages 258Messages
252-------- 259--------
diff --git a/Documentation/device-mapper/thin-provisioning.txt b/Documentation/device-mapper/thin-provisioning.txt
index 50c44cf79b0e..8a7a3d46e0da 100644
--- a/Documentation/device-mapper/thin-provisioning.txt
+++ b/Documentation/device-mapper/thin-provisioning.txt
@@ -235,6 +235,8 @@ i) Constructor
235 read_only: Don't allow any changes to be made to the pool 235 read_only: Don't allow any changes to be made to the pool
236 metadata. 236 metadata.
237 237
238 error_if_no_space: Error IOs, instead of queueing, if no space.
239
238 Data block size must be between 64KB (128 sectors) and 1GB 240 Data block size must be between 64KB (128 sectors) and 1GB
239 (2097152 sectors) inclusive. 241 (2097152 sectors) inclusive.
240 242
@@ -276,6 +278,11 @@ ii) Status
276 contain the string 'Fail'. The userspace recovery tools 278 contain the string 'Fail'. The userspace recovery tools
277 should then be used. 279 should then be used.
278 280
281 error_if_no_space|queue_if_no_space
282 If the pool runs out of data or metadata space, the pool will
283 either queue or error the IO destined to the data device. The
284 default is to queue the IO until more space is added.
285
279iii) Messages 286iii) Messages
280 287
281 create_thin <dev id> 288 create_thin <dev id>
diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig
index f2ccbc3b9fe4..9a06fe883766 100644
--- a/drivers/md/Kconfig
+++ b/drivers/md/Kconfig
@@ -176,8 +176,12 @@ config MD_FAULTY
176 176
177source "drivers/md/bcache/Kconfig" 177source "drivers/md/bcache/Kconfig"
178 178