Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 May 2011 09:28:51 +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:  <4DDB4213.1030008@yandex.ru>
In-Reply-To: <AAB1B614-149F-49E3-9A9C-79B121E1B719@bsdimp.com>
References:  <4DDA2F0B.2040203@yandex.ru> <6DF62987-141B-4BB3-8E8D-9966EBAC828B@bsdimp.com> <4DDA9046.8050902@yandex.ru> <AAB1B614-149F-49E3-9A9C-79B121E1B719@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)
--------------enigD549C440B29C497219B55B68
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: quoted-printable

On 23.05.2011 21:39, Warner Losh wrote:
>>> In any event, I'd be tempted to use a #define for 4096 like
>>> MBR_MAX_SECTOR_SIZE.
>>>
>>> -msize =3D MIN(pp->mediasize / pp->sectorsize, UINT32_MAX);
>>> +msize =3D MIN(pp->mediasize / pp->sectorsize, 2 * UINT32_MAX);
>>>
>>> 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
> Are there any extant examples of this?  The CW is that the maximum size=
 for an MBR device is 2TB.

I tried with 6T md(4) device and it is possible to create 2 partitions
with 2T size, but it is inconvenient to do:

# gpart show md0
=3D>         1  8589934589  md0  MBR  (5.5T)
           1  8589934589       - free -  (4T)

# gpart add -t freebsd -s 2T md0
gpart: Invalid argument
# gpart add -t freebsd -s `printf %d 0xFFFFFFFE` md0
md0s1 added
# gpart add -t freebsd md0
md0s2 added
# gpart show md0
=3D>         1  8589934589  md0  MBR  (5.5T)
           1  4294967294    1  freebsd  (2T)
  4294967295  4294967295    2  freebsd  (2T)

So, i updated the patch and removed this support. Also i removed some
checks that scheme independent code does.

--=20
WBR, Andrey V. Elsukov


--------------enigD549C440B29C497219B55B68
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)

iQEcBAEBAgAGBQJN20IaAAoJEAHF6gQQyKF6dU4IAJlQSGVZdQIkQZvfgNc8ErKm
0sWNd1r+QwG/XgeWDh9gIwgbQ06VlhoIIBL1vwqJeQsuxDPHCVrm5p8+KM7rvbx5
+mXsOP+xgK/qIVF1ZDMq9BKrRb9cDi8OfDiHGUs2ersjZMnybcj3LdLjAFCb9oe5
rQuR44nNSu3hJRD+Go/OcE7NiKuDTuKc+Yy5FK2nZyR/fmKtKzdj3KYuo9X5Ik+S
7b+1ZwXUKZcYUctqt1Yuh5lZZLmOPqzroKsOk4wuWzAnzp1bfwx+YTnEhz+t1Ai8
hKhR+6XfZlXxFXohEHy9Z5FyXKlu8R0AQrpBnp/eJ6unmd3V3cBZEuU2YFCBBL4=
=XtEk
-----END PGP SIGNATURE-----

--------------enigD549C440B29C497219B55B68--



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