svn commit: r221952 - head/sbin/geom/class/part

Marcel Moolenaar marcel at xcllnt.net
Sun May 15 16:59:30 UTC 2011


On May 15, 2011, at 11:27 AM, Andrey V. Elsukov wrote:

> On 15.05.2011 19:09, Marcel Moolenaar wrote:
>>> Simplify the code a bit. For own providers GEOM_PART always provides
>>> "start" and "end" config attributes.
>>> 
>>> MFC after:	1 week
>> 
>> Just to make sure: the code deals with backward compatibility.
>> If you're aware of the issue, but don't care (anymore) about it,
>> then the change is fine (as I can't quite remember the case in
>> point, and I don't care enough to speculatively page in the
>> details).
> 
> g_part_dumpconf() function does set both pair of parameters:
> (start, end) and (offset, length). I do not see a way how one pair
> can not be present in XML tree.

/* ... paging in non-commit details ... */

The point is that this is what's happening *now*. This is not
what happened before. With support for logical partitions (i.e.
the EBR scheme), the total partition bounds and the effective
usable space are not the same. This is because the partition
starts with an MBR look-alike. The usable space is therefore
1 sector less and start at offset 1 (0-based) from the start
of the partition.

In any case: this particular scenario had to be handled and
for that we have offset+size (the usable area, as per GEOM
standards) and start+end (the total space occupied by the
partition) separately. They do not represent the same info.

The start+end parameters did not exist before and I had to add
that "later". To have the utility work with older kernels (that
did not support the EBR scheme) I added the fall-back to using
offset+length, because those two would encode what we needed
in that case.

As I said: I'm fine with the change, but please assess the
consequences of dropping the fall-back, for it may be better
to make this change on -current after 9-stable branched and
without the MFC.

That's it... Nothing major...

FYI,

-- 
Marcel Moolenaar
marcel at xcllnt.net




More information about the svn-src-head mailing list