1. 11 2月, 2009 1 次提交
  2. 08 1月, 2009 1 次提交
  3. 03 1月, 2009 1 次提交
  4. 30 12月, 2008 2 次提交
  5. 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
  6. 04 10月, 2008 2 次提交
  7. 29 8月, 2008 1 次提交
  8. 27 7月, 2008 2 次提交
  9. 12 7月, 2008 1 次提交
  10. 29 4月, 2008 1 次提交
  11. 23 4月, 2008 2 次提交
  12. 04 3月, 2008 2 次提交
  13. 24 1月, 2008 1 次提交
  14. 12 1月, 2008 2 次提交
  15. 04 11月, 2007 1 次提交
  16. 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
  17. 15 7月, 2007 1 次提交
  18. 20 6月, 2007 1 次提交
  19. 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
  20. 21 3月, 2007 1 次提交
  21. 18 2月, 2007 1 次提交
  22. 17 2月, 2007 2 次提交
  23. 27 1月, 2007 1 次提交
  24. 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
  25. 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
  26. 04 1月, 2007 1 次提交
    • M
      [SCSI] Add missing completion to scsi_complete_async_scans() · 8bcc2412
      Matthew Wilcox 提交于
      If either scsi_complete_async_scans() is called a second time
      before the first call has finished, or a host scan is started while
      scsi_complete_async_scans() is still sleeping, it would fail to wake up
      the other task, which would sleep forever.
      
      I've changed the kernel-doc to make it clear that
      scsi_complete_async_scans() only guarantees that scans which started
      before it was called are guaranteed to have finished when it returns.
      I considered making it wait until all scans are completed, but it can't
      guarantee that no more scans will start before it returns anyway, and it
      runs the risk of confusing other callers of scsi_complete_async_scans()
      for hosts actually scanning.
      Signed-off-by: NMatthew Wilcox <matthew@wil.cx>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      8bcc2412
  27. 23 11月, 2006 3 次提交
  28. 22 11月, 2006 1 次提交
    • D
      WorkStruct: Pass the work_struct pointer instead of context data · 65f27f38
      David Howells 提交于
      Pass the work_struct pointer to the work function rather than context data.
      The work function can use container_of() to work out the data.
      
      For the cases where the container of the work_struct may go away the moment the
      pending bit is cleared, it is made possible to defer the release of the
      structure by deferring the clearing of the pending bit.
      
      To make this work, an extra flag is introduced into the management side of the
      work_struct.  This governs auto-release of the structure upon execution.
      
      Ordinarily, the work queue executor would release the work_struct for further
      scheduling or deallocation by clearing the pending bit prior to jumping to the
      work function.  This means that, unless the driver makes some guarantee itself
      that the work_struct won't go away, the work function may not access anything
      else in the work_struct or its container lest they be deallocated..  This is a
      problem if the auxiliary data is taken away (as done by the last patch).
      
      However, if the pending bit is *not* cleared before jumping to the work
      function, then the work function *may* access the work_struct and its container
      with no problems.  But then the work function must itself release the
      work_struct by calling work_release().
      
      In most cases, automatic release is fine, so this is the default.  Special
      initiators exist for the non-auto-release case (ending in _NAR).
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      65f27f38
  29. 13 11月, 2006 1 次提交