Skip to content

Commit

Permalink
Merge tag 'dm-3.6-changes' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/agk/linux-dm

Pull device-mapper updates from Alasdair G Kergon:
- Flip the thin target into new read-only or failed modes if errors
  are detected;
- Handle chunk sizes that are not powers of two in the snapshot and
  thin targets;
- Provide a way for userspace to avoid replacing an already-loaded
  multipath hardware handler while booting;
- Reduce dm_thin_endio_hook slab size to avoid allocation failures;
- Numerous small changes and cleanups to the code.

* tag 'dm-3.6-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm: (63 commits)
  dm thin: commit before gathering status
  dm thin: add read only and fail io modes
  dm thin metadata: introduce dm_pool_abort_metadata
  dm thin metadata: introduce dm_pool_metadata_set_read_only
  dm persistent data: introduce dm_bm_set_read_only
  dm thin: reduce number of metadata commits
  dm thin metadata: add dm_thin_changed_this_transaction
  dm thin metadata: add format option to dm_pool_metadata_open
  dm thin metadata: tidy up open and format error paths
  dm thin metadata: only check incompat features on open
  dm thin metadata: remove duplicate pmd initialisation
  dm thin metadata: remove create parameter from __create_persistent_data_objects
  dm thin metadata: move __superblock_all_zeroes to __open_or_format_metadata
  dm thin metadata: remove nr_blocks arg from __create_persistent_data_objects
  dm thin metadata: split __open or format metadata
  dm thin metadata: use struct dm_pool_metadata members in __open_or_format_metadata
  dm thin metadata: zero unused superblock uuid
  dm thin metadata: lift __begin_transaction out of __write_initial_superblock
  dm thin metadata: move dm_commit_pool_metadata into __write_initial_superblock
  dm thin metadata: factor out __write_initial_superblock
  ...
  • Loading branch information
Linus Torvalds committed Jul 30, 2012
2 parents 6f51f51 + 1f4e0ff commit 7272c30
Show file tree
Hide file tree
Showing 33 changed files with 1,373 additions and 1,315 deletions.
7 changes: 3 additions & 4 deletions Documentation/device-mapper/striped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ devices in parallel.

Parameters: <num devs> <chunk size> [<dev path> <offset>]+
<num devs>: Number of underlying devices.
<chunk size>: Size of each chunk of data. Must be a power-of-2 and at
least as large as the system's PAGE_SIZE.
<chunk size>: Size of each chunk of data. Must be at least as
large as the system's PAGE_SIZE.
<dev path>: Full pathname to the underlying block-device, or a
"major:minor" device-number.
<offset>: Starting sector within the device.

One or more underlying devices can be specified. The striped device size must
be a multiple of the chunk size and a multiple of the number of underlying
devices.
be a multiple of the chunk size multiplied by the number of underlying devices.


Example scripts
Expand Down
24 changes: 23 additions & 1 deletion Documentation/device-mapper/thin-provisioning.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ i) Constructor
no_discard_passdown: Don't pass discards down to the underlying
data device, but just remove the mapping.

read_only: Don't allow any changes to be made to the pool
metadata.

Data block size must be between 64KB (128 sectors) and 1GB
(2097152 sectors) inclusive.

Expand All @@ -239,7 +242,7 @@ ii) Status

<transaction id> <used metadata blocks>/<total metadata blocks>
<used data blocks>/<total data blocks> <held metadata root>

[no_]discard_passdown ro|rw

transaction id:
A 64-bit number used by userspace to help synchronise with metadata
Expand All @@ -257,6 +260,21 @@ ii) Status
held root. This feature is not yet implemented so '-' is
always returned.

discard_passdown|no_discard_passdown
Whether or not discards are actually being passed down to the
underlying device. When this is enabled when loading the table,
it can get disabled if the underlying device doesn't support it.

ro|rw
If the pool encounters certain types of device failures it will
drop into a read-only metadata mode in which no changes to
the pool metadata (like allocating new blocks) are permitted.

In serious cases where even a read-only mode is deemed unsafe
no further I/O will be permitted and the status will just
contain the string 'Fail'. The userspace recovery tools
should then be used.

iii) Messages

create_thin <dev id>
Expand Down Expand Up @@ -329,3 +347,7 @@ regain some space then send the 'trim' message to the pool.
ii) Status

<nr mapped sectors> <highest mapped sector>

If the pool has encountered device errors and failed, the status
will just contain the string 'Fail'. The userspace recovery
tools should then be used.
9 changes: 0 additions & 9 deletions drivers/md/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,6 @@ config DM_DEBUG_BLOCK_STACK_TRACING

If unsure, say N.

config DM_DEBUG_SPACE_MAPS
boolean "Extra validation for thin provisioning space maps"
depends on DM_THIN_PROVISIONING
---help---
Enable this for messages that may help debug problems with the
space maps used by thin provisioning.

If unsure, say N.

config DM_MIRROR
tristate "Mirror target"
depends on BLK_DEV_DM
Expand Down
Loading

0 comments on commit 7272c30

Please sign in to comment.