1. 31 7月, 2009 1 次提交
  2. 22 6月, 2009 1 次提交
  3. 21 6月, 2009 3 次提交
  4. 09 6月, 2009 1 次提交
  5. 23 5月, 2009 1 次提交
  6. 11 5月, 2009 1 次提交
    • T
      block: convert to pos and nr_sectors accessors · 83096ebf
      Tejun Heo 提交于
      With recent cleanups, there is no place where low level driver
      directly manipulates request fields.  This means that the 'hard'
      request fields always equal the !hard fields.  Convert all
      rq->sectors, nr_sectors and current_nr_sectors references to
      accessors.
      
      While at it, drop superflous blk_rq_pos() < 0 test in swim.c.
      
      [ Impact: use pos and nr_sectors accessors ]
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
      Tested-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NGrant Likely <grant.likely@secretlab.ca>
      Tested-by: NAdrian McMenamin <adrian@mcmen.demon.co.uk>
      Acked-by: NAdrian McMenamin <adrian@mcmen.demon.co.uk>
      Acked-by: NMike Miller <mike.miller@hp.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Cc: Borislav Petkov <petkovbb@googlemail.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Eric Moore <Eric.Moore@lsi.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Paul Clements <paul.clements@steeleye.com>
      Cc: Tim Waugh <tim@cyberelk.net>
      Cc: Jeff Garzik <jgarzik@pobox.com>
      Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Alex Dubov <oakad@yahoo.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Dario Ballabio <ballabio_dario@emc.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: unsik Kim <donari75@gmail.com>
      Cc: Laurent Vivier <Laurent@lvivier.info>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      83096ebf
  7. 27 4月, 2009 1 次提交
  8. 03 4月, 2009 1 次提交
    • J
      [SCSI] fix recovered error handling · a9bddd74
      James Bottomley 提交于
      We have a problem with recovered error handling in that any command
      which goes down as BLOCK_PC but which returns a sense code of RECOVERED
      ERROR gets completed with -EIO.  For actual SG_IO commands, this doesn't
      matter at all, since the error return code gets dropped in favour of
      req->errors which contain the SCSI completion code.
      
      However, if this command is part of the block system, then it will pay
      attention to the returned error code.  In particularly if a SYNCHRONIZE
      CACHE from a barrier command completes with RECOVERED ERROR, the
      resulting -EIO on the barrier causes block to error the request and
      return it to the filesystem.  Fix this by converting the -EIO for
      recovered error to zero, plus remove the printing of this from sd and sr
      so the message isn't double printed.
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      a9bddd74
  9. 18 3月, 2009 2 次提交
  10. 14 3月, 2009 1 次提交
  11. 13 3月, 2009 1 次提交
  12. 06 3月, 2009 1 次提交
  13. 22 2月, 2009 1 次提交
    • T
      [SCSI] sd: revive sd_index_lock · 4034cc68
      Tejun Heo 提交于
      Commit f27bac27 which converted sd to
      use ida instead of idr incorrectly removed sd_index_lock around id
      allocation and free.  idr/ida do have internal locks but they protect
      their free object lists not the allocation itself.  The caller is
      responsible for that.  This missing synchronization led to the same id
      being assigned to multiple devices leading to oops.
      
      Reported and tracked down by Stuart Hayes of Dell.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Stable Tree <stable@kernel.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      4034cc68
  14. 08 1月, 2009 1 次提交
  15. 03 1月, 2009 1 次提交
  16. 30 12月, 2008 1 次提交
  17. 04 12月, 2008 1 次提交
  18. 24 10月, 2008 3 次提交
  19. 21 10月, 2008 5 次提交
  20. 13 10月, 2008 3 次提交
  21. 09 10月, 2008 6 次提交
    • J
      block: unify request timeout handling · 242f9dcb
      Jens Axboe 提交于
      Right now SCSI and others do their own command timeout handling.
      Move those bits to the block layer.
      
      Instead of having a timer per command, we try to be a bit more clever
      and simply have one per-queue. This avoids the overhead of having to
      tear down and setup a timer for each command, so it will result in a lot
      less timer fiddling.
      Signed-off-by: NMike Anderson <andmike@linux.vnet.ibm.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      242f9dcb
    • A
      SCSI sd driver calls revalidate_disk wrapper. · f98a8cae
      Andrew Patterson 提交于
      Modify the SCSI disk driver to call the revalidate_disk()
      wrapper. This allows us to do some housekeeping such as accounting for
      a disk being resized online. The wrapper will call
      sd_revalidate_disk() at the appropriate time.
      Signed-off-by: NAndrew Patterson <andrew.patterson@hp.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      f98a8cae
    • T
      block: allow disk to have extended device number · 3e1a7ff8
      Tejun Heo 提交于
      Now that disk and partition handlings are mostly unified, it's easy to
      allow disk to have extended device number.  This patch makes
      add_disk() use extended device number if disk->minors is zero.  Both
      sd and ide-disk are updated to use this.
      
      * sd_format_disk_name() is implemented which can generically determine
        the drive name.  This removes disk number restriction stemming from
        limited device names.
      
      * If sd index goes over SD_MAX_DISKS (which can be increased now BTW),
        sd simply doesn't initialize minors letting block layer choose
        extended device number.
      
      * If CONFIG_DEBUG_EXT_DEVT is set, both sd and ide-disk always set
        minors to 0 and use extended device numbers.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      3e1a7ff8
    • T
      block: replace @ext_minors with GENHD_FL_EXT_DEVT · 689d6fac
      Tejun Heo 提交于
      With previous changes, it's meaningless to limit the number of
      partitions.  Replace @ext_minors with GENHD_FL_EXT_DEVT such that
      setting the flag allows the disk to have maximum number of allowed
      partitions (only limited by the number of entries in parsed_partitions
      as determined by MAX_PART constant).
      
      This kills not-too-pretty alloc_disk_ext[_node]() functions and makes
      @minors parameter to alloc_disk[_node]() unnecessary.  The parameter
      is left alone to avoid disturbing the users.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      689d6fac
    • T
      block: implement CONFIG_DEBUG_BLOCK_EXT_DEVT · 870d6656
      Tejun Heo 提交于
      Extended devt introduces non-contiguos device numbers.  This patch
      implements a debug option which forces most devt allocations to be
      from the extended area and spreads them out.  This is enabled by
      default if DEBUG_KERNEL is set and achieves...
      
      1. Detects code paths in kernel or userland which expect predetermined
         consecutive device numbers.
      
      2. When something goes wrong, avoid corruption as adding to the minor
         of earlier partition won't lead to the wrong but valid device.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      870d6656
    • T
      sd/ide-disk: apply extended minors to sd and ide · f615b48c
      Tejun Heo 提交于
      Update sd and ide-disk such that they can take advantage of extended
      minors.
      
      ide-disk already has 64 minors per device and currently doesn't use
      extended minors although after this patch it can be turned on by
      simply tweaking constants.
      
      sd only had 16 minors per device causing problems on certain peculiar
      configurations.  This patch lifts the restriction and enables it to
      use upto 64 minors.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      f615b48c
  22. 04 10月, 2008 1 次提交
  23. 11 9月, 2008 1 次提交
  24. 29 8月, 2008 1 次提交
    • F
      remove blk_register_filter and blk_unregister_filter in gendisk · bb23b431
      FUJITA Tomonori 提交于
      This patch remove blk_register_filter and blk_unregister_filter in
      gendisk, and adds them to sd.c, sr.c. and ide-cd.c
      
      The commit abf54393 moved cmdfilter
      from gendisk to request_queue. It turned out that in some subsystems
      multiple gendisks share a single request_queue. So we get:
      
      Using physmap partition information
      Creating 3 MTD partitions on "physmap-flash":
      0x00000000-0x01c00000 : "User FS"
      0x01c00000-0x01c40000 : "booter"
      kobject (8511c410): tried to init an initialized object, something is seriously wrong.
      Call Trace:
      [<8036644c>] dump_stack+0x8/0x34
      [<8021f050>] kobject_init+0x50/0xcc
      [<8021fa18>] kobject_init_and_add+0x24/0x58
      [<8021d20c>] blk_register_filter+0x4c/0x64
      [<8021c194>] add_disk+0x78/0xe0
      [<8027d14c>] add_mtd_blktrans_dev+0x254/0x278
      [<8027c8f0>] blktrans_notify_add+0x40/0x78
      [<80279c00>] add_mtd_device+0xd0/0x150
      [<8027b090>] add_mtd_partitions+0x568/0x5d8
      [<80285458>] physmap_flash_probe+0x2ac/0x334
      [<802644f8>] driver_probe_device+0x12c/0x244
      [<8026465c>] __driver_attach+0x4c/0x84
      [<80263c64>] bus_for_each_dev+0x58/0xac
      [<802633ec>] bus_add_driver+0xc4/0x24c
      [<802648e0>] driver_register+0xcc/0x184
      [<80100460>] _stext+0x60/0x1bc
      
      In the long term, we need to fix such subsystems but we need a quick
      fix now. This patch add the command filter support to only sd and sr
      though it might be useful for other SG_IO users (such as cciss).
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Reported-by: NManuel Lauss <mano@roarinelk.homelinux.net>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      bb23b431