1. 30 1月, 2018 6 次提交
    • K
      dm mpath selector: more evenly distribute ties · f2042605
      Khazhismel Kumykov 提交于
      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: NKhazhismel Kumykov <khazhy@google.com>
      Reviewed-by: NMartin Wilck <mwilck@suse.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      f2042605
    • S
      dm unstripe: fix target length versus number of stripes size check · cc656619
      Scott Bauer 提交于
      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: NScott Bauer <scott.bauer@intel.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      cc656619
    • L
      dm thin: fix trailing semicolon in __remap_and_issue_shared_cell · bd6d1e0a
      Luis de Bethencourt 提交于
      The trailing semicolon is an empty statement that does no operation.
      Removing it since it doesn't do anything.
      Signed-off-by: NLuis de Bethencourt <luisbg@kernel.org>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      bd6d1e0a
    • M
      dm table: fix NVMe bio-based dm_table_determine_type() validation · eaa160ed
      Mike Snitzer 提交于
      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: NMike Snitzer <snitzer@redhat.com>
      eaa160ed
    • M
      dm: various cleanups to md->queue initialization code · c12c9a3c
      Mike Snitzer 提交于
      Also, add dm_sysfs_init() error handling to dm_create().
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      c12c9a3c
    • M
      dm mpath: delay the retry of a request if the target responded as busy · ac514ffc
      Mike Snitzer 提交于
      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: NBart Van Assche <bart.vanassche@wdc.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Acked-by: NBart Van Assche <bart.vanassche@wdc.com>
      [as interpreted from Bart's "... patch looks fine to me."]
      ac514ffc
  2. 28 1月, 2018 3 次提交
  3. 27 1月, 2018 2 次提交
  4. 26 1月, 2018 17 次提交
  5. 25 1月, 2018 12 次提交