1. 17 9月, 2014 3 次提交
  2. 26 7月, 2014 1 次提交
    • D
      scsi_debug: support scsi-mq, queues and locks · cbf67842
      Douglas Gilbert 提交于
       - add host_lock option whose default value is 0 which removes the
         host_lock around all queued commands
       - accept delay=-1 (_hi_) or -2 which use a tasklet to invoke
         the scsi_done callback into the mid-layer. The default
         is still delay=1 which uses a timer to delay 1 jiffy
       - wire .change_queue_depth and .change_queue_type
         functions to better simulate queueing in a modern LLD
       - add SCSI_DEBUG_OPT_Q_NOISE (0x200) mask to only produce
         debug output associated with queue full, plus from
         .change_queue_depth and .change_queue_type functions
       - add SCSI_DEBUG_OPT_ALL_TSF (0x400) mask which reports
         all queued_arr fulls at TASK_SET_FULL, otherwise
         SCSI_MLQUEUE_HOST_BUSY is returned
       - add SCSI_DEBUG_OPT_RARE_TSF (0x800) mask which works
         together with the every_nth option (> 0) to count
         occurrences of num_in_q==queue_depth. When every_nth
         is reached the victim (a command) yields TASK SET FULL
       - clean up many debug messages.
       - add ndelay=<nanosecs> option that uses high resolution
         timers; active if > 0 and then overrides delay= option
       - expand Unit Attention handling: POR, BUS_RESET and
         MODE PARAMETERS CHANGED
       - support .eh_target_reset_handler and drop .bios_param
       - add OPT_N_WCE mask so caching page yields WCE=0
       - add OPT_RESET_NOISE mask to log aborts and resets
       - add OPT_NO_CDB_NOISE mask to not log each cdb
       - MODE SELECT support for changing caching page's WCE
       - name common ioctls in log
       - when fake_rw=1, do not vmalloc fake store; make
         UNMAP and WRITE SAME obey fake_rw
       - more logging and code improvements including better
         sense buffer handling
      
      With fio and four (pseudo) devices I have observed 1.2 M IOPS
      on my equipment. Rob Elliott who has done much testing and made
      numerous suggestions, has better IOPS results than mine.
      Signed-off-by: NDouglas Gilbert <dgilbert@interlog.com>
      Reviewed-by: NRobert Elliott <elliott@hp.com>
      Tested-by: NRobert Elliott <elliott@hp.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      cbf67842
  3. 18 7月, 2014 2 次提交
  4. 20 5月, 2014 1 次提交
  5. 20 3月, 2014 7 次提交
  6. 17 12月, 2013 1 次提交
  7. 25 10月, 2013 5 次提交
  8. 03 9月, 2013 2 次提交
  9. 10 7月, 2013 1 次提交
    • A
      scsi_debug: fix do_device_access() with wrap around range · a4517511
      Akinobu Mita 提交于
      do_device_access() is a function that abstracts copying SG list from/to
      ramdisk storage (fake_storep).
      
      It must deal with the ranges exceeding actual fake_storep size, because
      such ranges are valid if virtual_gb is set greater than zero, and they
      should be treated as fake_storep is repeatedly mirrored up to virtual
      size.
      
      Unfortunately, it can't deal with the range which wraps around the end of
      fake_storep.  A wrap around range is copied by two
      sg_copy_{from,to}_buffer() calls, but sg_copy_{from,to}_buffer() can't
      copy from/to in the middle of SG list, therefore the second call can't
      copy correctly.
      
      This fixes it by using sg_pcopy_{from,to}_buffer() that can copy from/to
      the middle of SG list.
      
      This also simplifies the assignment of sdb->resid in
      fill_from_dev_buffer().  Because fill_from_dev_buffer() is now only called
      once per command execution cycle.  So it is not necessary to take care to
      decrease sdb->resid if fill_from_dev_buffer() is called more than once.
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
      Cc: Douglas Gilbert <dgilbert@interlog.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Horia Geanta <horia.geanta@freescale.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a4517511
  10. 09 7月, 2013 6 次提交
  11. 03 5月, 2013 4 次提交
  12. 10 4月, 2013 1 次提交
  13. 09 10月, 2012 1 次提交
  14. 24 9月, 2012 1 次提交
  15. 27 3月, 2012 2 次提交
  16. 20 3月, 2012 1 次提交
  17. 20 2月, 2012 1 次提交
    • M
      [SCSI] Handle disk devices which can not process medium access commands · 18a4d0a2
      Martin K. Petersen 提交于
      We have experienced several devices which fail in a fashion we do not
      currently handle gracefully in SCSI. After a failure these devices will
      respond to the SCSI primary command set (INQUIRY, TEST UNIT READY, etc.)
      but any command accessing the storage medium will time out.
      
      The following patch adds an callback that can be used by upper level
      drivers to inspect the results of an error handling command. This in
      turn has been used to implement additional checking in the SCSI disk
      driver.
      
      If a medium access command fails twice but TEST UNIT READY succeeds both
      times in the subsequent error handling we will offline the device. The
      maximum number of failed commands required to take a device offline can
      be tweaked in sysfs.
      
      Also add a new error flag to scsi_debug which allows this scenario to be
      easily reproduced.
      
      [jejb: fix up integer parsing to use kstrtouint]
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      18a4d0a2