1. 12 11月, 2014 6 次提交
  2. 05 10月, 2014 1 次提交
    • M
      block: disable entropy contributions for nonrot devices · b277da0a
      Mike Snitzer 提交于
      Clear QUEUE_FLAG_ADD_RANDOM in all block drivers that set
      QUEUE_FLAG_NONROT.
      
      Historically, all block devices have automatically made entropy
      contributions.  But as previously stated in commit e2e1a148 ("block: add
      sysfs knob for turning off disk entropy contributions"):
          - On SSD disks, the completion times aren't as random as they
            are for rotational drives. So it's questionable whether they
            should contribute to the random pool in the first place.
          - Calling add_disk_randomness() has a lot of overhead.
      
      There are more reliable sources for randomness than non-rotational block
      devices.  From a security perspective it is better to err on the side of
      caution than to allow entropy contributions from unreliable "random"
      sources.
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      b277da0a
  3. 01 10月, 2014 1 次提交
  4. 16 9月, 2014 2 次提交
  5. 26 7月, 2014 3 次提交
  6. 18 7月, 2014 12 次提交
  7. 01 7月, 2014 1 次提交
  8. 19 5月, 2014 2 次提交
    • D
      sd: medium access timeout counter fails to reset · 2a863ba8
      David Jeffery 提交于
      There is an error with the medium access timeout feature of the sd driver. The
      sdkp->medium_access_timed_out value is reset to zero in sd_done() in the wrong
      place.  Currently it is reset to zero only when a command returns sense data.
      This can result in cases where the medium access check falsely triggers from
      timed out commands which are hours or days apart.
      
      For example, an I/O command times out and is aborted.  It then retries and
      succeeds.  But with no sense data generated and returned, the
      medium_access_timed_out value is not reset.  If no sd command returns sense
      data, then the next command to time out (however far in time from the first
      failure) will trigger the medium access timeout and put the device offline.
      
      The resetting of sdkp->medium_access_timed_out should occur before the check
      for sense data.
      
      To reproduce using scsi_debug, use SCSI_DEBUG_OPT_TIMEOUT or
      SCSI_DEBUG_OPT_MAC_TIMEOUT to force an I/O command to timeout.  Then, remove
      the opt value so the I/O will succeed on retry.  Perform more I/O as desired.
      Finally, repeat the process to make a new I/O command time out.  Without the
      patch, the device will be marked offline even though many I/O commands have
      succeeded between the 2 instances of timed out commands.
      Signed-off-by: NDavid Jeffery <djeffery@redhat.com>
      Reviewed-by: NEwan D. Milne <emilne@redhat.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      2a863ba8
    • C
      scsi: reintroduce scsi_driver.init_command · a1b73fc1
      Christoph Hellwig 提交于
      Instead of letting the ULD play games with the prep_fn move back to
      the model of a central prep_fn with a callback to the ULD.  This
      already cleans up and shortens the code by itself, and will be required
      to properly support blk-mq in the SCSI midlayer.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NNicholas Bellinger <nab@linux-iscsi.org>
      Reviewed-by: NMike Christie <michaelc@cs.wisc.edu>
      Reviewed-by: NHannes Reinecke <hare@suse.de>
      a1b73fc1
  9. 17 4月, 2014 1 次提交
  10. 16 4月, 2014 1 次提交
    • J
      block: remove struct request buffer member · b4f42e28
      Jens Axboe 提交于
      This was used in the olden days, back when onions were proper
      yellow. Basically it mapped to the current buffer to be
      transferred. With highmem being added more than a decade ago,
      most drivers map pages out of a bio, and rq->buffer isn't
      pointing at anything valid.
      
      Convert old style drivers to just use bio_data().
      
      For the discard payload use case, just reference the page
      in the bio.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      b4f42e28
  11. 11 4月, 2014 1 次提交
    • D
      scsi: async sd resume · 3c31b52f
      Dan Williams 提交于
      async_schedule() sd resume work to allow disks and other devices to
      resume in parallel.
      
      This moves the entirety of scsi_device resume to an async context to
      ensure that scsi_device_resume() remains ordered with respect to the
      completion of the start/stop command.  For the duration of the resume,
      new command submissions (that do not originate from the scsi-core) will
      be deferred (BLKPREP_DEFER).
      
      It adds a new ASYNC_DOMAIN_EXCLUSIVE(scsi_sd_pm_domain) as a container
      of these operations.  Like scsi_sd_probe_domain it is flushed at
      sd_remove() time to ensure async ops do not continue past the
      end-of-life of the sdev.  The implementation explicitly refrains from
      reusing scsi_sd_probe_domain directly for this purpose as it is flushed
      at the end of dpm_resume(), potentially defeating some of the benefit.
      Given sdevs are quiesced it is permissible for these resume operations
      to bleed past the async_synchronize_full() calls made by the driver
      core.
      
      We defer the resolution of which pm callback to call until
      scsi_dev_type_{suspend|resume} time and guarantee that the callback
      parameter is never NULL.  With this in place the type of resume
      operation is encoded in the async function identifier.
      
      There is a concern that async resume could trigger PSU overload.  In the
      enterprise, storage enclosures enforce staggered spin-up regardless of
      what the kernel does making async scanning safe by default.  Outside of
      that context a user can disable asynchronous scanning via a kernel
      command line or CONFIG_SCSI_SCAN_ASYNC.  Honor that setting when
      deciding whether to do resume asynchronously.
      
      Inspired by Todd's analysis and initial proposal [2]:
      https://01.org/suspendresume/blogs/tebrandt/2013/hard-disk-resume-optimization-simpler-approach
      
      Cc: Len Brown <len.brown@intel.com>
      Cc: Phillip Susi <psusi@ubuntu.com>
      [alan: bug fix and clean up suggestion]
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Suggested-by: NTodd Brandt <todd.e.brandt@linux.intel.com>
      [djbw: kick all resume work to the async queue]
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      3c31b52f
  12. 27 3月, 2014 1 次提交
  13. 16 3月, 2014 1 次提交
  14. 19 12月, 2013 2 次提交
  15. 29 11月, 2013 1 次提交
    • M
      [SCSI] Disable WRITE SAME for RAID and virtual host adapter drivers · 54b2b50c
      Martin K. Petersen 提交于
      Some host adapters do not pass commands through to the target disk
      directly. Instead they provide an emulated target which may or may not
      accurately report its capabilities. In some cases the physical device
      characteristics are reported even when the host adapter is processing
      commands on the device's behalf. This can lead to adapter firmware hangs
      or excessive I/O errors.
      
      This patch disables WRITE SAME for devices connected to host adapters
      that provide an emulated target. Driver writers can disable WRITE SAME
      by setting the no_write_same flag in the host adapter template.
      
      [jejb: fix up rejections due to eh_deadline patch]
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Cc: stable@kernel.org
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      54b2b50c
  16. 24 11月, 2013 1 次提交
    • K
      block: Convert bio_iovec() to bvec_iter · a4ad39b1
      Kent Overstreet 提交于
      For immutable biovecs, we'll be introducing a new bio_iovec() that uses
      our new bvec iterator to construct a biovec, taking into account
      bvec_iter->bi_bvec_done - this patch updates existing users for the new
      usage.
      
      Some of the existing users really do need a pointer into the bvec array
      - those uses are all going to be removed, but we'll need the
      functionality from immutable to remove them - so for now rename the
      existing bio_iovec() -> __bio_iovec(), and it'll be removed in a couple
      patches.
      Signed-off-by: NKent Overstreet <kmo@daterainc.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: "Ed L. Cashin" <ecashin@coraid.com>
      Cc: Alasdair Kergon <agk@redhat.com>
      Cc: dm-devel@redhat.com
      Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
      a4ad39b1
  17. 25 10月, 2013 3 次提交