Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jun 2010 13:11:23 +0400
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        freebsd-geom@freebsd.org
Cc:        Alexander Motin <mav@FreeBSD.org>, Marcel Moolenaar <marcel@FreeBSD.org>, Konstantin Belousov <kib@FreeBSD.org>
Subject:   RFC: make gpart(8) sector size aware
Message-ID:  <4C1743BB.6030105@yandex.ru>

next in thread | raw e-mail | index | archive | help
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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C1743BB.6030105>