[PATCH] Add error handling for chunk size in RAID1

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

 



Print error if chunk size is set as it is not supported.

Signed-off-by: Mateusz Grzonka <mateusz.grzonka@xxxxxxxxx>
---
 Create.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Create.c b/Create.c
index 18b5e646..f5d57f8c 100644
--- a/Create.c
+++ b/Create.c
@@ -254,9 +254,8 @@ int Create(struct supertype *st, char *mddev,
 	case LEVEL_MULTIPATH:
 	case LEVEL_CONTAINER:
 		if (s->chunk) {
-			s->chunk = 0;
-			if (c->verbose > 0)
-				pr_err("chunk size ignored for this level\n");
+			pr_err("specifying chunk size is forbidden for this level\n");
+			return 1;
 		}
 		break;
 	default:
-- 
2.26.2




[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