On 01/27/2018 02:51 AM, Jes Sorensen wrote:
On 01/26/2018 03:42 AM, Xiao Ni wrote:
Signed-off-by: Xiao Ni <xni@xxxxxxxxxx>
---
Create.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Create.c b/Create.c
index 239545f..50142d8 100644
--- a/Create.c
+++ b/Create.c
@@ -475,6 +475,10 @@ int Create(struct supertype *st, char *mddev,
close(fd);
}
}
+ if (missing_disks == dnum) {
+ pr_err("Subdevs can't be all missing\n");
+ return 1;
+ }
if (s->raiddisks + s->sparedisks > st->max_devs) {
pr_err("Too many devices: %s metadata only supports %d\n",
st->ss->name, st->max_devs);
Applied!
Thanks,
Jes
PS: This looks like a great candidate for a unit test :)
Hi Jes
I'll add this to test suite later.
Regards
Xiao
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html