md-cluster: change array_sectors and update size are not supported
authorGuoqing Jiang <gqjiang@suse.com>
Mon, 2 May 2016 15:33:13 +0000 (11:33 -0400)
committerShaohua Li <shli@fb.com>
Wed, 4 May 2016 19:39:35 +0000 (12:39 -0700)
Currently, some features are not supported yet,
such as change array_sectors and update size, so
return EINVAL for them and listed it in document.

Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Documentation/md-cluster.txt
drivers/md/md.c

index c100c71635070f22064e0723d7dbef3e14ed5534..38883276d31c379fe6de344537b08d0b4e10e6a9 100644 (file)
@@ -316,3 +316,9 @@ The algorithm is:
  nodes are using the raid which is achieved by lock all bitmap
  locks within the cluster, and also those locks are unlocked
  accordingly.
+
+7. Unsupported features
+
+There are somethings which are not supported by cluster MD yet.
+
+- update size and change array_sectors.
index dd83a50d892ca4de96d490de0d799da63cb78037..8cc4bbcf9bf8bde3ccad4134e9694344b920683e 100644 (file)
@@ -4817,6 +4817,10 @@ array_size_store(struct mddev *mddev, const char *buf, size_t len)
        if (err)
                return err;
 
+       /* cluster raid doesn't support change array_sectors */
+       if (mddev_is_clustered(mddev))
+               return -EINVAL;
+
        if (strncmp(buf, "default", 7) == 0) {
                if (mddev->pers)
                        sectors = mddev->pers->size(mddev, 0, 0);
@@ -6438,6 +6442,10 @@ static int update_size(struct mddev *mddev, sector_t num_sectors)
        int rv;
        int fit = (num_sectors == 0);
 
+       /* cluster raid doesn't support update size */
+       if (mddev_is_clustered(mddev))
+               return -EINVAL;
+
        if (mddev->pers->resize == NULL)
                return -EINVAL;
        /* The "num_sectors" is the number of sectors of each device that