1. 05 12月, 2009 1 次提交
    • V
      [SCSI] add queue_depth ramp up code · 4a84067d
      Vasu Dev 提交于
      Current FC HBA queue_depth ramp up code depends on last queue
      full time. The sdev already  has last_queue_full_time field to
      track last queue full time but stored value is truncated by
      last four bits.
      
      So this patch updates last_queue_full_time without truncating
      last 4 bits to store full value and then updates its only
      current usages in scsi_track_queue_full to ignore last four bits
      to keep current usages same while also use this field
      in added ramp up code.
      
      Adds scsi_handle_queue_ramp_up to ramp up queue_depth on
      successful completion of IO. The scsi_handle_queue_ramp_up will
      do ramp up on all luns of a target, just same as ramp down done
      on all luns on a target.
      
      The ramp up is skipped in case the change_queue_depth is not
      supported by LLD or already reached to added max_queue_depth.
      
      Updates added max_queue_depth on every new update to default
      queue_depth value.
      
      The ramp up is also skipped if lapsed time since either last
      queue ramp up or down is less than LLD specified
      queue_ramp_up_period.
      
      Adds queue_ramp_up_period to sysfs but only if change_queue_depth
      is supported since ramp up and queue_ramp_up_period is needed only
      in case change_queue_depth is supported first.
      
      Initializes queue_ramp_up_period to 120HZ jiffies as initial
      default value, it is same as used in existing lpfc and qla2xxx.
      
      -v2
       Combined all ramp code into this single patch.
      
      -v3
       Moves max_queue_depth initialization after slave_configure is
      called from after slave_alloc calling done. Also adjusted
      max_queue_depth check to skip ramp up if current queue_depth
      is >= max_queue_depth.
      
      -v4
       Changes sdev->queue_ramp_up_period unit to ms when using sysfs i/f
      to store or show its value.
      Signed-off-by: NVasu Dev <vasu.dev@intel.com>
      Tested-by: NChristof Schmitt <christof.schmitt@de.ibm.com>
      Tested-by: NGiridhar Malavali <giridhar.malavali@qlogic.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      4a84067d
  2. 14 10月, 2009 1 次提交
    • J
      [SCSI] fix memory leak in initialization · 37e6ba00
      James Bottomley 提交于
      The root cause of the problem is the fact that dev_set_name() now
      allocates storage instead of using the original array within the kobj.
      That means that the SCSI assumption that if you haven't made the
      containing object or any sub objects visible, you can just destroy it
      (and its component devices) lock stock and barrel becomes false.
      
      Fix this by doing the get of sdev_dev at parent time and thus do an
      extra put of it in scsi_destroy_sdev() (and all other destruction
      without add paths).
      Reported-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      37e6ba00
  3. 21 5月, 2009 1 次提交
  4. 15 5月, 2009 1 次提交
  5. 22 4月, 2009 1 次提交
    • A
      driver synchronization: make scsi_wait_scan more advanced · d4d5291c
      Arjan van de Ven 提交于
      There is currently only one way for userspace to say "wait for my storage
      device to get ready for the modules I just loaded": to load the
      scsi_wait_scan module. Expectations of userspace are that once this
      module is loaded, all the (storage) devices for which the drivers
      were loaded before the module load are present.
      
      Now, there are some issues with the implementation, and the async
      stuff got caught in the middle of this: The existing code only
      waits for the scsy async probing to finish, but it did not take
      into account at all that probing might not have begun yet.
      (Russell ran into this problem on his computer and the fix works for him)
      
      This patch fixes this more thoroughly than the previous "fix", which
      had some bad side effects (namely, for kernel code that wanted to wait for
      the scsi scan it would also do an async sync, which would deadlock if you did
      it from async context already.. there's a report about that on lkml):
      The patch makes the module first wait for all device driver probes, and then it
      will wait for the scsi parallel scan to finish.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Tested-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d4d5291c
  6. 13 3月, 2009 1 次提交
  7. 11 2月, 2009 1 次提交
  8. 08 1月, 2009 1 次提交
  9. 03 1月, 2009 1 次提交
  10. 30 12月, 2008 2 次提交
  11. 13 10月, 2008 1 次提交
    • M
      [SCSI] Add helper code so transport classes/driver can control queueing (v3) · f0c0a376
      Mike Christie 提交于
      SCSI-ml manages the queueing limits for the device and host, but
      does not do so at the target level. However something something similar
      can come in userful when a driver is transitioning a transport object to
      the the blocked state, becuase at that time we do not want to queue
      io and we do not want the queuecommand to be called again.
      
      The patch adds code similar to the exisiting SCSI_ML_*BUSY handlers.
      You can now return SCSI_MLQUEUE_TARGET_BUSY when we hit
      a transport level queueing issue like the hw cannot allocate some
      resource at the iscsi session/connection level, or the target has temporarily
      closed or shrunk the queueing window, or if we are transitioning
      to the blocked state.
      
      bnx2i, when they rework their firmware according to netdev
      developers requests, will also need to be able to limit queueing at this
      level. bnx2i will hook into libiscsi, but will allocate a scsi host per
      netdevice/hba, so unlike pure software iscsi/iser which is allocating
      a host per session, it cannot set the scsi_host->can_queue and return
      SCSI_MLQUEUE_HOST_BUSY to reflect queueing limits on the transport.
      
      The iscsi class/driver can also set a scsi_target->can_queue value which
      reflects the max commands the driver/class can support. For iscsi this
      reflects the number of commands we can support for each session due to
      session/connection hw limits, driver limits, and to also reflect the
      session/targets's queueing window.
      
      Changes:
      v1 - initial patch.
      v2 - Fix scsi_run_queue handling of multiple blocked targets.
      Previously we would break from the main loop if a device was added back on
      the starved list. We now run over the list and check if any target is
      blocked.
      v3 - Rediff for scsi-misc.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      f0c0a376
  12. 04 10月, 2008 2 次提交
  13. 29 8月, 2008 1 次提交
  14. 27 7月, 2008 2 次提交
  15. 12 7月, 2008 1 次提交
  16. 29 4月, 2008 1 次提交
  17. 23 4月, 2008 2 次提交
  18. 04 3月, 2008 2 次提交
  19. 24 1月, 2008 1 次提交
  20. 12 1月, 2008 2 次提交
  21. 04 11月, 2007 1 次提交
  22. 13 10月, 2007 3 次提交
    • M
      [SCSI] scsi_scan: Cope with kthread_run failing · a57b1fcc
      Matthew Wilcox 提交于
      If kthread_run failed, we would fail to scan the host, and leak the
      allocated async_scan_data.  Since using a separate thread is just an
      optimisation, do the scan synchronously if we fail to spawn a thread.
      Signed-off-by: NMatthew Wilcox <matthew@wil.cx>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      a57b1fcc
    • M
      [SCSI] Fix signness of parameters in scsi module · 10f4b89a
      Masatake YAMATO 提交于
      In scsi module I've found some inconsistency between variable type
      used in module_param_named and type passed to module_param_named as an
      argument. Especially the inconsistency of `max_scsi_luns' parameter is
      a bit serious because the description text says "last scsi LUN (should
      be between 1 and 2^32-1)".
      Signed-off-by: NMasatake YAMATO <jet@gyve.org>
      Acked-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      10f4b89a
    • M
      [SCSI] Fix async scanning double-add problems · 6b7f123f
      Matthew Wilcox 提交于
      Stress-testing and some thought has revealed some places where
      asynchronous scanning needs some more attention to locking.
      
       - Since async_scan is a bit, we need to hold the host_lock while
         modifying it to prevent races against other CPUs modifying the word
         that bit is in.  This is probably a theoretical race for the moment,
         but other patches may change that.
       - The async_scan bit means not only that this host is being scanned
         asynchronously, but that all the devices attached to this host are not
         yet added to sysfs.  So we must ensure that this bit is always in sync.
         I've chosen to do this with the scan_mutex since it's already acquired
         in most of the right places.
       - If the host changes state to deleted while we're in the middle of
         a scan, we'll end up with some devices on the host's list which must
         be deleted.  Add a check to scsi_sysfs_add_devices() to ensure the
         host is still running.
       - To avoid the async_scan bit being protected by three locks, the
         async_scan_lock now only protects the scanning_list.
      Signed-off-by: NMatthew Wilcox <matthew@wil.cx>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      6b7f123f
  23. 15 7月, 2007 1 次提交
  24. 20 6月, 2007 1 次提交
  25. 30 5月, 2007 1 次提交
    • H
      [SCSI] fix CONFIG_SCSI_WAIT_SCAN=m · f2f027c6
      Hugh Dickins 提交于
      CONFIG_MODULES=y
      CONFIG_SCSI=y
      CONFIG_SCSI_SCAN_ASYNC=y
      CONFIG_SCSI_WAIT_SCAN=m
      
      2.6.21-rc5-mm2 VFS panics unable to find my root on /dev/sda2, but boots
      okay if I change drivers/scsi/Kconfig to "default y" instead of "default m"
      for SCSI_WAIT_SCAN.
      
      Make sure there's a late_initcall to scsi_complete_async_scans when it's
      built in, so a monolithic SCSI_SCAN_ASYNC kernel can rely on the scans
      being completed before trying to mount root, even if they're slow.
      
      [akpm@linux-foundation.org: build fixes]
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Acked-by: NMatthew Wilcox <matthew@wil.cx>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      f2f027c6
  26. 21 3月, 2007 1 次提交
  27. 18 2月, 2007 1 次提交
  28. 17 2月, 2007 2 次提交
  29. 27 1月, 2007 1 次提交
  30. 14 1月, 2007 1 次提交
    • K
      [SCSI] scsi_scan message cosmetic error · 3424a65d
      Kurt Garloff 提交于
      Hi,
      
      Minor typo ...
      In my first iteration of patches (that got merged), the
      BLIST_ATTACH_PQ3 actually had the value 0x800000, but that
      got changed later to avoid conflicts. This piece must have
      been overlooked.
      You could obviously do something like %x and then add the
      bitflags, but that looks overkill for something that does
      not tend to change.
      
      Please merge.
      (Patch applied against latest 2.6.20rc version that I tested.)
      
      From: Kurt Garloff <kurt@garloff.de>
      Subject: [SCSI SCAN] Fix logging message for PQ3 devices
      
      The blacklist flags BLIST_ATTACH_PQ3 has value 0x1000000,
      not 0x800000.
      Signed-off-by: NKurt Garloff <garloff@suse.de>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      3424a65d
  31. 06 1月, 2007 1 次提交
    • J
      [SCSI] scsi_scan: fix report lun problems with CDROM or RBC devices · ddaf6fc8
      James Bottomley 提交于
      Apparently no ATAPI CD/DVD actually supports REPORT LUNS (in spite of
      claiming scsi-3 compliance, where it's mandatory) and worse, some
      crash or flake out on being sent the command.  This may actually be
      due to a conflict between SPC and MMC with MMC not listing REPORT LUNS
      as mandatory.  The same standards conflict exists for RBC as well.
      
      Fix all of this by reversing the blacklists for CDROM and RBC devices
      (i.e. now they have to have the BLIST_REPORTLUNS2 flag set even if the
      inquiry data returns scsi-3 compliance).
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      ddaf6fc8