Skip to contentSkip to conversation

Add error handling for chunk size in RAID1

PATCH Applied Mateusz Grzonka 2 participants 2 messages Jul 15, 2021 – Jul 16, 2021 MD RAID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add error handling for chunk size in RAID1

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

---
 Create.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Create.c +2 -3
index 18b5e646..f5d57f8c 100644
@@ -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:
Signature · 1 line
2.26.2
Applied
#1 lore raw
Quoted 6 lines · Mateusz Grzonka

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

---
 Create.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Applied!

Thanks,
Jes