[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Patch] Discard incorrect nested partitions (fixes #29956)

From: Grégoire Sutre
Subject: Re: [Patch] Discard incorrect nested partitions (fixes #29956)
Date: Tue, 06 Jul 2010 23:55:38 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100620 Icedove/3.0.5


This is the reworked version of the patch.

There are few ramifications of this patch. First of all some partitions
which are just barely outside of the host partition will lead to
something like "partition not found" errors in grub-probe. This message
should be more informative (the easiest way is to issue a warning in
grub-probe if partitions are discarded except some cases where it's
known not to affect the functionality like 'd' "subpartitions", probably
such a warning in grub proper would be too annoying though).

There is now a grub_dprintf where the partition is discarded.

Then if you check partitions when iterating no need to recheck in

I simplified the check in grub_disk_adjust_range: no need to check for
the ``ancestor'' partitions, but we still check for the given partition.

The patch still accepts sub-partitions that start at the same
(absolute) offset as the parent.  For instance, in the above example,
ls -l in grub gives both (hd1,msdos1) and (hd1,msdos1,bsd1).  Should
we discard (hd0,msdos1,bsd1), i.e. require that sub-partitions start
at a strictly positive relative offset?

I left this out.  Even if it introduces redundancy, it's actually nice
to see (hd1,msdos1,bsd1) in ls -l (e.g., if bsd1 is the only partition
in the bsd label).


Attachment: strict-partition-nesting.diff
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]