1. 30 6月, 2011 1 次提交
  2. 25 2月, 2011 2 次提交
  3. 31 12月, 2010 1 次提交
  4. 22 12月, 2010 1 次提交
  5. 17 11月, 2010 1 次提交
    • J
      SCSI host lock push-down · f281233d
      Jeff Garzik 提交于
      Move the mid-layer's ->queuecommand() invocation from being locked
      with the host lock to being unlocked to facilitate speeding up the
      critical path for drivers who don't need this lock taken anyway.
      
      The patch below presents a simple SCSI host lock push-down as an
      equivalent transformation.  No locking or other behavior should change
      with this patch.  All existing bugs and locking orders are preserved.
      
      Additionally, add one parameter to queuecommand,
      	struct Scsi_Host *
      and remove one parameter from queuecommand,
      	void (*done)(struct scsi_cmnd *)
      
      Scsi_Host* is a convenient pointer that most host drivers need anyway,
      and 'done' is redundant to struct scsi_cmnd->scsi_done.
      
      Minimal code disturbance was attempted with this change.  Most drivers
      needed only two one-line modifications for their host lock push-down.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      Acked-by: NJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f281233d
  6. 03 3月, 2010 1 次提交
  7. 23 12月, 2009 1 次提交
    • S
      kfifo: move struct kfifo in place · 45465487
      Stefani Seibold 提交于
      This is a new generic kernel FIFO implementation.
      
      The current kernel fifo API is not very widely used, because it has to
      many constrains.  Only 17 files in the current 2.6.31-rc5 used it.
      FIFO's are like list's a very basic thing and a kfifo API which handles
      the most use case would save a lot of development time and memory
      resources.
      
      I think this are the reasons why kfifo is not in use:
      
       - The API is to simple, important functions are missing
       - A fifo can be only allocated dynamically
       - There is a requirement of a spinlock whether you need it or not
       - There is no support for data records inside a fifo
      
      So I decided to extend the kfifo in a more generic way without blowing up
      the API to much.  The new API has the following benefits:
      
       - Generic usage: For kernel internal use and/or device driver.
       - Provide an API for the most use case.
       - Slim API: The whole API provides 25 functions.
       - Linux style habit.
       - DECLARE_KFIFO, DEFINE_KFIFO and INIT_KFIFO Macros
       - Direct copy_to_user from the fifo and copy_from_user into the fifo.
       - The kfifo itself is an in place member of the using data structure, this save an
         indirection access and does not waste the kernel allocator.
       - Lockless access: if only one reader and one writer is active on the fifo,
         which is the common use case, no additional locking is necessary.
       - Remove spinlock - give the user the freedom of choice what kind of locking to use if
         one is required.
       - Ability to handle records. Three type of records are supported:
         - Variable length records between 0-255 bytes, with a record size
           field of 1 bytes.
         - Variable length records between 0-65535 bytes, with a record size
           field of 2 bytes.
         - Fixed size records, which no record size field.
       - Preserve memory resource.
       - Performance!
       - Easy to use!
      
      This patch:
      
      Since most users want to have the kfifo as part of another object,
      reorganize the code to allow including struct kfifo in another data
      structure.  This requires changing the kfifo_alloc and kfifo_init
      prototypes so that we pass an existing kfifo pointer into them.  This
      patch changes the implementation and all existing users.
      
      [akpm@linux-foundation.org: fix warning]
      Signed-off-by: NStefani Seibold <stefani@seibold.net>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Acked-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      Acked-by: NAndi Kleen <ak@linux.intel.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      45465487
  8. 05 12月, 2009 2 次提交
  9. 03 10月, 2009 1 次提交
  10. 12 9月, 2009 2 次提交
  11. 21 6月, 2009 1 次提交
  12. 24 5月, 2009 3 次提交
    • M
      [SCSI] libiscsi: add task aborted state · b3cd5050
      Mike Christie 提交于
      If a task did not complete normally due to a TMF, libiscsi will
      now complete the task with the state ISCSI_TASK_ABRT_TMF. Drivers
      like bnx2i that need to free resources if a command did not complete normally
      can then check the task state. If a driver does not need to send
      a special command if we have dropped the session then they can check
      for ISCSI_TASK_ABRT_SESS_RECOV.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      b3cd5050
    • M
      [SCSI] libiscsi: handle cleanup task races · 3bbaaad9
      Mike Christie 提交于
      bnx2i needs to send a hardware specific cleanup command if
      a command has not completed normally (iscsi/scsi response from
      target), and the session is still ok (this is the case when we
      send a TMF to stop the command).
      
      At this time it will need to drop the session lock. The problem
      with the current code is that fail_all_commands assumes we
      will hold the lock the entire time, so it uses list_for_each_entry_safe.
      If while bnx2i drops the session lock multiple cmds complete then
      list_for_each_entry_safe will not handle this correctly.
      
      This patch removes the running lists and just has us loop over
      the cmds array (in later patches we will then replace that
      array with a block tag map at the session level). It also fixes
      up the completion path so that if the TMF code and the normal recv
      path were completing the same command then they both do not try
      to do release the refcount taken when the task is queued.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      3bbaaad9
    • M
      [SCSI] libiscsi: export iscsi_itt_to_task for bnx2i · 8f9256ce
      Mike Christie 提交于
      bnx2i needs to be able to look up mgmt task like login and nop, because
      it does some processing of them on the completion path. This exports
      iscsi_itt_to_task so it can look up the task.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      8f9256ce
  13. 27 4月, 2009 1 次提交
  14. 14 3月, 2009 5 次提交
  15. 30 12月, 2008 2 次提交
  16. 13 10月, 2008 2 次提交
  17. 12 7月, 2008 12 次提交
  18. 30 4月, 2008 1 次提交