Whamcloud - gitweb
LU-15707 lod: force creation of a component without a pool
[fs/lustre-release.git] / lustre / mgs / mgs_handler.c
index 768fa9e..f89d20e 100644 (file)
@@ -716,6 +716,9 @@ static int mgs_extract_fs_pool(char *arg, char *fsname, char *poolname)
                return -EINVAL;
        ptr++;
 
+       /* Check pool name validity. */
+       if (ptr[0] == '\0' || lov_pool_is_reserved(ptr))
+               return -EINVAL;
        /* Also make sure poolname is not to long. */
        if (strlen(ptr) > LOV_MAXPOOLNAME)
                return -ENAMETOOLONG;