From owner-svn-src-all@FreeBSD.ORG Sun May 15 16:59:30 2011 Return-Path: <owner-svn-src-all@FreeBSD.ORG> Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFF831065670; Sun, 15 May 2011 16:59:30 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 5C64D8FC0C; Sun, 15 May 2011 16:59:30 +0000 (UTC) Received: from [10.75.44.147] (wsp04373635wss.cr.net.cable.rogers.com [24.235.98.20]) (authenticated bits=0) by mail.xcllnt.net (8.14.4/8.14.4) with ESMTP id p4FGxNJI087601 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 15 May 2011 09:59:28 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Marcel Moolenaar <marcel@xcllnt.net> In-Reply-To: <4DCFF0D5.3080309@FreeBSD.org> Date: Sun, 15 May 2011 12:59:17 -0400 Content-Transfer-Encoding: 7bit Message-Id: <E2746EF4-47DD-48F7-A255-4BAF83736A5F@xcllnt.net> References: <201105151145.p4FBjDVR038539@svn.freebsd.org> <7B2294F7-8383-42F2-8127-759DBCD3540A@xcllnt.net> <4DCFF0D5.3080309@FreeBSD.org> To: "Andrey V. Elsukov" <ae@FreeBSD.org> X-Mailer: Apple Mail (2.1084) 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" <svn-src-all.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-all>, <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all> List-Post: <mailto:svn-src-all@freebsd.org> List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-all>, <mailto:svn-src-all-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 15 May 2011 16:59:30 -0000 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