lkml.org 
[lkml]   [2006]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Why aren't partitions limited to fit within the device?
Neil Brown wrote:
> On Friday October 13, alan@lxorguk.ukuu.org.uk wrote:
> > No I think not. Any partition which is partly outside the disk should be
> > ignored entirely, that ensures it doesn't accidentally get mounted and
> > trashed by an HPA or similar mixup.
>
> Hmmm.. So Alan things a partially-outside-this-disk partition
> shouldn't show up at all, and Andries thinks it should.
> And both give reasonably believable justifications.
>
> Maybe we need a kernel parameter? How about this?

How about something in /proc or /sys to force the partition to show or not?

Maybe something like
echo 1 > /sys/block/hda/hda4/visible
?

Just an idea, my view would be not to introduce a new kernel parameter since
you have to reboot just to see it. It's quite possible this would effect
USB/Firewire storage devices. I have never been bitten by this problem
however it would be nice not to have to reboot to solve one like this say on
a slightly corrupted usb memory stick.

A possibility of using words instead of numbers, in the above example could
be one of: yes r/o no indicating full r/w, r/o, or not visible.

I'm not so sure if the size of the partition that is visible should be the
size according to the partition table or the size according to the start of
the partition to the end of the device. I would probably choose to have the
size to be the smaller number.

I was bitten by a 2.4 to 2.6 conversion where the size of the disk was 1
sector larger than what I saw in 2.4, but it was a minor problem which was
solved by masking off bit 0 of the size.

--
Lab tests show that use of micro$oft causes cancer in lab animals
Got Gas???
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-16 03:35    [W:0.152 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site