Blame SOURCES/dont-allow-array-geometry-change-with-ppl-enabled.patch

dd3a91
commit b208f817ec538e56df7280f0353e6bda532b9432
dd3a91
Author: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
dd3a91
Date:   Thu Jun 8 16:05:51 2017 +0200
dd3a91
dd3a91
    Grow: don't allow array geometry change with ppl enabled
dd3a91
    
dd3a91
    Don't allow array geometry change (size expand, disk adding) when PPL
dd3a91
    consistency policy is enabled. Current PPL implementation doesn't work when
dd3a91
    reshape is taking place.
dd3a91
    
dd3a91
    Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
dd3a91
    Signed-off-by: Jes Sorensen <jsorensen@fb.com>
dd3a91
dd3a91
diff --git a/Grow.c b/Grow.c
dd3a91
index 4ecb1d8..f7325cb 100644
dd3a91
--- a/Grow.c
dd3a91
+++ b/Grow.c
dd3a91
@@ -1880,6 +1880,13 @@ int Grow_reshape(char *devname, int fd,
dd3a91
 					free(subarray);
dd3a91
 					return 1;
dd3a91
 				}
dd3a91
+				if (content->consistency_policy ==
dd3a91
+				    CONSISTENCY_POLICY_PPL) {
dd3a91
+					pr_err("Operation not supported when ppl consistency policy is enabled\n");
dd3a91
+					sysfs_free(cc);
dd3a91
+					free(subarray);
dd3a91
+					return 1;
dd3a91
+				}
dd3a91
 			}
dd3a91
 			sysfs_free(cc);
dd3a91
 		}