You need to sign in or sign up before continuing.
  1. 09 10月, 2008 3 次提交
    • T
      block: make variable and argument names more consistent · cf771cb5
      Tejun Heo 提交于
      In hd_struct, @partno is used to denote partition number and a number
      of other places use @part to denote hd_struct.  Functions use @part
      and @index instead.  This causes confusion and makes it difficult to
      use consistent variable names for hd_struct.  Always use @partno if a
      variable represents partition number.
      
      Also, print out functions use @f or @part for seq_file argument.  Use
      @seqf uniformly instead.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      cf771cb5
    • T
      block: update add_partition() error handling · 88e34126
      Tejun Heo 提交于
      d805dda4 tried to fix error case handling in add_partition() but had a
      few problems.
      
      * disk->part[] entry is set early and left dangling if operation
        fails.
      
      * Once device initialized, the last put_device() is responsible for
        freeing all the resources.  The failure path freed part_stats and p
        regardless of put_device() causing double free.
      
      * holders subdir holds reference to the disk device, so failure path
        should remove it to release resources properly which was missing.
      
      This patch fixes the above problems and while at it move partition
      slot busy check into add_partition() for completeness and inlines
      holders subdirectory creation.  Using separate function for it just
      obfuscates the code.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Abdel Benamrouche <draconux@gmail.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      88e34126
    • T
      block: allow deleting zero length partition · ec2cdedf
      Tejun Heo 提交于
      delete_partition() was noop for zero length partition.  As the
      addition code allows creating zero lenght partition and deletion is
      assumed to always succeed, this causes memory leak for zero length
      partitions.  Allow zero length partitions to end their meaningless
      lives.
      
      While at it, allow deleting zero lenght partition via
      BLKPG_DEL_PARTITION ioctl too.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      ec2cdedf
  2. 14 9月, 2008 1 次提交
  3. 26 7月, 2008 4 次提交
  4. 22 7月, 2008 1 次提交
  5. 30 4月, 2008 1 次提交
  6. 28 4月, 2008 1 次提交
    • F
      fat: detect media without partition table correctly · 0607fd02
      Frank Seidel 提交于
      I received a complaint that some FAT formated medias (e.g.  sd memory cards)
      trigger a "unknown partition table" message even though there is no partition
      table and they work correctly, while in general (when e.g.  formated with
      mkdosfs or even Windows Vista) this message is not shown.
      
      Currently this seems only to happen when the medias get formatted with Windows
      XP (and possibly Win 2000).  Then the boot indicator byte contains garbage
      (part of text message) and so do the other parts checked by msdos_paritition
      which then later triggers this message.
      
      References: novell bug #364365
      
      Most fat formatted media without partition table contains zeros in the boot
      indication and the other tested bytes and so falls through the checks in
      msdos_partition, leading it to return with 1 (all is fine).
      
      But some (e.g.  WinXP formatted) fat fomated medias don't use boot_ind and so
      the check fails and causes a "unkown partition table" warning eventhough there
      is none and everything would be fine.
      
      This additional check directly verifies if there is a fat formatted medium
      without a partition table.
      Signed-off-by: NFrank Seidel <fseidel@suse.de>
      Cc: Andreas Dilger <adilger@sun.com>
      Acked-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0607fd02
  7. 20 4月, 2008 1 次提交
  8. 08 2月, 2008 4 次提交
  9. 07 2月, 2008 1 次提交
  10. 25 1月, 2008 4 次提交
    • G
      Kobject: convert fs/* from kobject_unregister() to kobject_put() · 197b12d6
      Greg Kroah-Hartman 提交于
      There is no need for kobject_unregister() anymore, thanks to Kay's
      kobject cleanup changes, so replace all instances of it with
      kobject_put().
      
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      197b12d6
    • 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: get rid of kobject_add_dir · 4ff6abff
      Greg Kroah-Hartman 提交于
      kobject_create_and_add is the same as kobject_add_dir, so drop
      kobject_add_dir.
      
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4ff6abff
  11. 15 10月, 2007 1 次提交
  12. 13 10月, 2007 1 次提交
  13. 30 7月, 2007 2 次提交
  14. 20 7月, 2007 1 次提交
  15. 17 7月, 2007 2 次提交
  16. 12 7月, 2007 1 次提交
    • T
      sysfs: kill unnecessary attribute->owner · 7b595756
      Tejun Heo 提交于
      sysfs is now completely out of driver/module lifetime game.  After
      deletion, a sysfs node doesn't access anything outside sysfs proper,
      so there's no reason to hold onto the attribute owners.  Note that
      often the wrong modules were accounted for as owners leading to
      accessing removed modules.
      
      This patch kills now unnecessary attribute->owner.  Note that with
      this change, userland holding a sysfs node does not prevent the
      backing module from being unloaded.
      
      For more info regarding lifetime rule cleanup, please read the
      following message.
      
        http://article.gmane.org/gmane.linux.kernel/510293
      
      (tweaked by Greg to not delete the field just yet, to make it easier to
      merge things properly.)
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7b595756
  17. 10 7月, 2007 1 次提交
  18. 22 5月, 2007 2 次提交
  19. 11 5月, 2007 2 次提交
  20. 09 5月, 2007 1 次提交
  21. 08 5月, 2007 3 次提交
  22. 03 5月, 2007 1 次提交
  23. 17 3月, 2007 1 次提交