summaryrefslogtreecommitdiffstats
path: root/Manage.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-10-17 12:46:23 +1100
committerNeilBrown <neilb@suse.de>2008-10-17 12:46:23 +1100
commit492350045c7e40741069caa7d017209439db665b (patch)
tree48ddb56482580bb809830ddc6971a79459d0ca72 /Manage.c
parent8aae4219a2668acb88ad2777dacf69de941e7e07 (diff)
parent11cd8b79c0690bf39b40a25352f86a82a838622a (diff)
downloadmdadm-492350045c7e40741069caa7d017209439db665b.tar.gz
mdadm-492350045c7e40741069caa7d017209439db665b.tar.xz
mdadm-492350045c7e40741069caa7d017209439db665b.zip
Merge branch 'master' into devel-3.0
Conflicts: Manage.c
Diffstat (limited to 'Manage.c')
-rw-r--r--Manage.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/Manage.c b/Manage.c
index a6e1072..0018d8d 100644
--- a/Manage.c
+++ b/Manage.c
@@ -446,13 +446,6 @@ int Manage_subdevs(char *devname, int fd,
}
if (array.not_persistent == 0 || tst->ss->external) {
- /* Make sure device is large enough */
- if (tst->ss->avail_size(tst, ldsize/512) <
- array_size) {
- fprintf(stderr, Name ": %s not large enough to join array\n",
- dv->devname);
- return 1;
- }
/* need to find a sample superblock to copy, and
* a spare slot to use.
@@ -488,6 +481,15 @@ int Manage_subdevs(char *devname, int fd,
fprintf(stderr, Name ": cannot find valid superblock in this array - HELP\n");
return 1;
}
+
+ /* Make sure device is large enough */
+ if (tst->ss->avail_size(tst, ldsize/512) <
+ array_size) {
+ fprintf(stderr, Name ": %s not large enough to join array\n",
+ dv->devname);
+ return 1;
+ }
+
/* Possibly this device was recently part of the array
* and was temporarily removed, and is now being re-added.
* If so, we can simply re-add it.