1. 17 7月, 2015 1 次提交
  2. 25 5月, 2015 1 次提交
  3. 19 5月, 2015 1 次提交
  4. 17 4月, 2015 1 次提交
  5. 11 4月, 2015 1 次提交
    • J
      sd, mmc, virtio_blk, string_helpers: fix block size units · b9f28d86
      James Bottomley 提交于
      The current string_get_size() overflows when the device size goes over
      2^64 bytes because the string helper routine computes the suffix from
      the size in bytes.  However, the entirety of Linux thinks in terms of
      blocks, not bytes, so this will artificially induce an overflow on very
      large devices.  Fix this by making the function string_get_size() take
      blocks and the block size instead of bytes.  This should allow us to
      keep working until the current SCSI standard overflows.
      
      Also fix virtio_blk and mmc (both of which were also artificially
      multiplying by the block size to pass a byte side to string_get_size()).
      
      The mathematics of this is pretty simple:  we're taking a product of
      size in blocks (S) and block size (B) and trying to re-express this in
      exponential form: S*B = R*N^E (where N, the exponent is either 1000 or
      1024) and R < N.  Mathematically, S = RS*N^ES and B=RB*N^EB, so if RS*RB
      < N it's easy to see that S*B = RS*RB*N^(ES+EB).  However, if RS*BS > N,
      we can see that this can be re-expressed as RS*BS = R*N (where R =
      RS*BS/N < N) so the whole exponent becomes R*N^(ES+EB+1)
      
      [jejb: fix incorrect 32 bit do_div spotted by kbuild test robot <fengguang.wu@intel.com>]
      Acked-by: NUlf Hansson <ulf.hansson@linaro.org>
      Reviewed-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
      b9f28d86
  6. 19 3月, 2015 1 次提交
  7. 02 2月, 2015 1 次提交
  8. 09 1月, 2015 1 次提交
  9. 30 12月, 2014 1 次提交
  10. 25 11月, 2014 3 次提交
  11. 12 11月, 2014 6 次提交
  12. 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
  13. 01 10月, 2014 1 次提交
  14. 16 9月, 2014 2 次提交
  15. 26 7月, 2014 3 次提交
  16. 18 7月, 2014 12 次提交
  17. 01 7月, 2014 1 次提交
  18. 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