From patchwork Thu Feb 4 14:16:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Kliteynik X-Patchwork-Id: 76990 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o14EEvCg029577 for ; Thu, 4 Feb 2010 14:16:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932283Ab0BDOQr (ORCPT ); Thu, 4 Feb 2010 09:16:47 -0500 Received: from mail-vw0-f46.google.com ([209.85.212.46]:53766 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932277Ab0BDOQq (ORCPT ); Thu, 4 Feb 2010 09:16:46 -0500 Received: by vws20 with SMTP id 20so910115vws.19 for ; Thu, 04 Feb 2010 06:16:43 -0800 (PST) Received: by 10.220.127.97 with SMTP id f33mr1986933vcs.47.1265292998158; Thu, 04 Feb 2010 06:16:38 -0800 (PST) Received: from ?10.4.1.29? ([62.219.166.71]) by mx.google.com with ESMTPS id 21sm1349265vws.9.2010.02.04.06.16.35 (version=SSLv3 cipher=RC4-MD5); Thu, 04 Feb 2010 06:16:37 -0800 (PST) Message-ID: <4B6AD6C2.2050401@dev.mellanox.co.il> Date: Thu, 04 Feb 2010 16:16:34 +0200 From: Yevgeny Kliteynik User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: Sasha Khapyorsky CC: Linux RDMA Subject: [PATCH v3] opensm: minor improvement in loading SA DB Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 04 Feb 2010 14:16:47 +0000 (UTC) diff --git a/opensm/opensm/osm_sa.c b/opensm/opensm/osm_sa.c index 3473e4c..ea87275 100644 --- a/opensm/opensm/osm_sa.c +++ b/opensm/opensm/osm_sa.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2004-2009 Voltaire, Inc. All rights reserved. - * Copyright (c) 2002-2009 Mellanox Technologies LTD. All rights reserved. + * Copyright (c) 2002-2010 Mellanox Technologies LTD. All rights reserved. * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. * Copyright (c) 2008 Xsigo Systems Inc. All rights reserved. * @@ -907,12 +907,6 @@ int osm_sa_db_file_load(osm_opensm_t * p_osm) unsigned rereg_clients = 0; unsigned lineno; - if (!p_osm->subn.first_time_master_sweep) { - OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE, - "Not first sweep - skip SA DB restore\n"); - return 0; - } - file_name = p_osm->subn.opt.sa_db_file; if (!file_name) { OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE, diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c index e43463f..f3f004a 100644 --- a/opensm/opensm/osm_state_mgr.c +++ b/opensm/opensm/osm_state_mgr.c @@ -1,7 +1,7 @@ /* * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2004-2009 Voltaire, Inc. All rights reserved. - * Copyright (c) 2002-2009 Mellanox Technologies LTD. All rights reserved. + * Copyright (c) 2002-2010 Mellanox Technologies LTD. All rights reserved. * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. * Copyright (c) 2009 HNR Consulting. All rights reserved. * @@ -1261,10 +1261,13 @@ repeat_discovery: osm_qos_setup(sm->p_subn->p_osm); - /* try to restore SA DB (this should be before lid_mgr - because we may want to disable clients reregistration - when SA DB is restored) */ - osm_sa_db_file_load(sm->p_subn->p_osm); + /* + * If it's the first master sweep, try to restore SA DB + * (this should be before lid_mgr because we may want to + * disable clients reregistration when SA DB is restored) + */ + if (sm->p_subn->first_time_master_sweep) + osm_sa_db_file_load(sm->p_subn->p_osm); if (wait_for_pending_transactions(&sm->p_subn->p_osm->stats)) return;