lkml.org 
[lkml]   [2008]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    SubjectRe: Partition check considered as error is breaking mounting in 2.6.27
    Date
    On Friday 12 September 2008 17:27:54 Bob Copeland wrote:
    > On Fri, Sep 12, 2008 at 4:14 PM, Herton Ronaldo Krzesinski
    > <herton@mandriva.com.br> wrote:
    > > diff --git a/fs/partitions/check.c b/fs/partitions/check.c
    > > index 7d6b34e..15c70df 100644
    > > --- a/fs/partitions/check.c
    > > +++ b/fs/partitions/check.c
    > > @@ -499,9 +499,9 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev)
    > > if (!size)
    > > continue;
    > > if (from + size > get_capacity(disk)) {
    > > - printk(KERN_ERR " %s: p%d exceeds device capacity\n",
    > > + printk(KERN_WARNING
    > > + " %s: p%d exceeds device capacity\n",
    > > disk->disk_name, p);
    > > - continue;
    >
    > It might make sense to comment here that we intentionally want to add the
    > partition anyway. That might keep someone from re-adding the continue (same
    > patch has already come up at least 3 times).
    >

    Yes, here goes a new version:

    ___

    fs/partition/check.c: revert part of commit 04ebd4aee52b06a2c38127d9208546e5b96f3a19

    Fix regression introduced by commit 04ebd4aee52b06a2c38127d9208546e5b96f3a19,
    where kernel changed behaviour making fatal the error when some partition
    exceeds the limit of the device size. Some buggy devices become inacessible
    because of errors in their partition table if the error is fatal.

    This closes http://bugzilla.kernel.org/show_bug.cgi?id=11554

    Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>

    diff --git a/fs/partitions/check.c b/fs/partitions/check.c
    index 7d6b34e..2dd346d 100644
    --- a/fs/partitions/check.c
    +++ b/fs/partitions/check.c
    @@ -499,9 +499,13 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev)
    if (!size)
    continue;
    if (from + size > get_capacity(disk)) {
    - printk(KERN_ERR " %s: p%d exceeds device capacity\n",
    + printk(KERN_WARNING
    + " %s: p%d exceeds device capacity\n",
    disk->disk_name, p);
    - continue;
    + /* note: we don't want to break access to
    + * devices with buggy partition tables, so we
    + * don't want to fail here, just go on and
    + * add partition */
    }
    res = add_partition(disk, p, from, size, state->parts[p].flags);
    if (res) {


    --
    []'s
    Herton


    \
     
     \ /
      Last update: 2008-09-12 23:09    [W:0.033 / U:0.340 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site