- /* zeroconf */
- if (g_zconf) {
- struct config_llog_instance cfg;
- int len;
-
- if (!g_zconf_mdsname) {
- CERROR("no mds name\n");
- GOTO(out_free, err = -EINVAL);
- }
-
- /* generate a string unique to this super, let's try
- the address of the super itself.*/
- len = (sizeof(sbi) * 2) + 1;
- OBD_ALLOC(sbi->ll_instance, len);
- if (sbi->ll_instance == NULL)
- GOTO(out_free, err = -ENOMEM);
- sprintf(sbi->ll_instance, "%p", sbi);
-
- cfg.cfg_instance = sbi->ll_instance;
- cfg.cfg_uuid = sbi->ll_sb_uuid;
- err = liblustre_process_log(&cfg, 1);
- if (err < 0) {
- CERROR("Unable to process log: %s\n", g_zconf_profile);
-
- GOTO(out_free, err);
- }
-
- lprof = class_get_profile(g_zconf_profile);
- if (lprof == NULL) {
- CERROR("No profile found: %s\n", g_zconf_profile);
- GOTO(out_free, err = -EINVAL);
- }
- if (osc)
- OBD_FREE(osc, strlen(osc) + 1);
- OBD_ALLOC(osc, strlen(lprof->lp_osc) +
- strlen(sbi->ll_instance) + 2);
- sprintf(osc, "%s-%s", lprof->lp_osc, sbi->ll_instance);
-
- if (mdc)
- OBD_FREE(mdc, strlen(mdc) + 1);
- OBD_ALLOC(mdc, strlen(lprof->lp_mdc) +
- strlen(sbi->ll_instance) + 2);
- sprintf(mdc, "%s-%s", lprof->lp_mdc, sbi->ll_instance);
- } else {
- /* setup from dump_file */
- if (list_empty(&lustre_profile_list)) {
- CERROR("no profile\n");
- GOTO(out_free, err = -EINVAL);
- }
+ /* generate a string unique to this super, let's try
+ the address of the super itself.*/
+ OBD_ALLOC(sbi->ll_instance, sizeof(sbi) * 2 + 1);
+ if (sbi->ll_instance == NULL)
+ GOTO(out_free, err = -ENOMEM);
+ sprintf(sbi->ll_instance, "%p", sbi);
+
+ /* retrive & parse config log */
+ cfg.cfg_instance = sbi->ll_instance;
+ cfg.cfg_uuid = sbi->ll_sb_uuid;
+ err = liblustre_process_log(&cfg, 1);
+ if (err < 0) {
+ CERROR("Unable to process log: %s\n", g_zconf_profile);
+ GOTO(out_free, err);
+ }