aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index dd83a50d892c..8cc4bbcf9bf8 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -4817,6 +4817,10 @@ array_size_store(struct mddev *mddev, const char *buf, size_t len)
4817 if (err) 4817 if (err)
4818 return err; 4818 return err;
4819 4819
4820 /* cluster raid doesn't support change array_sectors */
4821 if (mddev_is_clustered(mddev))
4822 return -EINVAL;
4823
4820 if (strncmp(buf, "default", 7) == 0) { 4824 if (strncmp(buf, "default", 7) == 0) {
4821 if (mddev->pers) 4825 if (mddev->pers)
4822 sectors = mddev->pers->size(mddev, 0, 0); 4826 sectors = mddev->pers->size(mddev, 0, 0);
@@ -6438,6 +6442,10 @@ static int update_size(struct mddev *mddev, sector_t num_sectors)
6438 int rv; 6442 int rv;
6439 int fit = (num_sectors == 0); 6443 int fit = (num_sectors == 0);
6440 6444
6445 /* cluster raid doesn't support update size */
6446 if (mddev_is_clustered(mddev))
6447 return -EINVAL;
6448
6441 if (mddev->pers->resize == NULL) 6449 if (mddev->pers->resize == NULL)
6442 return -EINVAL; 6450 return -EINVAL;
6443 /* The "num_sectors" is the number of sectors of each device that 6451 /* The "num_sectors" is the number of sectors of each device that