diff --git a/Manage.c b/Manage.c index 225af81..2e602d7 100644 --- a/Manage.c +++ b/Manage.c @@ -781,7 +781,8 @@ int Manage_add(int fd, int tfd, struct mddev_dev *dv, } /* Make sure device is large enough */ - if (tst->ss->avail_size(tst, ldsize/512, INVALID_SECTORS) < + if (tst->sb && + tst->ss->avail_size(tst, ldsize/512, INVALID_SECTORS) < array_size) { if (dv->disposition == 'M') return 0;