1. 13 6月, 2017 8 次提交
  2. 19 5月, 2017 1 次提交
  3. 09 5月, 2017 1 次提交
  4. 02 5月, 2017 1 次提交
  5. 27 4月, 2017 1 次提交
    • B
      scsi: Implement blk_mq_ops.show_rq() · 0eebd005
      Bart Van Assche 提交于
      Show the SCSI CDB for pending SCSI commands in
      /sys/kernel/debug/block/*/mq/*/dispatch and */rq_list. An example
      of how SCSI commands are displayed by this code:
      
      ffff8801703245c0 {.op=READ, .cmd_flags=META PRIO, .rq_flags=DONTPREP IO_STAT STATS, .tag=14, .internal_tag=-1, .cmd=Read(10) 28 00 2a 81 1b 30 00 00 08 00}
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Reviewed-by: NOmar Sandoval <osandov@fb.com>
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Hannes Reinecke <hare@suse.com>
      Cc: <linux-scsi@vger.kernel.org>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      0eebd005
  6. 21 4月, 2017 2 次提交
  7. 14 4月, 2017 1 次提交
  8. 08 4月, 2017 1 次提交
    • B
      scsi: Avoid that SCSI queues get stuck · 36e3cf27
      Bart Van Assche 提交于
      If a .queue_rq() function returns BLK_MQ_RQ_QUEUE_BUSY then the block
      driver that implements that function is responsible for rerunning the
      hardware queue once requests can be queued again successfully.
      
      commit 52d7f1b5 ("blk-mq: Avoid that requeueing starts stopped
      queues") removed the blk_mq_stop_hw_queue() call from scsi_queue_rq()
      for the BLK_MQ_RQ_QUEUE_BUSY case. Hence change all calls to functions
      that are intended to rerun a busy queue such that these examine all
      hardware queues instead of only stopped queues.
      
      Since no other functions than scsi_internal_device_block() and
      scsi_internal_device_unblock() should ever stop or restart a SCSI
      queue, change the blk_mq_delay_queue() call into a
      blk_mq_delay_run_hw_queue() call.
      
      Fixes: commit 52d7f1b5 ("blk-mq: Avoid that requeueing starts stopped queues")
      Fixes: commit 7e79dadc ("blk-mq: stop hardware queue in blk_mq_delay_queue()")
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagi@grimberg.me>
      Cc: Long Li <longli@microsoft.com>
      Cc: K. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      36e3cf27
  9. 07 4月, 2017 2 次提交
  10. 06 4月, 2017 1 次提交
  11. 31 3月, 2017 1 次提交
  12. 02 3月, 2017 1 次提交
    • B
      scsi: mpt3sas: Avoid sleeping in interrupt context · 8893cf6c
      Bart Van Assche 提交于
      Commit 669f0441 ("scsi: srp_transport: Move queuecommand() wait code
      to SCSI core") can make scsi_internal_device_block() sleep.  However,
      the mpt3sas driver can call this function from an interrupt
      handler. Hence add a second argument to scsi_internal_device_block()
      that restores the old behavior of this function for the mpt3sas handler.
      
      The call chain that triggered an "IRQ handler enabled interrupts"
      complaint is as follows:
      
      _base_interrupt()
      -> _base_async_event()
         -> mpt3sas_scsih_event_callback()
            -> _scsih_check_topo_delete_events()
               -> _scsih_block_io_to_children_attached_directly()
                  -> _scsih_block_io_device()
                     -> _scsih_internal_device_block()
                        -> scsi_internal_device_block()
      Reported-by: NOmar Sandoval <osandov@osandov.com>
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Omar Sandoval <osandov@osandov.com>
      Cc: Hannes Reinecke <hare@suse.com>
      Cc: Sagi Grimberg <sagi@grimberg.me>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Sathya Prakash <sathya.prakash@broadcom.com>
      Cc: Chaitra P B <chaitra.basappa@broadcom.com>
      Cc: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>
      Cc: Sreekanth Reddy <Sreekanth.Reddy@broadcom.com>
      Cc: <stable@vger.kernel.org> # v4.10+
      Tested-by: NOmar Sandoval <osandov@fb.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      8893cf6c
  13. 24 2月, 2017 2 次提交
  14. 23 2月, 2017 3 次提交
  15. 22 2月, 2017 1 次提交
  16. 20 2月, 2017 1 次提交
    • J
      scsi: don't BUG_ON() empty DMA transfers · fd3fc0b4
      Johannes Thumshirn 提交于
      Don't crash the machine just because of an empty transfer. Use WARN_ON()
      combined with returning an error.
      
      Found by Dmitry Vyukov and syzkaller.
      
      [ Changed to "WARN_ON_ONCE()". Al has a patch that should fix the root
        cause, but a BUG_ON() is not acceptable in any case, and a WARN_ON()
        might still be a cause of excessive log spamming.
      
        NOTE! If this warning ever triggers, we may end up leaking resources,
        since this doesn't bother to try to clean the command up. So this
        WARN_ON_ONCE() triggering does imply real problems. But BUG_ON() is
        much worse.
      
        People really need to stop using BUG_ON() for "this shouldn't ever
        happen". It makes pretty much any bug worse.     - Linus ]
      Signed-off-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Reported-by: NDmitry Vyukov <dvyukov@google.com>
      Cc: James Bottomley <jejb@linux.vnet.ibm.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fd3fc0b4
  17. 01 2月, 2017 2 次提交
  18. 28 1月, 2017 4 次提交
  19. 14 1月, 2017 1 次提交
  20. 21 12月, 2016 1 次提交
  21. 09 12月, 2016 1 次提交
    • C
      block: improve handling of the magic discard payload · f9d03f96
      Christoph Hellwig 提交于
      Instead of allocating a single unused biovec for discard requests, send
      them down without any payload.  Instead we allow the driver to add a
      "special" payload using a biovec embedded into struct request (unioned
      over other fields never used while in the driver), and overloading
      the number of segments for this case.
      
      This has a couple of advantages:
      
       - we don't have to allocate the bio_vec
       - the amount of special casing for discard requests in the block
         layer is significantly reduced
       - using this same scheme for other request types is trivial,
         which will be important for implementing the new WRITE_ZEROES
         op on devices where it actually requires a payload (e.g. SCSI)
       - we can get rid of playing games with the request length, as
         we'll never touch it and completions will work just fine
       - it will allow us to support ranged discard operations in the
         future by merging non-contiguous discard bios into a single
         request
       - last but not least it removes a lot of code
      
      This patch is the common base for my WIP series for ranges discards and to
      remove discard_zeroes_data in favor of always using REQ_OP_WRITE_ZEROES,
      so it would be good to get it in quickly.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      f9d03f96
  22. 30 11月, 2016 1 次提交
    • B
      scsi: srp_transport: Move queuecommand() wait code to SCSI core · 669f0441
      Bart Van Assche 提交于
      Additionally, rename srp_wait_for_queuecommand() into
      scsi_wait_for_queuecommand() and add a comment about the queuecommand()
      call from scsi_send_eh_cmnd().
      
      Note: this patch changes scsi_internal_device_block from a function that
      did not sleep into a function that may sleep. This is fine for all
      callers of this function:
      
      * scsi_internal_device_block() is called from the mpt3sas device while
        that driver holds the ioc->dm_cmds.mutex. This means that the mpt3sas
        driver calls this function from thread context.
      * scsi_target_block() is called by __iscsi_block_session() from
        kernel thread context and with IRQs enabled.
      * The SRP transport code also calls scsi_target_block() from kernel
        thread context while sleeping is allowed.
      * The snic driver also calls scsi_target_block() from a context from
        which sleeping is allowed. The scsi_target_block() call namely occurs
        immediately after a scsi_flush_work() call.
      
      [mkp: s/shost/sdev/]
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Reviewed-by: NSagi Grimberg <sagi@grimberg.me>
      Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Cc: James Bottomley <jejb@linux.vnet.ibm.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Doug Ledford <dledford@redhat.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      669f0441
  23. 16 11月, 2016 1 次提交
  24. 09 11月, 2016 1 次提交