1. 01 10月, 2015 1 次提交
  2. 29 8月, 2015 1 次提交
  3. 26 8月, 2015 1 次提交
  4. 31 7月, 2015 2 次提交
  5. 09 4月, 2015 1 次提交
    • B
      Defer processing of REQ_PREEMPT requests for blocked devices · bba0bdd7
      Bart Van Assche 提交于
      SCSI transport drivers and SCSI LLDs block a SCSI device if the
      transport layer is not operational. This means that in this state
      no requests should be processed, even if the REQ_PREEMPT flag has
      been set. This patch avoids that a rescan shortly after a cable
      pull sporadically triggers the following kernel oops:
      
      BUG: unable to handle kernel paging request at ffffc9001a6bc084
      IP: [<ffffffffa04e08f2>] mlx4_ib_post_send+0xd2/0xb30 [mlx4_ib]
      Process rescan-scsi-bus (pid: 9241, threadinfo ffff88053484a000, task ffff880534aae100)
      Call Trace:
       [<ffffffffa0718135>] srp_post_send+0x65/0x70 [ib_srp]
       [<ffffffffa071b9df>] srp_queuecommand+0x1cf/0x3e0 [ib_srp]
       [<ffffffffa0001ff1>] scsi_dispatch_cmd+0x101/0x280 [scsi_mod]
       [<ffffffffa0009ad1>] scsi_request_fn+0x411/0x4d0 [scsi_mod]
       [<ffffffff81223b37>] __blk_run_queue+0x27/0x30
       [<ffffffff8122a8d2>] blk_execute_rq_nowait+0x82/0x110
       [<ffffffff8122a9c2>] blk_execute_rq+0x62/0xf0
       [<ffffffffa000b0e8>] scsi_execute+0xe8/0x190 [scsi_mod]
       [<ffffffffa000b2f3>] scsi_execute_req+0xa3/0x130 [scsi_mod]
       [<ffffffffa000c1aa>] scsi_probe_lun+0x17a/0x450 [scsi_mod]
       [<ffffffffa000ce86>] scsi_probe_and_add_lun+0x156/0x480 [scsi_mod]
       [<ffffffffa000dc2f>] __scsi_scan_target+0xdf/0x1f0 [scsi_mod]
       [<ffffffffa000dfa3>] scsi_scan_host_selected+0x183/0x1c0 [scsi_mod]
       [<ffffffffa000edfb>] scsi_scan+0xdb/0xe0 [scsi_mod]
       [<ffffffffa000ee13>] store_scan+0x13/0x20 [scsi_mod]
       [<ffffffff811c8d9b>] sysfs_write_file+0xcb/0x160
       [<ffffffff811589de>] vfs_write+0xce/0x140
       [<ffffffff81158b53>] sys_write+0x53/0xa0
       [<ffffffff81464592>] system_call_fastpath+0x16/0x1b
       [<00007f611c9d9300>] 0x7f611c9d92ff
      Reported-by: NMax Gurtuvoy <maxg@mellanox.com>
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Reviewed-by: NMike Christie <michaelc@cs.wisc.edu>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
      bba0bdd7
  6. 24 1月, 2015 1 次提交
    • S
      blk-mq: add tag allocation policy · 24391c0d
      Shaohua Li 提交于
      This is the blk-mq part to support tag allocation policy. The default
      allocation policy isn't changed (though it's not a strict FIFO). The new
      policy is round-robin for libata. But it's a try-best implementation. If
      multiple tasks are competing, the tags returned will be mixed (which is
      unavoidable even with !mq, as requests from different tasks can be
      mixed in queue)
      
      Cc: Jens Axboe <axboe@fb.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: NShaohua Li <shli@fb.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      24391c0d
  7. 20 1月, 2015 1 次提交
  8. 09 1月, 2015 1 次提交
  9. 15 12月, 2014 1 次提交
  10. 25 11月, 2014 3 次提交
  11. 12 11月, 2014 7 次提交
  12. 30 10月, 2014 1 次提交
    • J
      blk-mq: add a 'list' parameter to ->queue_rq() · 74c45052
      Jens Axboe 提交于
      Since we have the notion of a 'last' request in a chain, we can use
      this to have the hardware optimize the issuing of requests. Add
      a list_head parameter to queue_rq that the driver can use to
      temporarily store hw commands for issue when 'last' is true. If we
      are doing a chain of requests, pass in a NULL list for the first
      request to force issue of that immediately, then batch the remainder
      for deferred issue until the last request has been sent.
      
      Instead of adding yet another argument to the hot ->queue_rq path,
      encapsulate the passed arguments in a blk_mq_queue_data structure.
      This is passed as a constant, and has been tested as faster than
      passing 4 (or even 3) args through ->queue_rq. Update drivers for
      the new ->queue_rq() prototype. There are no functional changes
      in this patch for drivers - if they don't use the passed in list,
      then they will just queue requests individually like before.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      74c45052
  13. 28 10月, 2014 1 次提交
  14. 23 9月, 2014 5 次提交
  15. 19 9月, 2014 1 次提交
  16. 16 9月, 2014 1 次提交
  17. 29 8月, 2014 1 次提交
    • J
      block,scsi: fixup blk_get_request dead queue scenarios · a492f075
      Joe Lawrence 提交于
      The blk_get_request function may fail in low-memory conditions or during
      device removal (even if __GFP_WAIT is set). To distinguish between these
      errors, modify the blk_get_request call stack to return the appropriate
      ERR_PTR. Verify that all callers check the return status and consider
      IS_ERR instead of a simple NULL pointer check.
      
      For consistency, make a similar change to the blk_mq_alloc_request leg
      of blk_get_request.  It may fail if the queue is dead, or the caller was
      unwilling to wait.
      Signed-off-by: NJoe Lawrence <joe.lawrence@stratus.com>
      Acked-by: Jiri Kosina <jkosina@suse.cz> [for pktdvd]
      Acked-by: Boaz Harrosh <bharrosh@panasas.com> [for osd]
      Reviewed-by: NJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      a492f075
  18. 23 8月, 2014 1 次提交
  19. 20 8月, 2014 1 次提交
    • G
      scsi: Fix qemu boot hang problem · 480cadc2
      Guenter Roeck 提交于
      The latest kernel fails to boot qemu arm images when using scsi
      for disk access. Boot gets stuck after the following messages.
      
      brd: module loaded
      sym53c8xx 0000:00:0c.0: enabling device (0100 -> 0103)
      sym0: <895a> rev 0x0 at pci 0000:00:0c.0 irq 93
      sym0: No NVRAM, ID 7, Fast-40, LVD, parity checking
      sym0: SCSI BUS has been reset.
      scsi host0: sym-2.2.3
      
      Bisect points to commit 71e75c97 ("scsi: convert device_busy to
      atomic_t"). Code inspection shows the following suspicious change
      in scsi_request_fn.
      
      out_delay:
      -       if (sdev->device_busy == 0 && !scsi_device_blocked(sdev))
      +       if (atomic_read(&sdev->device_busy) && !scsi_device_blocked(sdev))
      		blk_delay_queue(q, SCSI_QUEUE_DELAY);
      	}
      
      'sdev->device_busy == 0' was replaced with 'atomic_read(&sdev->device_busy)',
      meaning the logic was reversed. Changing this expression to
      '!atomic_read(&sdev->device_busy)' fixes the problem.
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Reviewed-by: NHannes Reinecke <hare@suse.de>
      Acked-by: NJens Axboe <axboe@fb.com>
      Reviewed-by: NVenkatesh Srinivas <venkateshs@google.com>
      Reviewed-by: NWebb Scales <webbnh@hp.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      480cadc2
  20. 16 8月, 2014 1 次提交
    • G
      [SCSI] fix qemu boot hang problem · 045065d8
      Guenter Roeck 提交于
      The latest kernel fails to boot qemu arm images when using scsi
      for disk access. Boot gets stuck after the following messages.
      
      brd: module loaded
      sym53c8xx 0000:00:0c.0: enabling device (0100 -> 0103)
      sym0: <895a> rev 0x0 at pci 0000:00:0c.0 irq 93
      sym0: No NVRAM, ID 7, Fast-40, LVD, parity checking
      sym0: SCSI BUS has been reset.
      scsi host0: sym-2.2.3
      
      Bisect points to commit 71e75c97 ("scsi: convert device_busy to
      atomic_t"). Code inspection shows the following suspicious change
      in scsi_request_fn.
      
      out_delay:
      -       if (sdev->device_busy == 0 && !scsi_device_blocked(sdev))
      +       if (atomic_read(&sdev->device_busy) && !scsi_device_blocked(sdev))
      		blk_delay_queue(q, SCSI_QUEUE_DELAY);
      	}
      
      'sdev->device_busy == 0' was replaced with 'atomic_read(&sdev->device_busy)',
      meaning the logic was reversed. Changing this expression to
      '!atomic_read(&sdev->device_busy)' fixes the problem.
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Reviewed-by: NHannes Reinecke <hare@suse.de>
      Acked-by: NJens Axboe <axboe@fb.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Fixes: 71e75c97Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      045065d8
  21. 26 7月, 2014 5 次提交
  22. 25 7月, 2014 2 次提交