[PATCH 02/27] DDF: check_secondary: fix treatment of missing BVDs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Unused BVDs should just be skipped instead of bailing out.

Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
---
 super-ddf.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/super-ddf.c b/super-ddf.c
index 91feb87..c445df2 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -3222,10 +3222,8 @@ static int check_secondary(const struct vcl *vc)
 	__set_sec_seen(conf->sec_elmnt_seq);
 	for (i = 0; i < conf->sec_elmnt_count-1; i++) {
 		const struct vd_config *bvd = vc->other_bvds[i];
-		if (bvd == NULL) {
-			pr_err("BVD %d is missing\n", i+1);
-			return -1;
-		}
+		if (bvd == NULL)
+			continue;
 		if (bvd->srl != conf->srl) {
 			pr_err("Inconsistent secondary RAID level across BVDs\n");
 			return -1;
-- 
1.7.1
--
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




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux