Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe41c2c0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull device-mapper changes from Mike Snitzer:
 "A lot of attention was paid to improving the thin-provisioning
  target's handling of metadata operation failures and running out of
  space.  A new 'error_if_no_space' feature was added to allow users to
  error IOs rather than queue them when either the data or metadata
  space is exhausted.

  Additional fixes/features include:
   - a few fixes to properly support thin metadata device resizing
   - a solution for reliably waiting for a DM device's embedded kobject
     to be released before destroying the device
   - old dm-snapshot is updated to use the dm-bufio interface to take
     advantage of readahead capabilities that improve snapshot
     activation
   - new dm-cache target tunables to control how quickly data is
     promoted to the cache (fast) device
   - improved write efficiency of cluster mirror target by combining
     userspace flush and mark requests"

* tag 'dm-3.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (35 commits)
  dm log userspace: allow mark requests to piggyback on flush requests
  dm space map metadata: fix bug in resizing of thin metadata
  dm cache: add policy name to status output
  dm thin: fix pool feature parsing
  dm sysfs: fix a module unload race
  dm snapshot: use dm-bufio prefetch
  dm snapshot: use dm-bufio
  dm snapshot: prepare for switch to using dm-bufio
  dm snapshot: use GFP_KERNEL when initializing exceptions
  dm cache: add block sizes and total cache blocks to status output
  dm btree: add dm_btree_find_lowest_key
  dm space map metadata: fix extending the space map
  dm space map common: make sure new space is used during extend
  dm: wait until embedded kobject is released before destroying a device
  dm: remove pointless kobject comparison in dm_get_from_kobject
  dm snapshot: call destroy_work_on_stack() to pair with INIT_WORK_ONSTACK()
  dm cache policy mq: introduce three promotion threshold tunables
  dm cache policy mq: use list_del_init instead of list_del + INIT_LIST_HEAD
  dm thin: fix set_pool_mode exposed pool operation races
  dm thin: eliminate the no_free_space flag
  ...
parents 194e57fd 5066a4df
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -40,8 +40,11 @@ on hit count on entry. The policy aims to take different cache miss
costs into account and to adjust to varying load patterns automatically.

Message and constructor argument pairs are:
	'sequential_threshold <#nr_sequential_ios>' and
	'random_threshold <#nr_random_ios>'.
	'sequential_threshold <#nr_sequential_ios>'
	'random_threshold <#nr_random_ios>'
	'read_promote_adjustment <value>'
	'write_promote_adjustment <value>'
	'discard_promote_adjustment <value>'

The sequential threshold indicates the number of contiguous I/Os
required 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
contiguous I/Os to try to spot when the io is in one of these sequential
modes.

Internally the mq policy maintains a promotion threshold variable.  If
the hit count of a block not in the cache goes above this threshold it
gets promoted to the cache.  The read, write and discard promote adjustment
tunables allow you to tweak the promotion threshold by adding a small
value based on the io type.  They default to 4, 8 and 1 respectively.
If you're trying to quickly warm a new cache device you may wish to
reduce these to encourage promotion.  Remember to switch them back to
their defaults after the cache fills though.

cleaner
-------

+29 −22
Original line number Diff line number Diff line
@@ -217,13 +217,20 @@ the characteristics of a specific policy, always request it by name.
Status
------

<#used metadata blocks>/<#total metadata blocks> <#read hits> <#read misses>
<#write hits> <#write misses> <#demotions> <#promotions> <#blocks in cache>
<#dirty> <#features> <features>* <#core args> <core args>* <#policy args>
<policy args>*

<metadata block size> <#used metadata blocks>/<#total metadata blocks>
<cache block size> <#used cache blocks>/<#total cache blocks>
<#read hits> <#read misses> <#write hits> <#write misses>
<#demotions> <#promotions> <#dirty> <#features> <features>*
<#core args> <core args>* <policy name> <#policy args> <policy args>*

metadata block size	 : Fixed block size for each metadata block in
			     sectors
#used metadata blocks	 : Number of metadata blocks used
#total metadata blocks	 : Total number of metadata blocks
cache block size	 : Configurable block size for the cache device
			     in sectors
#used cache blocks	 : Number of blocks resident in the cache
#total cache blocks	 : Total number of cache blocks
#read hits		 : Number of times a READ bio has been mapped
			     to the cache
#read misses		 : Number of times a READ bio has been mapped
@@ -236,7 +243,6 @@ Status
			     from the cache
#promotions		 : Number of times a block has been moved to
			     the cache
#blocks in cache         : Number of blocks resident in the cache
#dirty			 : Number of blocks in the cache that differ
			     from the origin
#feature args		 : Number of feature args to follow
@@ -244,9 +250,10 @@ feature args : 'writethrough' (optional)
#core args		 : Number of core arguments (must be even)
core args		 : Key/value pairs for tuning the core
			     e.g. migration_threshold
policy name		 : Name of the policy
#policy args		 : Number of policy arguments to follow (must be even)
policy args		 : Key/value pairs
			     e.g. 'sequential_threshold 1024
			     e.g. sequential_threshold

Messages
--------
+7 −0
Original line number Diff line number Diff line
@@ -235,6 +235,8 @@ i) Constructor
      read_only: Don't allow any changes to be made to the pool
		 metadata.

      error_if_no_space: Error IOs, instead of queueing, if no space.

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

@@ -276,6 +278,11 @@ ii) Status
	contain the string 'Fail'.  The userspace recovery tools
	should then be used.

    error_if_no_space|queue_if_no_space
	If the pool runs out of data or metadata space, the pool will
	either queue or error the IO destined to the data device.  The
	default is to queue the IO until more space is added.

iii) Messages

    create_thin <dev id>
+8 −3
Original line number Diff line number Diff line
@@ -176,8 +176,12 @@ config MD_FAULTY

source "drivers/md/bcache/Kconfig"

config BLK_DEV_DM_BUILTIN
	boolean

config BLK_DEV_DM
	tristate "Device mapper support"
	select BLK_DEV_DM_BUILTIN
	---help---
	  Device-mapper is a low level volume manager.  It works by allowing
	  people to specify mappings for ranges of logical sectors.  Various
@@ -238,6 +242,7 @@ config DM_CRYPT
config DM_SNAPSHOT
       tristate "Snapshot target"
       depends on BLK_DEV_DM
       select DM_BUFIO
       ---help---
         Allow volume managers to take writable snapshots of a device.

@@ -250,12 +255,12 @@ config DM_THIN_PROVISIONING
         Provides thin provisioning and snapshots that share a data store.

config DM_DEBUG_BLOCK_STACK_TRACING
	boolean "Keep stack trace of thin provisioning block lock holders"
	depends on STACKTRACE_SUPPORT && DM_THIN_PROVISIONING
	boolean "Keep stack trace of persistent data block lock holders"
	depends on STACKTRACE_SUPPORT && DM_PERSISTENT_DATA
	select STACKTRACE
	---help---
	  Enable this for messages that may help debug problems with the
	  block manager locking used by thin provisioning.
	  block manager locking used by thin provisioning and caching.

	  If unsure, say N.

+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ obj-$(CONFIG_MD_FAULTY) += faulty.o
obj-$(CONFIG_BCACHE)		+= bcache/
obj-$(CONFIG_BLK_DEV_MD)	+= md-mod.o
obj-$(CONFIG_BLK_DEV_DM)	+= dm-mod.o
obj-$(CONFIG_BLK_DEV_DM_BUILTIN) += dm-builtin.o
obj-$(CONFIG_DM_BUFIO)		+= dm-bufio.o
obj-$(CONFIG_DM_BIO_PRISON)	+= dm-bio-prison.o
obj-$(CONFIG_DM_CRYPT)		+= dm-crypt.o
Loading