[PATCH 0/3] Series short description

[PATCH 0/3] Series short description

am 19.09.2011 18:52:23 von Lukasz Orlowski

VGhlIGZvbGxvd2luZyBzZXJpZXMgaW1wbGVtZW50cy4uLgoKLS0tCgpMdWth c3ogT3Jsb3dza2kg
KDMpOgogICAgICBDcmVhdGU6IEFsbG93IHRvIGNyZWF0ZSB0d28gdm9sdW1l cyBvZiBkaWZmZXJl
bnQgc2l6ZXMgd2l0aGluIG9uZSBjb250YWluZXIKICAgICAgQ3JlYXRlOiBV bm5lY2Vzc2FyeSBw
cm9tcHQgYWJvdXQgZGV2aWNlIGJlaW5nIGJ1c3kKICAgICAgQ3JlYXRlOiBJ bmNvcnJlY3QgbWVz
c2FnZSB3aGVuIGNyZWF0aW5nIGEgdm9sdW1lIHdpdGggZXhwbGljaXQgbWQg ZGV2IG5hbWUKCgog
Q3JlYXRlLmMgICAgICB8ICAgMjYgKysrKysrKysrKysrKysrLS0tLS0tLS0t LS0KIHN1cGVyLWlu
dGVsLmMgfCAgIDE2ICsrKysrKysrKysrKystLS0KIDIgZmlsZXMgY2hhbmdl ZCwgMjggaW5zZXJ0
aW9ucygrKSwgMTQgZGVsZXRpb25zKC0pCgotLSAKU2lnbmF0dXJlCi0tLS0t LS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLQpJbnRl
bCBUZWNobm9sb2d5IFBvbGFuZCBzcC4geiBvLm8uCnogc2llZHppYmEgdyBH ZGFuc2t1CnVsLiBT
bG93YWNraWVnbyAxNzMKODAtMjk4IEdkYW5zawoKU2FkIFJlam9ub3d5IEdk YW5zayBQb2xub2Mg
dyBHZGFuc2t1LCAKVklJIFd5ZHppYWwgR29zcG9kYXJjenkgS3Jham93ZWdv IFJlamVzdHJ1IFNh
ZG93ZWdvLCAKbnVtZXIgS1JTIDEwMTg4MgoKTklQIDk1Ny0wNy01Mi0zMTYK S2FwaXRhbCB6YWts
YWRvd3kgMjAwLjAwMCB6bAoKVGhpcyBlLW1haWwgYW5kIGFueSBhdHRhY2ht ZW50cyBtYXkgY29u
dGFpbiBjb25maWRlbnRpYWwgbWF0ZXJpYWwgZm9yCnRoZSBzb2xlIHVzZSBv ZiB0aGUgaW50ZW5k
ZWQgcmVjaXBpZW50KHMpLiBBbnkgcmV2aWV3IG9yIGRpc3RyaWJ1dGlvbgpi eSBvdGhlcnMgaXMg
c3RyaWN0bHkgcHJvaGliaXRlZC4gSWYgeW91IGFyZSBub3QgdGhlIGludGVu ZGVkCnJlY2lwaWVu
dCwgcGxlYXNlIGNvbnRhY3QgdGhlIHNlbmRlciBhbmQgZGVsZXRlIGFsbCBj b3BpZXMuCg==

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 1/3] Create: Allow to create two volumes of different sizes

am 19.09.2011 18:52:31 von Lukasz Orlowski

QWxsb3dzIHRvIGNyZWF0ZSBSQUlEIDUgdm9sdW1lIG9uIDMgZGlza3MgYW5k IHRoZW4gUkFJRCAx
IHZvbHVtZSBvbiAyCmRpc2tzIHdpdGhpbmcgdGhlIHNhbWUgY29udGFpbmVy LgoKU2lnbmVkLW9m
Zi1ieTogTHVrYXN6IE9ybG93c2tpIDxsdWthc3oub3Jsb3dza2lAaW50ZWwu Y29tPgotLS0KIHN1
cGVyLWludGVsLmMgfCAgICA2ICsrKysrKwogMSBmaWxlcyBjaGFuZ2VkLCA2 IGluc2VydGlvbnMo
KyksIDAgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvc3VwZXItaW50ZWwu YyBiL3N1cGVyLWlu
dGVsLmMKaW5kZXggYTc4ZDcyMy4uNjE2ODUzYiAxMDA2NDQKLS0tIGEvc3Vw ZXItaW50ZWwuYwor
KysgYi9zdXBlci1pbnRlbC5jCkBAIC01MDQxLDYgKzUwNDEsMTIgQEAgc3Rh dGljIGludCB2YWxp
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jAwMCB6bAoKVGhp
cyBlLW1haWwgYW5kIGFueSBhdHRhY2htZW50cyBtYXkgY29udGFpbiBjb25m aWRlbnRpYWwgbWF0
ZXJpYWwgZm9yCnRoZSBzb2xlIHVzZSBvZiB0aGUgaW50ZW5kZWQgcmVjaXBp ZW50KHMpLiBBbnkg
cmV2aWV3IG9yIGRpc3RyaWJ1dGlvbgpieSBvdGhlcnMgaXMgc3RyaWN0bHkg cHJvaGliaXRlZC4g
SWYgeW91IGFyZSBub3QgdGhlIGludGVuZGVkCnJlY2lwaWVudCwgcGxlYXNl IGNvbnRhY3QgdGhl
IHNlbmRlciBhbmQgZGVsZXRlIGFsbCBjb3BpZXMuCg==

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 2/3] Create: Unnecessary prompt about device being busy

am 19.09.2011 18:52:38 von Lukasz Orlowski

U2hvdWxkIHRoZSBnZW9tZXRyeSB2YWxpZGF0aW9uIGZhaWwsIG1kYWRtIGV4 aXRzIHdpdGggZXJy
b3IgY29kZSAyIGlmIHRoZQpzdHlsZSBvZiBtZXRhZGF0YSBpcyBub3QgZXhw bGljaXRseSBzZXQg
dG8gaW1zbS4gUHJpb3IgdG8gdGhhdCBob3dldmVyIGl0CmF0dGVtcHRzIHRv IGV4Y2x1c2l2ZWx5
IG9wZW4gYSBkZXZpY2UgYmxvY2sgZmlsZS4gSWYgaXQgc3VjY2VlZHMgaXQg c2F5cwp0aGF0IHRo
ZSBkZXZpY2UgaXMgbm90IHN1aXRhYmxlIGZvciBhbnkga2luZCBvZiBhcnJh eSwgb3RoZXJ3aXNl
IGl0IGp1c3QKc2F5cyB0aGF0IHRoZSBkZXZpY2UgaXMgYnVzeS4gVGhlIGZp bGUgb3BlbmVkIGlz
IG5vdCBjbG9zZWQgYWZ0ZXJ3YXJkcy4KClNpZ25lZC1vZmYtYnk6IEx1a2Fz eiBPcmxvd3NraSA8
b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ChzKS4gQW55IHJldmlldyBv ciBkaXN0cmlidXRp
b24KYnkgb3RoZXJzIGlzIHN0cmljdGx5IHByb2hpYml0ZWQuIElmIHlvdSBh cmUgbm90IHRoZSBp
bnRlbmRlZApyZWNpcGllbnQsIHBsZWFzZSBjb250YWN0IHRoZSBzZW5kZXIg YW5kIGRlbGV0ZSBh
bGwgY29waWVzLgo=

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 3/3] Create: Incorrect message when creating a volume with

am 19.09.2011 18:52:45 von Lukasz Orlowski

QXBwZWFycyB3aGVuIG9uZSBhdHRlbXB0cyB0byBjcmVhdGUgUkFJRCAxIHZv bHVtZSBvbiAyIGRp
c2tzIHdpdGhpbiBhCmNvbnRhaW5lciB3aXRoIGFuIGV4aXN0aW5nIFJBSUQg NSB2b2x1bWUgb24g
MyBkaXNrcyBhbmQgc3BlY2lmaWVzIHRoZQptZCBkZXZpY2UgZXhwbGljaXRs eSAoZS5nLiAvZGV2
L21kMTI3KS4gSW5zdGVhZCBvZiBzYXlpbmcgdGhhdCBzdWNoIHZvbHVtZQpj YW5ub3QgYmUgY3Jl
YXRlZCBpdCBzYXlzIHRoYXQgdGhlIGRldmljZXMgaGF2ZSBpbnN1ZmZpY2ll bnQgc2l6ZS4KClNp
Z25lZC1vZmYtYnk6IEx1a2FzeiBPcmxvd3NraSA8bHVrYXN6Lm9ybG93c2tp QGludGVsLmNvbT4K
LS0tCiBDcmVhdGUuYyAgICAgIHwgICAgOCArKysrKystLQogc3VwZXItaW50 ZWwuYyB8ICAgMTAg
KysrKysrKy0tLQogMiBmaWxlcyBjaGFuZ2VkLCAxMyBpbnNlcnRpb25zKCsp LCA1IGRlbGV0aW9u
cygtKQoKZGlmZiAtLWdpdCBhL0NyZWF0ZS5jIGIvQ3JlYXRlLmMKaW5kZXgg NDdlNWZjOC4uYmFh
ZGQ5ZiAxMDA2NDQKLS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CAKbnVtZXIgS1JTIDEwMTg4MgoKTklQIDk1Ny0w Ny01Mi0zMTYKS2Fw
aXRhbCB6YWtsYWRvd3kgMjAwLjAwMCB6bAoKVGhpcyBlLW1haWwgYW5kIGFu eSBhdHRhY2htZW50
cyBtYXkgY29udGFpbiBjb25maWRlbnRpYWwgbWF0ZXJpYWwgZm9yCnRoZSBz b2xlIHVzZSBvZiB0
aGUgaW50ZW5kZWQgcmVjaXBpZW50KHMpLiBBbnkgcmV2aWV3IG9yIGRpc3Ry aWJ1dGlvbgpieSBv
dGhlcnMgaXMgc3RyaWN0bHkgcHJvaGliaXRlZC4gSWYgeW91IGFyZSBub3Qg dGhlIGludGVuZGVk
CnJlY2lwaWVudCwgcGxlYXNlIGNvbnRhY3QgdGhlIHNlbmRlciBhbmQgZGVs ZXRlIGFsbCBjb3Bp
ZXMuCg==

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/3] Create: Allow to create two volumes of differentsizes within one container

am 21.09.2011 05:31:23 von NeilBrown

--Sig_/8RTBvazUV=EqD4YJmpEaD_y
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Mon, 19 Sep 2011 18:52:31 +0200 Lukasz Orlowski
wrote:

> Allows to create RAID 5 volume on 3 disks and then RAID 1 volume on 2
> disks withing the same container.
>=20
> Signed-off-by: Lukasz Orlowski
> ---
> super-intel.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>=20
> diff --git a/super-intel.c b/super-intel.c
> index a78d723..616853b 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -5041,6 +5041,12 @@ static int validate_geometry_imsm_volume(struct su=
pertype *st, int level,
> if (!super)
> return 0;
> =20
> + if (mpb->num_raid_devs > 0 && mpb->num_disks !=3D raiddisks) {
> + fprintf(stderr, Name ": the option-rom requires all "
> + "member disks to be a member of all volumes.\n");
> + return 0;
> + }
> +
> if (!validate_geometry_imsm_orom(super, level, layout, raiddisks, chunk=
, verbose)) {
> fprintf(stderr, Name ": RAID gemetry validation failed. "
> "Cannot proceed with the action(s).\n");
>=20

This patch doesn't make sense.

Firstly the description seems backwards. The purpose of this patch seems to
disallow the creation of two volumes with different numbers of devices, but
the description seems to say that it allows it. But that is a small point.

->num_disks is the number of devices in the container including spares. Th=
is
patch would allow the first array in a container to have fewer devices than
the container with the rest being spares. However the second array would h=
ave
to have the same number of devices as the container - even if this is more
than the first array.

Presumably what you really want to do is:
if num_raid_devs > 0, then find the relevant imsm_map, and then check if
map->num_members == raiddisks
and fail if they are not equal.

??

NeilBrown

--Sig_/8RTBvazUV=EqD4YJmpEaD_y
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iD8DBQFOeVqLG5fc6gV+Wb0RAvXdAJ9XmKG0iOiu6rebvgQbL6qZzlmzswCf cWjw
EqwTSIJYxgrU9keQcCIdhB0=
=iYIU
-----END PGP SIGNATURE-----

--Sig_/8RTBvazUV=EqD4YJmpEaD_y--
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/3] Create: Unnecessary prompt about device being busy

am 21.09.2011 05:36:15 von NeilBrown

--Sig_/mHd.mVU__ZsQrkN+YBe9USY
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Mon, 19 Sep 2011 18:52:38 +0200 Lukasz Orlowski
wrote:

> Should the geometry validation fail, mdadm exits with error code 2 if the
> style of metadata is not explicitly set to imsm. Prior to that however it
> attempts to exclusively open a device block file. If it succeeds it says
> that the device is not suitable for any kind of array, otherwise it just
> says that the device is busy. The file opened is not closed afterwards.
>=20
> Signed-off-by: Lukasz Orlowski

I'm confused. What exactly is the problem here?

If geometry validation fails, we need to exit because there is nothing usef=
ul
we can do.
We simply check if the problem is that the device is already in use, or if =
it
is an unusable device and report that. Then exit.
Seeing we are about the exit there is point closing the file.

What is the scenario when you get incorrect behaviour?

NeilBrown


> ---
> Create.c | 18 +++++++++---------
> 1 files changed, 9 insertions(+), 9 deletions(-)
>=20
> diff --git a/Create.c b/Create.c
> index 8d88aa1..47e5fc8 100644
> --- a/Create.c
> +++ b/Create.c
> @@ -346,15 +346,15 @@ int Create(struct supertype *st, char *mddev,
> =20
> if (!st) {
> int dfd =3D open(dname, O_RDONLY|O_EXCL);
> - if (dfd < 0) {
> - fprintf(stderr, Name ": cannot open %s: %s\n",
> - dname, strerror(errno));
> - exit(2);
> + if (dfd >=3D 0) {
> + fprintf(stderr,
> + Name ": device %s not suitable"
> + " for any style of array\n",
> + dname);
> + close(dfd);
> }
> - fprintf(stderr, Name ": device %s not suitable "
> - "for any style of array\n",
> - dname);
> - exit(2);
> + fail =3D 1;
> + break;
> }
> if (st->ss !=3D &super0 ||
> st->minor_version !=3D 90)
> @@ -443,7 +443,7 @@ int Create(struct supertype *st, char *mddev,
> close(fd);
> }
> }
> - if (raiddisks + sparedisks > st->max_devs) {
> + if (st && raiddisks + sparedisks > st->max_devs) {
> fprintf(stderr, Name ": Too many devices:"
> " %s metadata only supports %d\n",
> st->ss->name, st->max_devs);
>=20
> ------------------------------------------------------------ ---------
> Intel Technology Poland sp. z o.o.
> z siedziba w Gdansku
> ul. Slowackiego 173
> 80-298 Gdansk
>=20
> Sad Rejonowy Gdansk Polnoc w Gdansku,=20
> VII Wydzial Gospodarczy Krajowego Rejestru Sadowego,=20
> numer KRS 101882
>=20
> NIP 957-07-52-316
> Kapital zakladowy 200.000 zl
>=20
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.


--Sig_/mHd.mVU__ZsQrkN+YBe9USY
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iD8DBQFOeVuvG5fc6gV+Wb0RAgAQAJ4rWql5wRmqEAky+60ibhHAR7OHPwCd FRdl
FZXVtzzfRzKkyTvI0CMU4as=
=dJ9H
-----END PGP SIGNATURE-----

--Sig_/mHd.mVU__ZsQrkN+YBe9USY--
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 3/3] Create: Incorrect message when creating a volumewith explicit md dev name

am 21.09.2011 05:48:20 von NeilBrown

--Sig_/4oq_rHz8qWWBv+CgHiZUzu5
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Mon, 19 Sep 2011 18:52:45 +0200 Lukasz Orlowski
wrote:

> Appears when one attempts to create RAID 1 volume on 2 disks within a
> container with an existing RAID 5 volume on 3 disks and specifies the
> md device explicitly (e.g. /dev/md127). Instead of saying that such volume
> cannot be created it says that the devices have insufficient size.

I cannot reproduce this and I don't really understand what problem you are
trying to solve (seems to be happening a lot today :-( )

Could you give me a simple list of commands that produce undesirable result=
s?

Thanks,
NeilBrown



>=20
> Signed-off-by: Lukasz Orlowski
> ---
> Create.c | 8 ++++++--
> super-intel.c | 10 +++++++---
> 2 files changed, 13 insertions(+), 5 deletions(-)
>=20
> diff --git a/Create.c b/Create.c
> index 47e5fc8..baadd9f 100644
> --- a/Create.c
> +++ b/Create.c
> @@ -262,9 +262,13 @@ int Create(struct supertype *st, char *mddev,
> if (size && chunk && chunk !=3D UnSet)
> size &=3D ~(unsigned long long)(chunk - 1);
> newsize =3D size * 2;
> - if (st && ! st->ss->validate_geometry(st, level, layout, raiddisks,
> - &chunk, size*2, NULL, &newsize, verbose>=3D0))
> + if (st && !
> + st->ss->validate_geometry(
> + st, level, layout, raiddisks, &chunk,
> + size*2, NULL, &newsize, verbose >=3D 0)) {
> + fprintf(stderr, Name ": create aborted.\n");
> return 1;
> + }
> =20
> if (chunk && chunk !=3D UnSet) {
> newsize &=3D ~(unsigned long long)(chunk*2 - 1);
> diff --git a/super-intel.c b/super-intel.c
> index 616853b..51874ae 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -5223,9 +5223,13 @@ static int reserve_space(struct supertype *st, int=
raiddisks,
> /* chunk is in K */
> minsize =3D chunk * 2;
> =20
> - if (cnt < raiddisks ||
> - (super->orom && used && used !=3D raiddisks) ||
> - maxsize < minsize ||
> + if (cnt < raiddisks || (super->orom && used && used !=3D raiddisks)) {
> + fprintf(stderr, Name ": the option-rom requires all "
> + "member disks to be a member of all volumes.\n");
> + return 0;
> + }
> +
> + if (maxsize < minsize ||
> maxsize == 0) {
> fprintf(stderr, Name ": not enough devices with space to create array.=
\n");
> return 0; /* No enough free spaces large enough */
>=20
> ------------------------------------------------------------ ---------
> Intel Technology Poland sp. z o.o.
> z siedziba w Gdansku
> ul. Slowackiego 173
> 80-298 Gdansk
>=20
> Sad Rejonowy Gdansk Polnoc w Gdansku,=20
> VII Wydzial Gospodarczy Krajowego Rejestru Sadowego,=20
> numer KRS 101882
>=20
> NIP 957-07-52-316
> Kapital zakladowy 200.000 zl
>=20
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.


--Sig_/4oq_rHz8qWWBv+CgHiZUzu5
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iD8DBQFOeV6EG5fc6gV+Wb0RAuNRAKC5hGfbr0WZrblQiEfbUDK3cK+VSACc CeNl
adGa25kaQ36qu+sORoyxKj4=
=A8XF
-----END PGP SIGNATURE-----

--Sig_/4oq_rHz8qWWBv+CgHiZUzu5--
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/3] Create: Allow to create two volumes of differentsizes within one container

am 21.09.2011 08:31:03 von dan.j.williams

--20cf3005dc1c65127b04ad6db87a
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Tue, Sep 20, 2011 at 8:31 PM, NeilBrown wrote:
> On Mon, 19 Sep 2011 18:52:31 +0200 Lukasz Orlowski
> wrote:
>
>> Allows to create RAID 5 volume on 3 disks and then RAID 1 volume on 2
>> disks withing the same container.
>>
>> Signed-off-by: Lukasz Orlowski
>> ---
>> =A0super-intel.c | =A0 =A06 ++++++
>> =A01 files changed, 6 insertions(+), 0 deletions(-)
>>
>> diff --git a/super-intel.c b/super-intel.c
>> index a78d723..616853b 100644
>> --- a/super-intel.c
>> +++ b/super-intel.c
>> @@ -5041,6 +5041,12 @@ static int validate_geometry_imsm_volume(struct s=
upertype *st, int level,
>> =A0 =A0 =A0 if (!super)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 return 0;
>>
>> + =A0 =A0 if (mpb->num_raid_devs > 0 && mpb->num_disks !=3D raiddisks) {
>> + =A0 =A0 =A0 =A0 =A0 =A0 fprintf(stderr, Name ": the option-rom require=
s all "
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "member disks to be a member o=
f all volumes.\n");
>> + =A0 =A0 =A0 =A0 =A0 =A0 return 0;
>> + =A0 =A0 }
>> +
>> =A0 =A0 =A0 if (!validate_geometry_imsm_orom(super, level, layout, raidd=
isks, chunk, verbose)) {
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 fprintf(stderr, Name ": RAID gemetry validat=
ion failed. "
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "Cannot proceed with the act=
ion(s).\n");
>>
>
> This patch doesn't make sense.
>
> Firstly the description seems backwards. =A0The purpose of this patch see=
ms to
> disallow the creation of two volumes with different numbers of devices, b=
ut
> the description seems to say that it allows it. =A0But that is a small po=
int.
>
> ->num_disks is the number of devices in the container including spares. =
=A0This
> patch would allow the first array in a container to have fewer devices th=
an
> the container with the rest being spares. =A0However the second array wou=
ld have
> to have the same number of devices as the container - even if this is mor=
e
> than the first array.
>
> Presumably what you really want to do is:
> =A0if num_raid_devs > 0, then find the relevant imsm_map, and then check =
if
> =A0 =A0 map->num_members == raiddisks
> =A0and fail if they are not equal.
>

Yeah, the changelog is backwards, and this breaks tests/08imsm-overlap
because it does not honor IMSM_NO_PLATFORM. How about the attached?

Lukasz, please copy me on patch submissions.

Thanks,
Dan

--20cf3005dc1c65127b04ad6db87a
Content-Type: application/octet-stream; name="fix-member-disks.patch"
Content-Disposition: attachment; filename="fix-member-disks.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_gstxomms1

aW1zbTogZml4IGFycmF5IG1lbWJlcnNoaXAgZW5mb3JjZW1lbnQKCkZyb206 IERhbiBXaWxsaWFt
cyA8ZGFuLmoud2lsbGlhbXNAaW50ZWwuY29tPgoKQ29tbWl0IGU3Y2IwNmM4 ICJDcmVhdGU6IEFs
bG93IHRvIGNyZWF0ZSB0d28gdm9sdW1lcyBvZiBkaWZmZXJlbnQgc2l6ZXMK d2l0aGluIG9uZSBj
b250YWluZXIiIGZpeGVkIGVuZm9yY2VtZW50IG9mIHRoZSAiYWxsIG1lbWJl ciBkaXNrcyBtdXN0
IGJlCmEgbWVtYmVyIG9mIGFsbCBhcnJheXMiIGNvbnN0cmFpbnQgYnkgYWRk aW5nIHN1cHBvcnQg
Zm9yIHRoZSBjYXNlIHdoZXJlCmEgc21hbGxlciBhcnJheSBpcyBiZWluZyBj cmVhdGVkIGluIGEg
Y29udGFpbmVyIHdpdGggYSBsYXJnZXIgYXJyYXkuCgpIb3dldmVyLCBpdCBi cm9rZSB0ZXN0cy8w
OGltc20tb3ZlcmxhcCwgYW5kIHRoZSB0ZXN0IHNob3VsZCBiZSBtb3ZlZApu ZXh0IHRvIHRoZSBl
eGlzdGluZy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cmludGYoc3Rk
ZXJyLCBOYW1lICI6IFJBSUQgZ2VtZXRyeSB2YWxpZGF0aW9uIGZhaWxlZC4g IgogCQkJIkNhbm5v
dCBwcm9jZWVkIHdpdGggdGhlIGFjdGlvbihzKS5cbiIpOwpAQCAtNTIwNiw2 ICs1MjAwLDExIEBA
IHN0YXRpYyBpbnQgdmFsaWRhdGVfZ2VvbWV0cnlfaW1zbV92b2x1bWUoc3Ry dWN0IHN1cGVydHlw
ZSAqc3QsIGludCBsZXZlbCwKIAkJZnByaW50ZihzdGRlcnIsIE5hbWUgIjog VGhlIG9wdGlvbi1y
b20gcmVxdWlyZXMgYWxsIG1lbWJlciIKIAkJCSIgZGlza3MgdG8gYmUgYSBt ZW1iZXIgb2YgYWxs
IHZvbHVtZXNcbiIpOwogCQlyZXR1cm4gMDsKKwl9IGVsc2UgaWYgKHN1cGVy LT5vcm9tICYmIG1w
Yi0+bnVtX3JhaWRfZGV2cyA+IDAgJiYKKwkJICAgbXBiLT5udW1fZGlza3Mg IT0gcmFpZGRpc2tz
KSB7CisJCWZwcmludGYoc3RkZXJyLCBOYW1lICI6IFRoZSBvcHRpb24tcm9t IHJlcXVpcmVzIGFs
bCBtZW1iZXIiCisJCQkiIGRpc2tzIHRvIGJlIGEgbWVtYmVyIG9mIGFsbCB2 b2x1bWVzXG4iKTsK
KwkJcmV0dXJuIDA7CiAJfQogCiAJLyogcmV0cmlldmUgdGhlIGxhcmdlc3Qg ZnJlZSBzcGFjZSBi
bG9jayAqLwo=
--20cf3005dc1c65127b04ad6db87a--
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/3] Create: Allow to create two volumes of differentsizes within one container

am 21.09.2011 08:55:00 von NeilBrown

--Sig_/fzn.N8lhnWxzDvMpghclHyh
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Tue, 20 Sep 2011 23:31:03 -0700 Dan Williams
wrote:

> On Tue, Sep 20, 2011 at 8:31 PM, NeilBrown wrote:
> > On Mon, 19 Sep 2011 18:52:31 +0200 Lukasz Orlowski
> > wrote:
> >
> >> Allows to create RAID 5 volume on 3 disks and then RAID 1 volume on 2
> >> disks withing the same container.
> >>
> >> Signed-off-by: Lukasz Orlowski
> >> ---
> >> =A0super-intel.c | =A0 =A06 ++++++
> >> =A01 files changed, 6 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/super-intel.c b/super-intel.c
> >> index a78d723..616853b 100644
> >> --- a/super-intel.c
> >> +++ b/super-intel.c
> >> @@ -5041,6 +5041,12 @@ static int validate_geometry_imsm_volume(struct=
supertype *st, int level,
> >> =A0 =A0 =A0 if (!super)
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 return 0;
> >>
> >> + =A0 =A0 if (mpb->num_raid_devs > 0 && mpb->num_disks !=3D raiddisks)=
{
> >> + =A0 =A0 =A0 =A0 =A0 =A0 fprintf(stderr, Name ": the option-rom requi=
res all "
> >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "member disks to be a member=
of all volumes.\n");
> >> + =A0 =A0 =A0 =A0 =A0 =A0 return 0;
> >> + =A0 =A0 }
> >> +
> >> =A0 =A0 =A0 if (!validate_geometry_imsm_orom(super, level, layout, rai=
ddisks, chunk, verbose)) {
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 fprintf(stderr, Name ": RAID gemetry valid=
ation failed. "
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "Cannot proceed with the a=
ction(s).\n");
> >>
> >
> > This patch doesn't make sense.
> >
> > Firstly the description seems backwards. =A0The purpose of this patch s=
eems to
> > disallow the creation of two volumes with different numbers of devices,=
but
> > the description seems to say that it allows it. =A0But that is a small =
point.
> >
> > ->num_disks is the number of devices in the container including spares.=
=A0This
> > patch would allow the first array in a container to have fewer devices =
than
> > the container with the rest being spares. =A0However the second array w=
ould have
> > to have the same number of devices as the container - even if this is m=
ore
> > than the first array.
> >
> > Presumably what you really want to do is:
> > =A0if num_raid_devs > 0, then find the relevant imsm_map, and then chec=
k if
> > =A0 =A0 map->num_members == raiddisks
> > =A0and fail if they are not equal.
> >
>=20
> Yeah, the changelog is backwards, and this breaks tests/08imsm-overlap
> because it does not honor IMSM_NO_PLATFORM. How about the attached?

Better (though text/plain attachments are preferred over
application/octet-stream....)

However there still seems to be confusion over num_disks versus num_members.

You compare num_disks to raiddisks but my understanding is that num_disks c=
an
include spares while raiddisks definitely doesn't. Am I confused or are yo=
u?

NeilBrown


>=20
> Lukasz, please copy me on patch submissions.
>=20
> Thanks,
> Dan


--Sig_/fzn.N8lhnWxzDvMpghclHyh
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iD8DBQFOeYpEG5fc6gV+Wb0RAjX/AJsEO21UlnY3gn6QIkM3pM9nHx12QQCf R111
f1jkm+I15tLkLmceptD7ZYY=
=CKtq
-----END PGP SIGNATURE-----

--Sig_/fzn.N8lhnWxzDvMpghclHyh--
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html