Whamcloud - gitweb
LU-15707 lod: force creation of a component without a pool
[fs/lustre-release.git] / lustre / utils / lfs.c
index 23e13b0..cafc758 100644 (file)
@@ -3941,12 +3941,11 @@ static int lfs_setstripe_internal(int argc, char **argv,
                case 'p':
                        if (!optarg)
                                goto usage_error;
-                       lsa.lsa_pool_name = optarg;
 
-                       if (strlen(lsa.lsa_pool_name) == 0 ||
-                           strncmp(lsa.lsa_pool_name, "none",
-                                   LOV_MAXPOOLNAME) == 0)
+                       if (optarg[0] == '\0' || lov_pool_is_inherited(optarg))
                                lsa.lsa_pool_name = NULL;
+                       else
+                               lsa.lsa_pool_name = optarg;
                        break;
                case 'S':
                        result = llapi_parse_size(optarg, &lsa.lsa_stripe_size,