1. 11 10月, 2008 15 次提交
  2. 09 10月, 2008 6 次提交
    • 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: move policy from disk to part0 · b7db9956
      Tejun Heo 提交于
      Move disk->policy to part0->policy.  Implement and use get_disk_ro().
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      b7db9956
    • T
      block: implement and use {disk|part}_to_dev() · ed9e1982
      Tejun Heo 提交于
      Implement {disk|part}_to_dev() and use them to access generic device
      instead of directly dereferencing {disk|part}->dev.  To make sure no
      user is left behind, rename generic devices fields to __dev.
      
      This is in preparation of unifying partition 0 handling with other
      partitions.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      ed9e1982
    • 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
  3. 06 10月, 2008 5 次提交
  4. 28 9月, 2008 3 次提交
  5. 11 9月, 2008 2 次提交
    • J
      block: disable sysfs parts of the disk command filter · 2dc75d3c
      Jens Axboe 提交于
      We still have life time issues with the sysfs command filter kobject,
      so disable it for 2.6.27 release. We can revisit this and make it work
      properly for 2.6.28, for 2.6.27 release it's too risky.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      2dc75d3c
    • M
      ide: Fix pointer arithmetic in hpt3xx driver code (3rd try) · 62ff2ecf
      Masoud Sharbiani 提交于
      git commit 74811f35 causes crash at
      module load (or boot) time on my machine with a hpt374 controller.
      The reason for this is that for initializing second controller which sets
      (hwif->dev == host->dev[1]) to true (1), adds 1 to a void ptr, which
      advances it by one byte instead of advancing it by sizeof(hpt_info) bytes.
      Because of this, all initialization functions get corrupted data in info
      variable which causes a crash at boot time.
      
      This patch fixes that and makes my machine boot again.
      
      The card itself is a HPT374 raid conroller: Here is the lspci -v output:
      03:06.0 RAID bus controller: HighPoint Technologies, Inc. HPT374 (rev
      07)
              Subsystem: HighPoint Technologies, Inc. Unknown device 0001
              Flags: bus master, 66MHz, medium devsel, latency 120, IRQ 28
              I/O ports at 8000 [size=8]
              I/O ports at 7800 [size=4]
              I/O ports at 7400 [size=8]
              I/O ports at 7000 [size=4]
              I/O ports at 6800 [size=256]
              Expansion ROM at fe8e0000 [disabled] [size=128K]
              Capabilities: [60] Power Management version 2
      
      03:06.1 RAID bus controller: HighPoint Technologies, Inc. HPT374 (rev
      07)
              Subsystem: HighPoint Technologies, Inc. Unknown device 0001
              Flags: bus master, 66MHz, medium devsel, latency 120, IRQ 28
              I/O ports at 9800 [size=8]
              I/O ports at 9400 [size=4]
              I/O ports at 9000 [size=8]
              I/O ports at 8800 [size=4]
              I/O ports at 8400 [size=256]
              Capabilities: [60] Power Management version 2
      Signed-off-by: NMasoud Sharbiani <masouds@google.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      [bart: use dev_get_drvdata() per Sergei's suggestion]
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      62ff2ecf
  6. 03 9月, 2008 4 次提交
  7. 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
  8. 19 8月, 2008 3 次提交
  9. 07 8月, 2008 1 次提交