From: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
To: "Bob Copeland" <me@bobcopeland.com>
Cc: "Alan Stern" <stern@rowland.harvard.edu>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
bogdano@mandriva.com.br,
"Luiz Fernando N. Capitulino" <lcapitulino@mandriva.com.br>,
"Abdel Benamrouche" <draconux@gmail.com>,
"Damien Lallement" <dlallement@mandriva.com>,
"pterjan@mandriva.com" <pterjan@mandriva.com>,
"Jens Axboe" <axboe@kernel.dk>
Subject: Re: Partition check considered as error is breaking mounting in 2.6.27
Date: Fri, 12 Sep 2008 18:07:27 -0300 [thread overview]
Message-ID: <200809121807.28345.herton@mandriva.com.br> (raw)
In-Reply-To: <b6c5339f0809121327k5fd6c980le0ec5d46be089af2@mail.gmail.com>
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
next prev parent reply other threads:[~2008-09-12 21:07 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-12 17:01 Herton Ronaldo Krzesinski
2008-09-12 17:36 ` Alan Stern
2008-09-12 17:59 ` Bob Copeland
2008-09-12 18:21 ` Alan Stern
2008-09-12 18:02 ` Herton Ronaldo Krzesinski
2008-09-12 18:40 ` Alan Stern
2008-09-12 20:14 ` Herton Ronaldo Krzesinski
2008-09-12 20:17 ` Herton Ronaldo Krzesinski
2008-09-12 20:27 ` Bob Copeland
2008-09-12 21:07 ` Herton Ronaldo Krzesinski [this message]
2008-09-12 23:36 ` Andrew Morton
2008-09-12 23:46 ` David Brownell
2008-09-12 23:52 ` Andrew Morton
2008-09-12 23:59 ` David Brownell
2008-09-13 0:13 ` Andrew Morton
2008-09-13 2:22 ` Alan Stern
2008-10-08 16:01 ` Kay Sievers
2008-10-09 14:04 ` Kay Sievers
2008-10-13 9:01 ` Jens Axboe
[not found] <bblSy-60j-19@gated-at.bofh.it>
[not found] ` <bbnhC-7Vd-5@gated-at.bofh.it>
2008-09-13 9:24 ` Bodo Eggert
2008-09-13 23:25 ` Herton Ronaldo Krzesinski
2008-09-14 12:36 ` Bodo Eggert
2008-09-15 17:01 ` Bill Davidsen
-- strict thread matches above, loose matches on Subject: below --
2008-09-12 17:32 Toralf Förster
2008-09-12 16:56 Herton Ronaldo Krzesinski
2008-09-12 23:34 ` Andrew Morton
2008-09-13 15:54 ` Bill Davidsen
2008-09-13 22:56 ` Herton Ronaldo Krzesinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200809121807.28345.herton@mandriva.com.br \
--to=herton@mandriva.com.br \
--cc=axboe@kernel.dk \
--cc=bogdano@mandriva.com.br \
--cc=dlallement@mandriva.com \
--cc=draconux@gmail.com \
--cc=lcapitulino@mandriva.com.br \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=me@bobcopeland.com \
--cc=pterjan@mandriva.com \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®