Whamcloud - gitweb
LU-1581 mount: kernel do not parse ldd
[fs/lustre-release.git] / lustre / utils / mkfs_lustre.c
index 483f512..bbf0854 100644 (file)
@@ -587,6 +587,8 @@ int main(int argc, char *const argv[])
                         "(%d)\n", mop.mo_device, ret);
                 goto out;
         }
+       mop.mo_ldd.ldd_flags &= ~(LDD_F_WRITECONF | LDD_F_VIRGIN);
+
         if (strstr(mop.mo_ldd.ldd_params, PARAM_MGSNODE))
             mop.mo_mgs_failnodes++;
 
@@ -747,6 +749,14 @@ int main(int argc, char *const argv[])
                 fprintf(stderr, "mkfs failed %d\n", ret);
                 goto out;
         }
+#else
+       /* update svname with '=' to refresh config */
+       if (mop.mo_ldd.ldd_flags & LDD_F_WRITECONF) {
+               struct mount_opts opts;
+               opts.mo_ldd = mop.mo_ldd;
+               opts.mo_source = mop.mo_device;
+               (void) osd_label_lustre(&opts);
+       }
 #endif
 
         /* Write our config files */