Date: Mon, 23 May 2011 20:50:14 +0400 From: "Andrey V. Elsukov" <bu7cher@yandex.ru> To: Warner Losh <imp@bsdimp.com> Cc: Marcel Moolenaar <marcel@freebsd.org>, Poul-Henning Kamp <phk@freebsd.org>, freebsd-geom@freebsd.org Subject: Re: [RFC] Remove requirement of alignment to track from MBR scheme Message-ID: <4DDA9046.8050902@yandex.ru> In-Reply-To: <6DF62987-141B-4BB3-8E8D-9966EBAC828B@bsdimp.com> References: <4DDA2F0B.2040203@yandex.ru> <6DF62987-141B-4BB3-8E8D-9966EBAC828B@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DDA9046.8050902>