Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 May 2011 12:59:17 -0400
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        "Andrey V. Elsukov" <ae@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r221952 - head/sbin/geom/class/part
Message-ID:  <E2746EF4-47DD-48F7-A255-4BAF83736A5F@xcllnt.net>
In-Reply-To: <4DCFF0D5.3080309@FreeBSD.org>
References:  <201105151145.p4FBjDVR038539@svn.freebsd.org> <7B2294F7-8383-42F2-8127-759DBCD3540A@xcllnt.net> <4DCFF0D5.3080309@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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@xcllnt.net





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E2746EF4-47DD-48F7-A255-4BAF83736A5F>