[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200809121807.28345.herton@mandriva.com.br>
Date: Fri, 12 Sep 2008 18:07:27 -0300
From: Herton Ronaldo Krzesinski <herton@...driva.com.br>
To: "Bob Copeland" <me@...copeland.com>
Cc: "Alan Stern" <stern@...land.harvard.edu>,
linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
bogdano@...driva.com.br,
"Luiz Fernando N. Capitulino" <lcapitulino@...driva.com.br>,
"Abdel Benamrouche" <draconux@...il.com>,
"Damien Lallement" <dlallement@...driva.com>,
"pterjan@...driva.com" <pterjan@...driva.com>,
"Jens Axboe" <axboe@...nel.dk>
Subject: Re: Partition check considered as error is breaking mounting in 2.6.27
On Friday 12 September 2008 17:27:54 Bob Copeland wrote:
> On Fri, Sep 12, 2008 at 4:14 PM, Herton Ronaldo Krzesinski
> <herton@...driva.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@...driva.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists