Whamcloud - gitweb
LU-4243 mgs: use proper uuid in mgs_write_log_failnids() 72/8372/3
authorNiu Yawei <yawei.niu@intel.com>
Wed, 4 Dec 2013 04:20:18 +0000 (23:20 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 9 Dec 2013 03:43:06 +0000 (03:43 +0000)
This patch revert the changes to mgs_write_log_failnids() in the
commit d9d27cad, which introduced a regression of that when multiple
'--servicenode' or '--failnode' option specified, the uuid from
first option will be wrongly used for all other connections.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Ibd989de67fe6851cc75569be3f64dadaec5e6f8c
Reviewed-on: http://review.whamcloud.com/8372
Tested-by: Jenkins
Reviewed-by: Erich Focht <efocht@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mgs/mgs_llog.c

index f6b69ba..b610b86 100644 (file)
@@ -1923,11 +1923,13 @@ static int mgs_write_log_failnids(const struct lu_env *env,
                                failnodeuuid, cliname);
                        rc = record_add_uuid(env, llh, nid, failnodeuuid);
                 }
                                failnodeuuid, cliname);
                        rc = record_add_uuid(env, llh, nid, failnodeuuid);
                 }
-               if (failnodeuuid)
+               if (failnodeuuid) {
                        rc = record_add_conn(env, llh, cliname, failnodeuuid);
                        rc = record_add_conn(env, llh, cliname, failnodeuuid);
+                       name_destroy(&failnodeuuid);
+                       failnodeuuid = NULL;
+               }
         }
 
         }
 
-       name_destroy(&failnodeuuid);
         return rc;
 }
 
         return rc;
 }