diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-03-07 18:17:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-03-07 18:17:36 -0500 |
commit | 2ef176f11a40d21e8d6c5d98a3c09d57c861fac6 (patch) | |
tree | bfac92c332d83f77a97514648e8b45b096d2a35c /Documentation | |
parent | b053940df41808f0f27568eb36820d10a8a987f8 (diff) | |
parent | cebc2de44d3bce53e46476e774126c298ca2c8a9 (diff) |
Merge tag 'dm-3.14-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
Pull device mapper fixes from Mike Snitzer:
- dm-cache memory allocation failure fix
- fix DM's Kconfig identation
- dm-snapshot metadata corruption fix for bug introduced in 3.14-rc1
- important refcount < 0 fix for the DM persistent data library's space
map metadata interface which fixes corruption reported by a few
dm-thinp users
and last but not least:
- more extensive fixes than ideal for dm-thinp's data resize capability
(which has had growing pain much like we've seen from -ENOSPC
handling of filesystems that mature).
The end result is dm-thinp now handles metadata operation failure and
no data space error conditions much better than before.
* tag 'dm-3.14-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
dm space map metadata: fix refcount decrement below 0 which caused corruption
dm thin: fix Documentation for held metadata root feature
dm thin: fix noflush suspend IO queueing
dm thin: fix deadlock in __requeue_bio_list
dm thin: fix out of data space handling
dm thin: ensure user takes action to validate data and metadata consistency
dm thin: synchronize the pool mode during suspend
dm snapshot: fix metadata corruption
dm: fix Kconfig indentation
dm cache mq: fix memory allocation failure for large cache devices
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/device-mapper/cache.txt | 11 | ||||
-rw-r--r-- | Documentation/device-mapper/thin-provisioning.txt | 34 |
2 files changed, 36 insertions, 9 deletions
diff --git a/Documentation/device-mapper/cache.txt b/Documentation/device-mapper/cache.txt index e6b72d355151..68c0f517c60e 100644 --- a/Documentation/device-mapper/cache.txt +++ b/Documentation/device-mapper/cache.txt | |||
@@ -124,12 +124,11 @@ the default being 204800 sectors (or 100MB). | |||
124 | Updating on-disk metadata | 124 | Updating on-disk metadata |
125 | ------------------------- | 125 | ------------------------- |
126 | 126 | ||
127 | On-disk metadata is committed every time a REQ_SYNC or REQ_FUA bio is | 127 | On-disk metadata is committed every time a FLUSH or FUA bio is written. |
128 | written. If no such requests are made then commits will occur every | 128 | If no such requests are made then commits will occur every second. This |
129 | second. This means the cache behaves like a physical disk that has a | 129 | means the cache behaves like a physical disk that has a volatile write |
130 | write cache (the same is true of the thin-provisioning target). If | 130 | cache. If power is lost you may lose some recent writes. The metadata |
131 | power is lost you may lose some recent writes. The metadata should | 131 | should always be consistent in spite of any crash. |
132 | always be consistent in spite of any crash. | ||
133 | 132 | ||
134 | The 'dirty' state for a cache block changes far too frequently for us | 133 | The 'dirty' state for a cache block changes far too frequently for us |
135 | to keep updating it on the fly. So we treat it as a hint. In normal | 134 | to keep updating it on the fly. So we treat it as a hint. In normal |
diff --git a/Documentation/device-mapper/thin-provisioning.txt b/Documentation/device-mapper/thin-provisioning.txt index 8a7a3d46e0da..05a27e9442bd 100644 --- a/Documentation/device-mapper/thin-provisioning.txt +++ b/Documentation/device-mapper/thin-provisioning.txt | |||
@@ -116,6 +116,35 @@ Resuming a device with a new table itself triggers an event so the | |||
116 | userspace daemon can use this to detect a situation where a new table | 116 | userspace daemon can use this to detect a situation where a new table |
117 | already exceeds the threshold. | 117 | already exceeds the threshold. |
118 | 118 | ||
119 | A low water mark for the metadata device is maintained in the kernel and | ||
120 | will trigger a dm event if free space on the metadata device drops below | ||
121 | it. | ||
122 | |||
123 | Updating on-disk metadata | ||
124 | ------------------------- | ||
125 | |||
126 | On-disk metadata is committed every time a FLUSH or FUA bio is written. | ||
127 | If no such requests are made then commits will occur every second. This | ||
128 | means the thin-provisioning target behaves like a physical disk that has | ||
129 | a volatile write cache. If power is lost you may lose some recent | ||
130 | writes. The metadata should always be consistent in spite of any crash. | ||
131 | |||
132 | If data space is exhausted the pool will either error or queue IO | ||
133 | according to the configuration (see: error_if_no_space). If metadata | ||
134 | space is exhausted or a metadata operation fails: the pool will error IO | ||
135 | until the pool is taken offline and repair is performed to 1) fix any | ||
136 | potential inconsistencies and 2) clear the flag that imposes repair. | ||
137 | Once the pool's metadata device is repaired it may be resized, which | ||
138 | will allow the pool to return to normal operation. Note that if a pool | ||
139 | is flagged as needing repair, the pool's data and metadata devices | ||
140 | cannot be resized until repair is performed. It should also be noted | ||
141 | that when the pool's metadata space is exhausted the current metadata | ||
142 | transaction is aborted. Given that the pool will cache IO whose | ||
143 | completion may have already been acknowledged to upper IO layers | ||
144 | (e.g. filesystem) it is strongly suggested that consistency checks | ||
145 | (e.g. fsck) be performed on those layers when repair of the pool is | ||
146 | required. | ||
147 | |||
119 | Thin provisioning | 148 | Thin provisioning |
120 | ----------------- | 149 | ----------------- |
121 | 150 | ||
@@ -258,10 +287,9 @@ ii) Status | |||
258 | should register for the event and then check the target's status. | 287 | should register for the event and then check the target's status. |
259 | 288 | ||
260 | held metadata root: | 289 | held metadata root: |
261 | The location, in sectors, of the metadata root that has been | 290 | The location, in blocks, of the metadata root that has been |
262 | 'held' for userspace read access. '-' indicates there is no | 291 | 'held' for userspace read access. '-' indicates there is no |
263 | held root. This feature is not yet implemented so '-' is | 292 | held root. |
264 | always returned. | ||
265 | 293 | ||
266 | discard_passdown|no_discard_passdown | 294 | discard_passdown|no_discard_passdown |
267 | Whether or not discards are actually being passed down to the | 295 | Whether or not discards are actually being passed down to the |