1. 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
  2. 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
  3. 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
  4. 26 4月, 2006 1 次提交
  5. 20 4月, 2006 2 次提交
  6. 19 4月, 2006 1 次提交
  7. 18 4月, 2006 2 次提交
  8. 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
  9. 02 4月, 2006 1 次提交
  10. 01 4月, 2006 3 次提交
  11. 29 3月, 2006 1 次提交
  12. 28 3月, 2006 5 次提交
  13. 27 3月, 2006 6 次提交
  14. 25 3月, 2006 1 次提交
  15. 24 3月, 2006 1 次提交
  16. 23 3月, 2006 1 次提交
  17. 21 3月, 2006 1 次提交
  18. 19 3月, 2006 10 次提交