1. 30 Jan, 2018 1 commit
  2. 29 Jan, 2018 6 commits
    • Khazhismel Kumykov's avatar
      dm mpath selector: more evenly distribute ties · f2042605
      Khazhismel Kumykov authored
      Move the last used path to the end of the list (least preferred) so that
      ties are more evenly distributed.
      
      For example, in case with three paths with one that is slower than
      others, the remaining two would be unevenly used if they tie. This is
      due to the rotation not being a truely fair distribution.
      
      Illustrated: paths a, b, c, 'c' has 1 outstanding IO, a and b are 'tied'
      Three possible rotations:
      (a, b, c) -> best path 'a'
      (b, c, a) -> best path 'b'
      (c, a, b) -> best path 'a'
      (a, b, c) -> best path 'a'
      (b, c, a) -> best path 'b'
      (c, a, b) -> best path 'a'
      ...
      
      So 'a' is used 2x more than 'b', although they should be used evenly.
      
      With this change, the most recently used path is always the least
      preferred, removing this bias resulting in even distribution.
      (a, b, c) -> best path 'a'
      (b, c, a) -> best path 'b'
      (c, a, b) -> best path 'a'
      (c, b, a) -> best path 'b'
      ...
      Signed-off-by: default avatarKhazhismel Kumykov <khazhy@google.com>
      Reviewed-by: default avatarMartin Wilck <mwilck@suse.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      f2042605
    • Scott Bauer's avatar
      dm unstripe: fix target length versus number of stripes size check · cc656619
      Scott Bauer authored
      Since the unstripe target takes a target length which is the
      size of *one* striped member we're trying to expose, not the
      total size of *all* the striped members, the check does not
      make sense and fails for some striped setups.
      
      For example, say we have a 4TB striped device:
      or 3907018496 sectors per underlying device:
      
      if (sector_div(width, uc->stripes)) :
         3907018496 / 2(num stripes)  == 1953509248
      
      tmp_len = width;
      if (sector_div(tmp_len, uc->chunk_size)) :
         1953509248 / 256(chunk size) == 7630895.5
         (fails)
      
      Fix this by removing the first check which isn't valid for unstriping.
      Signed-off-by: default avatarScott Bauer <scott.bauer@intel.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      cc656619
    • Luis de Bethencourt's avatar
      dm thin: fix trailing semicolon in __remap_and_issue_shared_cell · bd6d1e0a
      Luis de Bethencourt authored
      The trailing semicolon is an empty statement that does no operation.
      Removing it since it doesn't do anything.
      Signed-off-by: default avatarLuis de Bethencourt <luisbg@kernel.org>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      bd6d1e0a
    • Mike Snitzer's avatar
      dm table: fix NVMe bio-based dm_table_determine_type() validation · eaa160ed
      Mike Snitzer authored
      The 'verify_rq_based:' code in dm_table_determine_type() was checking
      all devices in the DM table rather than only checking the data devices.
      Fix this by using the immutable target's iterate_devices method.
      
      Also, tweak the block of dm_table_determine_type() code that decides
      whether to upgrade from DM_TYPE_BIO_BASED to DM_TYPE_NVME_BIO_BASED so
      that it makes sure the immutable_target doesn't support require
      splitting IOs.
      
      These changes have been verified to allow a "thin-pool" target whose
      data device is an NVMe device to be upgraded to DM_TYPE_NVME_BIO_BASED.
      Using the thin-pool in NVMe bio-based mode was verified to pass all the
      device-mapper-test-suite's "thin-provisioning" tests.
      
      Also verified that request-based DM multipath (with queue_mode "rq" and
      "mq") works as expected using the 'mptest' harness.
      
      Fixes: 22c11858 ("dm: introduce DM_TYPE_NVME_BIO_BASED")
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      eaa160ed
    • Mike Snitzer's avatar
      dm: various cleanups to md->queue initialization code · c12c9a3c
      Mike Snitzer authored
      Also, add dm_sysfs_init() error handling to dm_create().
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      c12c9a3c
    • Mike Snitzer's avatar
      dm mpath: delay the retry of a request if the target responded as busy · ac514ffc
      Mike Snitzer authored
      Add DM_ENDIO_DELAY_REQUEUE to allow request-based multipath's
      multipath_end_io() to instruct dm-rq.c:dm_done() to delay a requeue.
      This is beneficial to do if BLK_STS_RESOURCE is returned from the target
      (because target is busy).
      
      Relative to blk-mq: kick the hw queues via blk_mq_requeue_work(),
      indirectly from dm-rq.c:__dm_mq_kick_requeue_list(), after a delay.
      
      For old .request_fn: use blk_delay_queue().
      
      bio-based multipath doesn't have feature parity with request-based for
      retryable error requeues; that is something that'll need fixing in the
      future.
      Suggested-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Acked-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
      [as interpreted from Bart's "... patch looks fine to me."]
      ac514ffc
  3. 17 Jan, 2018 21 commits
  4. 06 Jan, 2018 2 commits
  5. 05 Jan, 2018 1 commit
    • Mike Snitzer's avatar
      dm mpath: implement NVMe bio-based support · cd025384
      Mike Snitzer authored
      This DM multipath NVMe bio-based support requires CONFIG_NVME_MULTIPATH
      to not be set.  In the future hopefully NVMe multipath and DM multipath
      can co-exist more seemlessly.  But as is, if CONFIG_NVME_MULTIPATH=Y
      then all the individal NVMe paths will remain hidden to upper layers and
      as such DM multipath will not be able to manage them.
      
      Though NVMe's native multipathing doesn't multipath namespaces across
      subsystems; so technically a user _could_ use CONFIG_NVME_MULTIPATH=Y
      and also use DM multipath to multipath across subsystems.
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      cd025384
  6. 03 Jan, 2018 1 commit
  7. 20 Dec, 2017 5 commits
  8. 17 Dec, 2017 3 commits