1. 09 10月, 2008 2 次提交
  2. 01 9月, 2008 1 次提交
  3. 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
  4. 22 8月, 2008 2 次提交
  5. 22 7月, 2008 8 次提交
  6. 03 7月, 2008 2 次提交
  7. 10 6月, 2008 1 次提交
    • L
      Fix invalid access errors in blk_lookup_devt · d5791d13
      Linus Torvalds 提交于
      Commit 30f2f0eb ("block: do_mounts -
      accept root=<non-existant partition>") extended blk_lookup_devt() to be
      able to look up partitions that had not yet been registered, but in the
      process made the assumption that the '&block_class.devices' list only
      contains disk devices and that you can do 'dev_to_disk(dev)' on them.
      
      That isn't actually true.  The block_class device list also contains the
      partitions we've discovered so far, and you can't just do a
      'dev_to_disk()' on those.
      
      So make sure to only work on devices that block/genhd.c has registered
      itself, something we can test by checking the 'dev->type' member.  This
      makes the loop in blk_lookup_devt() match the other such loops in this
      file.
      
      [ We may want to do an alternate version that knows to handle _either_
        whole-disk devices or partitions, but for now this is the minimal fix
        for a series of crashes reported by Mariusz Kozlowski in
      
      	http://lkml.org/lkml/2008/5/25/25
      
        and Ingo in
      
      	http://lkml.org/lkml/2008/6/9/39 ]
      Reported-by: NMariusz Kozlowski <m.kozlowski@tuxland.pl>
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Cc: Neil Brown <neilb@suse.de>
      Cc: Joao Luis Meloni Assirati <assirati@nonada.if.usp.br>
      Acked-by: NKay Sievers <kay.sievers@vrfy.org>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d5791d13
  8. 15 5月, 2008 1 次提交
  9. 30 4月, 2008 1 次提交
  10. 13 3月, 2008 1 次提交
  11. 04 3月, 2008 2 次提交
  12. 08 2月, 2008 1 次提交
  13. 30 1月, 2008 1 次提交
  14. 25 1月, 2008 3 次提交
    • K
      Driver core: convert block from raw kobjects to core devices · edfaa7c3
      Kay Sievers 提交于
      This moves the block devices to /sys/class/block. It will create a
      flat list of all block devices, with the disks and partitions in one
      directory. For compatibility /sys/block is created and contains symlinks
      to the disks.
      
        /sys/class/block
        |-- sda -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
        |-- sda1 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1
        |-- sda10 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10
        |-- sda5 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5
        |-- sda6 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6
        |-- sda7 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7
        |-- sda8 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8
        |-- sda9 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9
        `-- sr0 -> ../../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0
      
        /sys/block/
        |-- sda -> ../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
        `-- sr0 -> ../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      edfaa7c3
    • G
      kset: convert block_subsys to use kset_create · 830d3cfb
      Greg Kroah-Hartman 提交于
      Dynamically create the kset instead of declaring it statically.  We also
      rename block_subsys to block_kset to catch all users of this symbol
      with a build error instead of an easy-to-ignore build warning.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      830d3cfb
    • G
      kobject: remove struct kobj_type from struct kset · 3514faca
      Greg Kroah-Hartman 提交于
      We don't need a "default" ktype for a kset.  We should set this
      explicitly every time for each kset.  This change is needed so that we
      can make ksets dynamic, and cleans up one of the odd, undocumented
      assumption that the kset/kobject/ktype model has.
      
      This patch is based on a lot of help from Kay Sievers.
      
      Nasty bug in the block code was found by Dave Young
      <hidave.darkstar@gmail.com>
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Dave Young <hidave.darkstar@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3514faca
  15. 27 11月, 2007 1 次提交
  16. 13 10月, 2007 1 次提交
    • K
      Driver core: change add_uevent_var to use a struct · 7eff2e7a
      Kay Sievers 提交于
      This changes the uevent buffer functions to use a struct instead of a
      long list of parameters. It does no longer require the caller to do the
      proper buffer termination and size accounting, which is currently wrong
      in some places. It fixes a known bug where parts of the uevent
      environment are overwritten because of wrong index calculations.
      
      Many thanks to Mathieu Desnoyers for finding bugs and improving the
      error handling.
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      7eff2e7a
  17. 18 7月, 2007 3 次提交
  18. 24 5月, 2007 2 次提交
  19. 10 5月, 2007 1 次提交
  20. 03 5月, 2007 1 次提交
  21. 05 4月, 2007 1 次提交
  22. 21 2月, 2007 1 次提交
  23. 13 2月, 2007 1 次提交
  24. 09 12月, 2006 1 次提交
    • A
      [PATCH] fault-injection capability for disk IO · c17bb495
      Akinobu Mita 提交于
      This patch provides fault-injection capability for disk IO.
      
      Boot option:
      
      fail_make_request=<probability>,<interval>,<space>,<times>
      
      	<interval> -- specifies the interval of failures.
      
      	<probability> -- specifies how often it should fail in percent.
      
      	<space> -- specifies the size of free space where disk IO can be issued
      		   safely in bytes.
      
      	<times> -- specifies how many times failures may happen at most.
      
      Debugfs:
      
      /debug/fail_make_request/interval
      /debug/fail_make_request/probability
      /debug/fail_make_request/specifies
      /debug/fail_make_request/times
      
      Example:
      
      	fail_make_request=10,100,0,-1
      	echo 1 > /sys/blocks/hda/hda1/make-it-fail
      
      generic_make_request() on /dev/hda1 fails once per 10 times.
      
      Cc: Jens Axboe <axboe@suse.de>
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c17bb495