From f157ebea33edb656b123bb34d4cb06f970bb4bb6 Mon Sep 17 00:00:00 2001 From: Niu Yawei Date: Tue, 3 Dec 2013 23:20:18 -0500 Subject: [PATCH] LU-4243 mgs: use proper uuid in mgs_write_log_failnids() 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 Change-Id: Ibd989de67fe6851cc75569be3f64dadaec5e6f8c Reviewed-on: http://review.whamcloud.com/8372 Tested-by: Jenkins Reviewed-by: Erich Focht Tested-by: Maloo Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin --- lustre/mgs/mgs_llog.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lustre/mgs/mgs_llog.c b/lustre/mgs/mgs_llog.c index f6b69ba..b610b86 100644 --- a/lustre/mgs/mgs_llog.c +++ b/lustre/mgs/mgs_llog.c @@ -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); } - if (failnodeuuid) + if (failnodeuuid) { rc = record_add_conn(env, llh, cliname, failnodeuuid); + name_destroy(&failnodeuuid); + failnodeuuid = NULL; + } } - name_destroy(&failnodeuuid); return rc; } -- 1.8.3.1