27 Aug, 2006

1 commit

  • The current sun disklabel code uses a signed int for the sector count.
    When partitions larger than 1 TB are used, the cast to a sector_t causes
    the partition sizes to be invalid:

    # cat /proc/paritions | grep sdan
    66 112 2146435072 sdan
    66 115 9223372036853660736 sdan3
    66 120 9223372036853660736 sdan8

    This patch switches the sector count to an unsigned int to fix this.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Jeff Mahoney
     

01 Aug, 2006

1 commit


11 Jul, 2006

1 commit

  • Change the partition code in fs/partitions/check.c to initialize a newly
    detected partition's policy field with that of the containing block device
    (see patch below).

    My reasoning is that function set_disk_ro() in block/genhd.c modifies the
    policy field (read-only indicator) of a disk and all contained partitions.
    When a partition is detected after the call to set_disk_ro(), the policy
    field of this partition will currently not inherit the disk's policy field.
    This behavior poses a problem in cases where a block device can be
    'logically de- and reactivated' like e.g. the s390 DASD driver because
    partition detection may run after the policy field has been modified.

    Signed-off-by: Peter Oberparleiter
    Acked-by: Al Viro
    Makes-sense-to: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Oberparleiter
     

01 Jul, 2006

1 commit


27 Jun, 2006

4 commits


23 Jun, 2006

2 commits

  • Sometimes partitions claim to be larger than the reported capacity of a
    disk device. This patch makes the kernel warn about those partitions.

    We still permit these patitions to be used. Quoting Andries Brouwer
    :

    Case 1: The kernel is mistaken about the size of the disk. (There are
    commands to clip a disk to a certain capacity, there are jumpers to tell a
    disk that it should report a certain capacity etc. Usually this is because
    of BIOS bugs. In bad cases the machine will crash in the BIOS and hence fail
    to boot if the disk reports full capacity.) In such cases actually accessing
    the blocks of the partition may work fine, or may work fine after running an
    unclip utility. I wrote "setmax" some years ago precisely for this reason.

    Case 2: There was a messy partition table (maybe just a rounding error) but
    the actual filesystem on the partition is contained in the physical disk.
    Now using the filesystem goes without problem.

    Case 3: Both partition and filesystem extend beyond the end of the disk. In
    forensic or debugging situations one often uses a copy of the start of a
    disk. Now access beyond the end gives an expected I/O error.

    Signed-off-by: Mike Miller
    Signed-off-by: Stephen Cameron
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Miller
     
  • Add read_mapping_page() which is used for callers that pass
    mapping->a_ops->readpage as the filler for read_cache_page. This removes
    some duplication from filesystem code.

    Signed-off-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pekka Enberg
     

22 Jun, 2006

1 commit

  • Like the SUBSYTEM= key we find in the environment of the uevent, this
    creates a generic "subsystem" link in sysfs for every device. Userspace
    usually doesn't care at all if its a "class" or a "bus" device. This
    provides an unified way to determine the subsytem of a device, regardless
    of the way the driver core has created it.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

13 May, 2006

1 commit

  • Make sure to clear the driverfs_dev pointer when we do del_gendisk() (on
    disk removal), so that other users that may still have a ref to the disk
    won't try to use the stale pointer.

    Also move the KOBJ_REMOVE uevent handler up, so that the uevent still
    has access to the driverfs_dev data.

    This all should hopefully fix the problems with MMC umounts after device
    removals that caused commit 56cf6504fc1c0c221b82cebc16a444b684140fb7 and
    its reversal (1a2acc9e9214699a99389e323e6686e9e0e2ca67).

    Original problem reported by Todd Blumer and others.

    Acked-by: Greg KH
    Cc: Russell King
    Cc: James Bottomley
    Cc: Erik Mouw
    Cc: Andrew Vasquez
    Cc: Todd Blumer
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

18 Apr, 2006

1 commit

  • As noted further on the this file, some block devices have a / in their
    name, so fix the "block:..." symlink name the same as the /sys/block name.

    Signed-off-by: Stephen Rothwell
    Cc: Al Viro
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Stephen Rothwell
     

15 Apr, 2006

1 commit

  • [BLOCK] delay all uevents until partition table is scanned

    Here we delay the annoucement of all block device events until the
    disk's partition table is scanned and all partition devices are already
    created and sysfs is populated.

    We have a bunch of old bugs for removable storage handling where we
    probe successfully for a filesystem on the raw disk, but at the
    same time the kernel recognizes a partition table and creates partition
    devices.
    Currently there is no sane way to tell if partitions will show up or not
    at the time the disk device is announced to userspace. With the delayed
    events we can simply skip any probe for a filesystem on the raw disk when
    we find already present partitions.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

29 Mar, 2006

1 commit


28 Mar, 2006

3 commits

  • This removes statically assigned platform numbers and reworks the
    powerpc platform probe code to use a better mechanism. With this,
    board support files can simply declare a new machine type with a
    macro, and implement a probe() function that uses the flattened
    device-tree to detect if they apply for a given machine.

    We now have a machine_is() macro that replaces the comparisons of
    _machine with the various PLATFORM_* constants. This commit also
    changes various drivers to use the new macro instead of looking at
    _machine.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     
  • Remove all the CONFIG_SYSFS stuff. That's supposed to all be implemented up
    in header files.

    Yes, the CONFIG_SYSFS=n data structures will be a little larger than
    necessary, but that's a tradeoff we can decide to make.

    Cc: Jun'ichi Nomura
    Cc: Alasdair G Kergon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Creating "slaves" and "holders" directories in /sys/block/ and
    creating "holders" directory under /sys/block//

    Signed-off-by: Jun'ichi Nomura
    Cc: Alasdair G Kergon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jun'ichi Nomura
     

27 Mar, 2006

1 commit

  • Semaphore to mutex conversion.

    The conversion was generated via scripts, and the result was validated
    automatically via a script as well.

    Signed-off-by: Ingo Molnar
    Cc: Eric Van Hensbergen
    Cc: Robert Love
    Cc: Thomas Gleixner
    Cc: David Woodhouse
    Cc: Neil Brown
    Cc: Trond Myklebust
    Cc: Dave Kleikamp
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

24 Mar, 2006

1 commit


09 Mar, 2006

1 commit

  • DASD allows to open a device as soon as gendisk is registered, which means the
    device is a fake device (capacity=0) and we do know nothing about blocksize
    and partitions at that point of time. In case the device is opened by
    someone, the bdev and inode creation is done with the fake device info and the
    following partition detection code is just using the wrong data.

    To avoid this modify the DASD state machine to make sure that the open is
    rejected until the device analysis is either finished or an unformatted device
    was detected.

    Signed-off-by: Horst Hummel
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Horst Hummel
     

17 Jan, 2006

1 commit

  • The Rio Karma portable MP3 player has its own proprietary partition table.

    The partition layout is similar to a DOS boot sector but it begins at a
    different offset and uses a different magic number (0xAB56 instead of
    0xAA55). Add support for it to enable mounting the device.

    Signed-off-by: Bob Copeland
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bob Copeland
     

09 Jan, 2006

1 commit

  • balamurugan reported a problem where it was possible to have
    the various Acorn partition types selected in the configuration,
    but ACORN_PARTITION disabled. Since ACORN_PARTITION controls
    whether we build fs/partitions/acorn.c, this lead to undefined
    references to the adfspart_check_TYPE symbols.

    Fix this by making the Acorn partition type symbols depend on
    ACORN_PARTITION.

    Signed-off-by: Russell King

    Russell King
     

07 Jan, 2006

2 commits

  • Sanitize some s390 Kconfig options. We have ARCH_S390, ARCH_S390X,
    ARCH_S390_31, 64BIT, S390_SUPPORT and COMPAT. Replace these 6 options by
    S390, 64BIT and COMPAT.

    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Martin Schwidefsky
     
  • Moved definition of CMS volume label to vtoc.h and modify partitions/ibm.c to
    use this volume label definition instead of anonymous array.

    Signed-off-by: Peter Oberparleiter
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Oberparleiter
     

05 Jan, 2006

2 commits


23 Dec, 2005

1 commit


08 Nov, 2005

1 commit


07 Nov, 2005

1 commit


01 Nov, 2005

1 commit

  • Instead of having ->read_sectors and ->write_sectors, combine the two
    into ->sectors[2] and similar for the other fields. This saves a branch
    several places in the io path, since we don't have to care for what the
    actual io direction is. On my x86-64 box, that's 200 bytes less text in
    just the core (not counting the various drivers).

    Signed-off-by: Jens Axboe

    Jens Axboe
     

29 Oct, 2005

2 commits


28 Oct, 2005

1 commit

  • struct gendisk has these two fields: stamp, stamp_idle. Update to
    stamp_idle is always in sync with stamp and they are always the same.
    Therefore, it does not add any value in having two fields tracking
    same timestamp. Suggest to remove it.

    Also, we should only update gendisk stats with non-zero value.
    Advantage is that we don't have to needlessly calculate memory address,
    and then add zero to the content.

    Signed-off-by: Ken Chen
    Signed-off-by: Jens Axboe

    Chen, Kenneth W
     

26 Jun, 2005

1 commit

  • This patch makes the following changes to the msdos partition code:
    - remove CONFIG_NEC98_PARTITION leftovers
    - make parse_bsd static

    This patch was already ACK'ed by Andries Brouwer.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

07 May, 2005

1 commit

  • This change from March 3rd causes the partition parsing code to ignore
    partitions which have a signature byte of zero. Turns out that more people
    have such partitions than we expected, and their device numbering is coming up
    wrong in post-2.6.11 kernels.

    So revert the change while we think about the problem a bit more.

    Cc: Andries Brouwer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

19 Apr, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds