From owner-cvs-src-old@FreeBSD.ORG Sat Jul 9 12:02:50 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03C6510656F2 for ; Sat, 9 Jul 2011 12:02:50 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A8D098FC23 for ; Sat, 9 Jul 2011 12:02:48 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p69C2mGr012025 for ; Sat, 9 Jul 2011 12:02:48 GMT (envelope-from ae@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p69C2mt8012024 for cvs-src-old@freebsd.org; Sat, 9 Jul 2011 12:02:48 GMT (envelope-from ae@repoman.freebsd.org) Message-Id: <201107091202.p69C2mt8012024@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to ae@repoman.freebsd.org using -f From: "Andrey V. Elsukov" Date: Sat, 9 Jul 2011 12:02:40 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_8 Subject: cvs commit: src/sbin/geom/class/part geom_part.c gpart.8 X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jul 2011 12:02:50 -0000 ae 2011-07-09 12:02:40 UTC FreeBSD src repository Modified files: (Branch: RELENG_8) sbin/geom/class/part geom_part.c gpart.8 Log: SVN rev 223880 on 2011-07-09 12:02:40Z by ae MFC r221363,221967,222263,222264,222630,222631,222819,223158,223355: r221363: Add "-a alignment" option to gpart(8). When it specified gpart(8) tries to align partition start offset and size to be multiple of alignment value. r221967: Some partitioning schemes want to have partitions that are aligned with geometry. And they do recalculation of user specified parameters. MBR, PC98, VTOC8, EBR schemes are doing that. For these schemes an auto alignment feature (ie. gpart add -a alignment) would not work. But it can work for GPT and BSD schemes. BSD scheme usualy is created inside MBR, so we can use knowledge about offset of MBR partition to calculate aligned values for BSD partitions. Use "offset" attribute of the parent provider for better alignment. r222263: Fix calculation of alignment for odd values. Also do not change value when it is already aligned. r222264: Simplify ALIGNDOWN macro. r222630: Use stripesize and stripeoffset in the automatic calculation of partition offsets. If user requests specific alignment and provider's stripesize is not zero, then use a least common multiple from the stripesize and user specified value. Also fix "gpart resize" implementation: do not try to align the partition size, because the start offset may be not aligned. Instead align the end offset and then calculate size. Also use stripesize and stripeoffset for "gpart resize" command. r222631: Always use LCM when stripesize > 0. r222819: Do not use LCM from stripesize and user specified alignment value. When user wants have specific alignment - do what user wants. Use stripesize as alignment value in case, when some of gpart's arguments are ommitted for automatic calculation. Suggested by: mav r223158: Add "alignment" param to the request before calling gpart_autofill(). r223355: The "size" param needs no adjusting to stripeoffset. Reported by: Kris Moore Revision Changes Path 1.20.2.17 +94 -33 src/sbin/geom/class/part/geom_part.c 1.7.2.16 +29 -2 src/sbin/geom/class/part/gpart.8