From: <stockhausen@collogia.de>
To: linux-raid@vger.kernel.org
Subject: [Patch v1 1/4] md/raid5: MAX_DISKS define
Date: Fri, 7 Aug 2015 20:21:00 +0000 [thread overview]
Message-ID: <efe32f66-e566-43c8-acd6-79cf27ed9a5b@EXCHANGE.collogia.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 1139 bytes --]
md/raid5: MAX_DISKS define
The maximum number of disks raid5 can handle is not clearly defined.
To avoid arbitrary values at several places introduce a new constant.
Signed-off-by: Markus Stockhausen <stockhausen@collogia.de>
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 643d217..817d125 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -7722,7 +7722,7 @@ static void *raid6_takeover(struct mddev *mddev)
return ERR_PTR(-EINVAL);
if (mddev->degraded > 1)
return ERR_PTR(-EINVAL);
- if (mddev->raid_disks > 253)
+ if (mddev->raid_disks >= MAX_DISKS)
return ERR_PTR(-EINVAL);
if (mddev->raid_disks < 3)
return ERR_PTR(-EINVAL);
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h
index d051442..112545b 100644
--- a/drivers/md/raid5.h
+++ b/drivers/md/raid5.h
@@ -542,6 +542,11 @@ struct r5conf {
int worker_cnt_per_group;
};
+/*
+ * Number of disks a raid456 device can support. Regarding physical constraints
+ * this is only a theoretical value. Nevertheless it improves readability
+ */
+#define MAX_DISKS 254
/*
* Our supported algorithms
[-- Attachment #2: InterScan_Disclaimer.txt --]
[-- Type: text/plain, Size: 1650 bytes --]
****************************************************************************
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
Weitergabe dieser Mail ist nicht gestattet.
Ãber das Internet versandte E-Mails können unter fremden Namen erstellt oder
manipuliert werden. Deshalb ist diese als E-Mail verschickte Nachricht keine
rechtsverbindliche Willenserklärung.
Collogia
Unternehmensberatung AG
Ubierring 11
D-50678 Köln
Vorstand:
Kadir Akin
Dr. Michael Höhnerbach
Vorsitzender des Aufsichtsrates:
Hans Kristian Langva
Registergericht: Amtsgericht Köln
Registernummer: HRB 52 497
This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
e-mails sent over the internet may have been written under a wrong name or
been manipulated. That is why this message sent as an e-mail is not a
legally binding declaration of intention.
Collogia
Unternehmensberatung AG
Ubierring 11
D-50678 Köln
executive board:
Kadir Akin
Dr. Michael Höhnerbach
President of the supervisory board:
Hans Kristian Langva
Registry office: district court Cologne
Register number: HRB 52 497
****************************************************************************
reply other threads:[~2015-08-07 20:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=efe32f66-e566-43c8-acd6-79cf27ed9a5b@EXCHANGE.collogia.de \
--to=stockhausen@collogia.de \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox