From owner-freebsd-geom@FreeBSD.ORG Mon May 23 16:50:23 2011 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 C2291106564A; Mon, 23 May 2011 16:50:23 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward9.mail.yandex.net (forward9.mail.yandex.net [77.88.61.48]) by mx1.freebsd.org (Postfix) with ESMTP id 48F8D8FC15; Mon, 23 May 2011 16:50:23 +0000 (UTC) Received: from smtp6.mail.yandex.net (smtp6.mail.yandex.net [77.88.61.56]) by forward9.mail.yandex.net (Yandex) with ESMTP id D3BB2CE1277; Mon, 23 May 2011 20:50:20 +0400 (MSD) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1306169420; bh=5lPzeZkwLR/+uixxI+ZJX+E51kwz5AAst8HdEojL0M4=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type; b=pumlzOBlGp16tvyMTURwaJWKuaILIrHl/Xk4zc5mpy06GnZCZ5bSxnVrvisXTTDxo OvVh9iG12ZT92aWk/jUJLDBNbjzE6hN7QJtEvr5rdNZXlnbat10RDlb/wDr3aDh4Ns uiuMum57meVQiXjO5fZfAWjiM1MpPTXdxlnLlD4g= Received: from [178.141.6.24] (dynamic-178-141-6-24.kirov.comstar-r.ru [178.141.6.24]) by smtp6.mail.yandex.net (Yandex) with ESMTPSA id 5C53F2A8064; Mon, 23 May 2011 20:50:20 +0400 (MSD) Message-ID: <4DDA9046.8050902@yandex.ru> Date: Mon, 23 May 2011 20:50:14 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 MIME-Version: 1.0 To: Warner Losh References: <4DDA2F0B.2040203@yandex.ru> <6DF62987-141B-4BB3-8E8D-9966EBAC828B@bsdimp.com> In-Reply-To: <6DF62987-141B-4BB3-8E8D-9966EBAC828B@bsdimp.com> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig4B22ABB49CE22B6687A90B45" X-Yandex-Spam: 1 Cc: Marcel Moolenaar , Poul-Henning Kamp , freebsd-geom@freebsd.org Subject: Re: [RFC] Remove requirement of alignment to track from MBR scheme 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: Mon, 23 May 2011 16:50:23 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4B22ABB49CE22B6687A90B45 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On 23.05.2011 20:14, Warner Losh wrote: > Since we don't have a good review tool for the project, this may seem a= > little fragmented, but here goes: >=20 > + if (pp->sectorsize > 4096) > + return (EOPNOTSUPP); >=20 > What's the motivation for this? This seems unrelated to the problem at= > hand. It may be good, but 4096-byte sector size is very new and I'm no= t > sure MS-DOS can cope... :) There has been a long tradition in the MBR= , > however, of supporting different sector sizes to allow old-old-old > school floppies that had 128 or 256 byte sectors to work, as well as > allowing the supper-compressed 1.77MB floppies to work with their > 1024-byte (or was that 2048-byte?) sectors. Not sure this really > matters for reading, and for writing this case is so far beyond the edg= e > I'm not even sure why I bring it up[*] We have similar check in the g_part_mbr_probe function, and since we do not support sectorsize > 4096 in the probe method, i do not think we should try to create MBR for these providers. > In any event, I'd be tempted to use a #define for 4096 like > MBR_MAX_SECTOR_SIZE. >=20 > - msize =3D MIN(pp->mediasize / pp->sectorsize, UINT32_MAX); > + msize =3D MIN(pp->mediasize / pp->sectorsize, 2 * UINT32_MAX); >=20 > Why this change? I think that it is in two places. Currently we have limit to msize =3D UINT32_MAX, but partition in MBR has= start offset and size (not end offset). Theoretically it can have size that is up to UINT32_MAX sectors, also start offset can be UINT32_MAX. And for example, for 4T disk we can have 2 partitions with 2TB size. --=20 WBR, Andrey V. Elsukov --------------enig4B22ABB49CE22B6687A90B45 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iQEcBAEBAgAGBQJN2pBLAAoJEAHF6gQQyKF6gVUH/iNhIq4mBZbwY2tIQrcD6wo5 z/OaKTaV/TtfEd5T/0Kj5AKSUw/w2o+uK8ANPk1lucou/fpl6k5vIuQ/X3ZAA8ub Pijq0Cuj07wJahOz+JOEeR4cOoOlp4Qk5ifVsGuXR7SzUwuVecy+Zc91iZk1Oa0e P4NhyZSutUcya60jp9kiR9xt5ESl4V3R7pD0zJV8+ajzwBJ3JZwneGPX2n8IpA0U Iz+gAWXyzXyxzuPwSzCmw6uLa4OYqB8+0vrHrYQxLp21a50zqwh/LFgQPFyTYuYn +KxqTtkOmUM8HZvaztq9Sg+ub/WivYrouwSCyBNKkRqWvSZryfX1MrEint2J09g= =iDps -----END PGP SIGNATURE----- --------------enig4B22ABB49CE22B6687A90B45--