1. 23 6月, 2006 6 次提交
  2. 22 6月, 2006 1 次提交
  3. 21 6月, 2006 1 次提交
  4. 15 6月, 2006 1 次提交
  5. 09 6月, 2006 1 次提交
    • J
      [PATCH] elevator switching race · bc1c1169
      Jens Axboe 提交于
      There's a race between shutting down one io scheduler and firing up the
      next, in which a new io could enter and cause the io scheduler to be
      invoked with bad or NULL data.
      
      To fix this, we need to maintain the queue lock for a bit longer.
      Unfortunately we cannot do that, since the elevator init requires to be
      run without the lock held.  This isn't easily fixable, without also
      changing the mempool API.  So split the initialization into two parts,
      and alloc-init operation and an attach operation.  Then we can
      preallocate the io scheduler and related structures, and run the attach
      inside the lock after we detach the old one.
      
      This patch has survived 30 minutes of 1 second io scheduler switching
      with a very busy io load.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      bc1c1169
  6. 02 6月, 2006 1 次提交
  7. 01 6月, 2006 4 次提交
  8. 31 5月, 2006 1 次提交
  9. 24 5月, 2006 1 次提交
  10. 13 5月, 2006 1 次提交
    • L
      Revert "[BLOCK] Fix oops on removal of SD/MMC card" · 1a2acc9e
      Linus Torvalds 提交于
      This reverts commit 56cf6504.
      
      Both Erik Mouw and Andrew Vasquez independently pinpointed this commit
      as causing problems, where the slab cache for a driver is never released
      (most obviously causing problems when immediately re-loading that
      driver, resulting in a "kmem_cache_create: duplicate cache <xyz>"
      message, but it can also cause other trouble).
      
      James Bottomley dug into it, and reports:
      
        "OK, here's the scoop.  The problem patch adds a get of driverfs_dev in
         add_disk(), but doesn't put it again until disk_release() (which occurs
         on final put_disk() of the gendisk).
      
         However, in SCSI, the driverfs_dev is the sdev_gendev.  That means
         there's a reference held on sdev_gendev  until final disk put.
         Unfortunately, we use the driver model driver_remove to trigger
         del_gendisk (which removes the gendisk from visibility and decrements
         the refcount), so we've introduced an unbreakable deadlock in the
         reference counting with this.
      
         I suggest simply reversing this patch at the moment.  If Russell and
         Jens can tell me what they're trying to do I'll see if there's another
         way to do it."
      
      so hereby the patch gets reverted, waiting for a better fix.
      
      Cc: Jens Axboe <axboe@suse.de>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: James Bottomley <James.Bottomley@SteelEye.com>
      Cc: Erik Mouw <erik@harddisk-recovery.com>
      Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      1a2acc9e
  11. 12 5月, 2006 1 次提交
    • J
      [BLOCK] limit request_fn recursion · dac07ec1
      Jens Axboe 提交于
      Don't recurse back into the driver even if the unplug threshold is met,
      when the driver asks for a requeue. This is both silly from a logical
      point of view (requeues typically happen due to driver/hardware
      shortage), and also dangerous since we could hit an endless request_fn
      -> requeue -> unplug -> request_fn loop and crash on stack overrun.
      
      Also limit blk_run_queue() to one level of recursion, similar to how
      blk_start_queue() works.
      
      This patch fixed a real problem with SLES10 and lpfc, and it could hit
      any SCSI lld that returns non-zero from it's ->queuecommand() handler.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      dac07ec1
  12. 06 5月, 2006 1 次提交
    • R
      [BLOCK] Fix oops on removal of SD/MMC card · 56cf6504
      Russell King 提交于
      The block layer keeps a reference (driverfs_dev) to the struct
      device associated with the block device, and uses it internally
      for generating uevents in block_uevent.
      
      Block device uevents include umounting the partition, which can
      occur after the backing device has been removed.
      
      Unfortunately, this reference is not counted.  This means that
      if the struct device is removed from the device tree, the block
      layers reference will become stale.
      
      Guard against this by holding a reference to the struct device
      in add_disk(), and only drop the reference when we're releasing
      the gendisk kobject - in other words when we can be sure that no
      further uevents will be generated for this block device.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Acked-by: NJens Axboe <axboe@suse.de>
      56cf6504
  13. 26 4月, 2006 1 次提交
  14. 21 4月, 2006 1 次提交
  15. 20 4月, 2006 2 次提交
  16. 19 4月, 2006 1 次提交
  17. 18 4月, 2006 2 次提交
  18. 13 4月, 2006 1 次提交
    • C
      [SCSI] unify SCSI_IOCTL_SEND_COMMAND implementations · 21b2f0c8
      Christoph Hellwig 提交于
      We currently have two implementations of this obsolete ioctl, one in
      the block layer and one in the scsi code.  Both of them have drawbacks.
      
      This patch kills the scsi layer version after updating the block version
      with the missing bits:
      
       - argument checking
       - use scatterlist I/O
       - set number of retries based on the submitted command
      
      This is the last user of non-S/G I/O except for the gdth driver, so
      getting this in ASAP and through the scsi tree would be nie to kill
      the non-S/G I/O path.  Jens, what do you think about adding a check
      for non-S/G I/O in the midlayer?
      
      Thanks to  Or Gerlitz for testing this patch.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      21b2f0c8
  19. 02 4月, 2006 1 次提交
  20. 01 4月, 2006 3 次提交
  21. 29 3月, 2006 1 次提交
  22. 28 3月, 2006 5 次提交
  23. 27 3月, 2006 2 次提交
    • J
      [PATCH] Fix blktrace compile with sysfs not defined · 09540e69
      Jens Axboe 提交于
      debugfs depends on sysfs, so make blktrace kconfig option depend
      on that.
      
      Reported by Adrian Bunk.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      09540e69
    • B
      [BLOCK] increase size of disk stat counters · 837c7878
      Ben Woodard 提交于
      The kernel's representation of the disk statistics uses the type unsigned
      which is 32b on both 32b and 64b platforms.  Unfortunately, most system
      tools that work with these numbers that are exported in /proc/diskstats
      including iostat read these numbers into unsigned longs.  This works fine
      on 32b platforms and when the number of IO transactions are small on 64b
      platforms.  However, when the numbers wrap on 64b platforms & you read the
      numbers into unsigned longs, and compare the numbers to previous readings,
      then you get an unsigned representation of a negative number.  This looks
      like a very large 64b number & gives you bizarre readouts in iostat:
      
      ilc4: Device:    rrqm/s wrqm/s r/s    w/s  rsec/s  wsec/s    rkB/s wkB/s avgrq-sz avgqu-sz   await  svctm  %util
      ilc4: sda        5.50   0.00   143.96 0.00 307496983987862656.00 0.00 153748491993931328.00     0.00 2136028725038430.00     7.94   55.12    5.59  80.42
      
      Though fixing iostat in user space is possible, and a quick survey
      indicates that several other similar tools also use unsigned longs when
      processing /proc/diskstats.  Therefore, it seems like a better approach
      would be to extend the length of the disk_stats structure on 64b
      architectures to 64b.  The following patch does that.  It should not affect
      the operation on 32b platforms.
      Signed-off-by: NBen Woodard <woodard@redhat.com>
      Cc: Rick Lindsley <ricklind@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJens Axboe <axboe@suse.de>
      837c7878