Re: Partition check considered as error is breaking mounting in 2.6.27

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Friday, September 12, 2008 - 4:36 pm

On Fri, 12 Sep 2008 18:07:27 -0300
Herton Ronaldo Krzesinski <herton@mandriva.com.br> wrote:


Well gee.  Given a choice, I went and replied to the wrong thread. 
Here's what I think:

From: Andrew Morton <akpm@linux-foundation.org>

Herton Krzesinski reports that the error-checking changes in
04ebd4aee52b06a2c38127d9208546e5b96f3a19 ("block/ioctl.c and
fs/partition/check.c: check value returned by add_partition") cause his
buggy USB camera to no longer mount.  "The camera is an Olympus X-840. 
The original issue comes from the camera itself: its format program
creates a partition with an off by one error".

Buggy devices happen.  It is better for the kernel to warn and to proceed
with the mount.

Reported-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Cc: Abdel Benamrouche <draconux@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/partitions/check.c |    1 -
 1 file changed, 1 deletion(-)

diff -puN fs/partitions/check.c~rescan_partitions-make-device-capacity-errors-non-fatal fs/partitions/check.c
--- a/fs/partitions/check.c~rescan_partitions-make-device-capacity-errors-non-fatal
+++ a/fs/partitions/check.c
@@ -540,7 +540,6 @@ int rescan_partitions(struct gendisk *di
 		if (from + size > get_capacity(disk)) {
 			printk(KERN_ERR " %s: p%d exceeds device capacity\n",
 				disk->disk_name, p);
-			continue;
 		}
 		res = add_partition(disk, p, from, size, state->parts[p].flags);
 		if (res) {
_

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Partition check considered as error is breaking mounting i ..., Herton Ronaldo Krzes ..., (Fri Sep 12, 10:01 am)
Re: Partition check considered as error is breaking mounti ..., Herton Ronaldo Krzes ..., (Fri Sep 12, 11:02 am)
Re: Partition check considered as error is breaking mounti ..., Herton Ronaldo Krzes ..., (Fri Sep 12, 1:14 pm)
Re: Partition check considered as error is breaking mounti ..., Herton Ronaldo Krzes ..., (Fri Sep 12, 1:17 pm)
Re: Partition check considered as error is breaking mounti ..., Herton Ronaldo Krzes ..., (Fri Sep 12, 2:07 pm)
Re: Partition check considered as error is breaking mounti ..., Andrew Morton, (Fri Sep 12, 4:36 pm)