From: Niu Yawei Date: Wed, 4 Dec 2013 04:20:18 +0000 (-0500) Subject: LU-4243 mgs: use proper uuid in mgs_write_log_failnids() X-Git-Tag: 2.5.53~57 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=f157ebea33edb656b123bb34d4cb06f970bb4bb6;p=fs%2Flustre-release.git 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 --- 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; }