]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Grow: don't allow array geometry change with ppl enabled
authorTomasz Majchrzak <tomasz.majchrzak@intel.com>
Thu, 8 Jun 2017 14:05:51 +0000 (16:05 +0200)
committerJes Sorensen <jsorensen@fb.com>
Fri, 9 Jun 2017 14:56:22 +0000 (10:56 -0400)
Don't allow array geometry change (size expand, disk adding) when PPL
consistency policy is enabled. Current PPL implementation doesn't work when
reshape is taking place.

Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Grow.c

diff --git a/Grow.c b/Grow.c
index 4ecb1d8449ae1dc1286ab7b08d9c968b82e84453..f7325cbd6a050b1ab80ec00612d98289fb1535f2 100644 (file)
--- a/Grow.c
+++ b/Grow.c
@@ -1880,6 +1880,13 @@ int Grow_reshape(char *devname, int fd,
                                        free(subarray);
                                        return 1;
                                }
+                               if (content->consistency_policy ==
+                                   CONSISTENCY_POLICY_PPL) {
+                                       pr_err("Operation not supported when ppl consistency policy is enabled\n");
+                                       sysfs_free(cc);
+                                       free(subarray);
+                                       return 1;
+                               }
                        }
                        sysfs_free(cc);
                }