Whamcloud - gitweb
LU-4243 mgs: use proper uuid in mgs_write_log_failnids()
authorNiu Yawei <yawei.niu@intel.com>
Wed, 4 Dec 2013 04:20:18 +0000 (23:20 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 30 Dec 2013 22:41:56 +0000 (17:41 -0500)
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 fb9ae68..b6cdef7 100644 (file)
@@ -1920,11 +1920,13 @@ static int mgs_write_log_failnids(const struct lu_env *env,
                                failnodeuuid, cliname);
                        rc = record_add_uuid(env, llh, nid, failnodeuuid);
                 }
-               if (failnodeuuid)
+               if (failnodeuuid) {
                        rc = record_add_conn(env, llh, cliname, failnodeuuid);
+                       name_destroy(&failnodeuuid);
+                       failnodeuuid = NULL;
+               }
         }
 
-       name_destroy(&failnodeuuid);
         return rc;
 }