From owner-freebsd-geom@FreeBSD.ORG Tue Jun 15 09:11:34 2010 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F9A8106566B; Tue, 15 Jun 2010 09:11:34 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward3.mail.yandex.net (forward3.mail.yandex.net [77.88.46.8]) by mx1.freebsd.org (Postfix) with ESMTP id 172D98FC0C; Tue, 15 Jun 2010 09:11:33 +0000 (UTC) Received: from smtp1.mail.yandex.net (smtp1.mail.yandex.net [77.88.46.101]) by forward3.mail.yandex.net (Yandex) with ESMTP id 48A444D8804C; Tue, 15 Jun 2010 13:11:30 +0400 (MSD) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1276593090; bh=rNnwPs0f/kZ5+HRTe3We/37aOkNVUWkL4deK2RcX4N4=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:Content-Type; b=cxxD07wwxDaasMq8ef2AYW/eYqSTe1zUmtcf1CHJHRVKYl7Y+fu8ar7SnwA8OdgKY NhouZ4dpbu8iL2XS9e/AdrTuOt1QieKP8T2F2o7/Y5Kbz9eu741BsbidIsrIhlqeVw rVLxKV1a6BTgyXAvSuBjaB9/RR+u6r08v5yjM5U4= Received: from [127.0.0.1] (mail.kirov.so-cdu.ru [77.72.136.145]) by smtp1.mail.yandex.net (Yandex) with ESMTPSA id E0AFF29009A; Tue, 15 Jun 2010 13:11:29 +0400 (MSD) Message-ID: <4C1743BB.6030105@yandex.ru> Date: Tue, 15 Jun 2010 13:11:23 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: freebsd-geom@freebsd.org X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig79D80590E479BCE0D63ED981" X-Yandex-TimeMark: 1276593090 X-Yandex-Spam: 1 X-Yandex-Front: smtp1.mail.yandex.net Cc: Alexander Motin , Marcel Moolenaar , Konstantin Belousov Subject: RFC: make gpart(8) sector size aware X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2010 09:11:34 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig79D80590E479BCE0D63ED981 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Hi, All. I made a patch that makes gpart(8) sector size aware. There is a known issue described in bin/146277. gpart(8) uses type ASCLBA for size-related params and it doesn't know about provider's sector size when geom(8) parses arguments. By default it assumes that sector size is 512 bytes. And when user specifies size or= start offset params in humanized form they being calculated into sectors incorrectly. It seems that only gpart(8) uses G_TYPE_ASCLBA and there are none of anot= her consumers, so I deleted this type and replace it to G_TYPE_STRING. And no= w gpart(8) converts size-related params after geom(8) when it can know prov= ider's sector size. My patch is here: http://people.freebsd.org/~ae/gpart_sectorsize.diff Also I replaced `unsigned long long` type for `off_t` for unify code sinc= e it seems off_t used for media size in libgeom(8) and for DIOCGMEDIASIZE i= octl. --=20 WBR, Andrey V. Elsukov --------------enig79D80590E479BCE0D63ED981 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJMF0PAAAoJEAHF6gQQyKF6FTMH/3+EXSSDKBwvYbOInygo5R0M 7jgpbR4FYrVNsSkZcsZthHgiA5hg7QeS7ytbfTcaPx1fpz/QtOui6wBBhXqV/D/J z+yPmVoQKG/RAVgz+S9Geo4Mw43LZbwj0yMvw+kiSI6mnxREudCuIptGluUTe5I7 oqW0/AXVAkL9SI82tecVIz+Gh857vqicpEXkyQrwDZL5nmujkrJhm2Gq2wa0aogu nrD0YMAIyrG1BcMdkytLUO6HTjHh8LhVGwQnjBkyB+8pI9XoNSt3rFF4Pjfp7nwM sZNf+/DxF58GEFaqqGdiqQPd33AW5lpxyNGMgcw/mc5wECi+oEONfGd9iZrFelY= =GCHj -----END PGP SIGNATURE----- --------------enig79D80590E479BCE0D63ED981--