1. 03 12月, 2008 2 次提交
  2. 18 11月, 2008 3 次提交
    • J
      block: hold extra reference to bio in blk_rq_map_user_iov() · c26156b2
      Jens Axboe 提交于
      If the size passed in is OK but we end up mapping too many segments,
      we call the unmap path directly like from IO completion. But from IO
      completion we have an extra reference to the bio, so this error case
      goes OOPS when it attempts to free and already free bio.
      
      Fix it by getting an extra reference to the bio before calling the
      unmap failure case.
      Reported-by: NPetr Vandrovec <vandrove@vc.cvut.cz>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      c26156b2
    • Z
      block: fix boot failure with CONFIG_DEBUG_BLOCK_EXT_DEVT=y and nash · 561ec68e
      Zhang, Yanmin 提交于
      We run into system boot failure with kernel 2.6.28-rc. We found it on a
      couple of machines, including T61 notebook, nehalem machine, and another
      HPC NX6325 notebook.  All the machines use FedoraCore 8 or FedoraCore 9.
      With kernel prior to 2.6.28-rc, system boot doesn't fail.
      
      I debug it and locate the root cause. Pls. see
      http://bugzilla.kernel.org/show_bug.cgi?id=11899
      https://bugzilla.redhat.com/show_bug.cgi?id=471517
      
      As a matter of fact, there are 2 bugs.
      
      1)root=/dev/sda1, system boot randomly fails. Mostly, boot for 5 times
      and fails once. nash has a bug. Some of its functions misuse return
      value 0.  Sometimes, 0 means timeout and no uevent available. Sometimes,
      0 means nash gets an uevent, but the uevent isn't block-related (for
      exmaple, usb). If by coincidence, kernel tells nash that uevents are
      available, but kernel also set timeout, nash might stops collecting
      other uevents in queue if current uevent isn't block-related.  I work
      out a patch for nash to fix it.
      http://bugzilla.kernel.org/attachment.cgi?id=18858
      
      2) root=LABEL=/, system always can't boot. initrd init reports
      switchroot fails. Here is an executation branch of nash when booting:
          (1) nash read /sys/block/sda/dev; Assume major is 8 (on my desktop)
          (2) nash query /proc/devices with the major number; It found line
      	"8 sd";
          (3) nash use 'sd' to search its own probe table to find device (DISK)
      	type for the device and add it to its own list;
          (4) Later on, it probes all devices in its list to get filesystem
      	labels; scsi register "8 sd" always.
      
      When major is 259, nash fails to find the device(DISK) type. I enables
      CONFIG_DEBUG_BLOCK_EXT_DEVT=y when compiling kernel, so 259 is picked up
      for device /dev/sda1, which causes nash to fail to find device (DISK)
      type.
      
      To fixing issue 2), I create a patch for nash and another patch for
      kernel.
      
      http://bugzilla.kernel.org/attachment.cgi?id=18859
      http://bugzilla.kernel.org/attachment.cgi?id=18837
      
      Below is the patch for kernel 2.6.28-rc4. It registers blkext, a new
      block device in proc/devices.
      
      With 2 patches on nash and 1 patch on kernel, I boot my machines for
      dozens of times without failure.
      
      Signed-off-by Zhang Yanmin <yanmin.zhang@linux.intel.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      561ec68e
    • T
      block: make add_partition() return pointer to hd_struct · ba32929a
      Tejun Heo 提交于
      Make add_partition() return pointer to the new hd_struct on success
      and ERR_PTR() value on failure.  This change will be used to fix md
      autodetection bug.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Neil Brown <neilb@suse.de>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      ba32929a
  3. 06 11月, 2008 4 次提交
    • A
      Block: use round_jiffies_up() · 7838c15b
      Alan Stern 提交于
      This patch (as1159b) changes the timeout routines in the block core to
      use round_jiffies_up().  There's no point in rounding the timer
      deadline down, since if it expires too early we will have to restart
      it.
      
      The patch also removes some unnecessary tests when a request is
      removed from the queue's timer list.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      7838c15b
    • M
      blk: move blk_delete_timer call in end_that_request_last · e78042e5
      Mike Anderson 提交于
      Move the calling  blk_delete_timer to later in end_that_request_last to
      address an issue where blkdev_dequeue_request may have add a timer for the
      request.
      Signed-off-by: NMike Anderson <andmike@linux.vnet.ibm.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      e78042e5
    • T
      block: add timer on blkdev_dequeue_request() not elv_next_request() · 2920ebbd
      Tejun Heo 提交于
      Block queue supports two usage models - one where block driver peeks
      at the front of queue using elv_next_request(), processes it and
      finishes it and the other where block driver peeks at the front of
      queue, dequeue the request using blkdev_dequeue_request() and finishes
      it.  The latter is more flexible as it allows the driver to process
      multiple commands concurrently.
      
      These two inconsistent usage models affect the block layer
      implementation confusing.  For some, elv_next_request() is considered
      the issue point while others consider blkdev_dequeue_request() the
      issue point.
      
      Till now the inconsistency mostly affect only accounting, so it didn't
      really break anything seriously; however, with block layer timeout,
      this inconsistency hits hard.  Block layer considers
      elv_next_request() the issue point and adds timer but SCSI layer
      thinks it was just peeking and when the request can't process the
      command right away, it's just left there without further processing.
      This makes the request dangling on the timer list and, when the timer
      goes off, the request which the SCSI layer and below think is still on
      the block queue ends up in the EH queue, causing various problems - EH
      hang (failed count goes over busy count and EH never wakes up),
      WARN_ON() and oopses as low level driver trying to handle the unknown
      command, etc. depending on the timing.
      
      As SCSI midlayer is the only user of block layer timer at the moment,
      moving blk_add_timer() to elv_dequeue_request() fixes the problem;
      however, this two usage models definitely need to be cleaned up in the
      future.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      2920ebbd
    • F
      43381785
  4. 24 10月, 2008 1 次提交
  5. 23 10月, 2008 2 次提交
  6. 21 10月, 2008 12 次提交
  7. 17 10月, 2008 8 次提交
  8. 13 10月, 2008 1 次提交
    • M
      [SCSI] block: separate failfast into multiple bits. · 6000a368
      Mike Christie 提交于
      Multipath is best at handling transport errors. If it gets a device
      error then there is not much the multipath layer can do. It will just
      access the same device but from a different path.
      
      This patch breaks up failfast into device, transport and driver errors.
      The multipath layers (md and dm mutlipath) only ask the lower levels to
      fast fail transport errors. The user of failfast, read ahead, will ask
      to fast fail on all errors.
      
      Note that blk_noretry_request will return true if any failfast bit
      is set. This allows drivers that do not support the multipath failfast
      bits to continue to fail on any failfast error like before. Drivers
      like scsi that are able to fail fast specific errors can check
      for the specific fail fast type. In the next patch I will convert
      scsi.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      6000a368
  9. 09 10月, 2008 7 次提交