From patchwork Wed Feb 3 09:13:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Kliteynik X-Patchwork-Id: 76651 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 o139DKeo024267 for ; Wed, 3 Feb 2010 09:13:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755937Ab0BCJNT (ORCPT ); Wed, 3 Feb 2010 04:13:19 -0500 Received: from mail.mellanox.co.il ([194.90.237.43]:43343 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753102Ab0BCJNS (ORCPT ); Wed, 3 Feb 2010 04:13:18 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from kliteyn@dev.mellanox.co.il) with SMTP; 3 Feb 2010 11:13:13 +0200 Received: from [10.4.1.29] ([10.4.1.29]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 3 Feb 2010 11:13:13 +0200 Message-ID: <4B693E29.8030309@dev.mellanox.co.il> Date: Wed, 03 Feb 2010 11:13:13 +0200 From: Yevgeny Kliteynik Reply-To: kliteyn@dev.mellanox.co.il User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: Sasha Khapyorsky CC: Linux RDMA Subject: [PATCH v2] opensm: minor improvement in loading SA DB X-OriginalArrivalTime: 03 Feb 2010 09:13:13.0655 (UTC) FILETIME=[1D058C70:01CAA4B1] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17170.006 X-TM-AS-Result: No--5.179300-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No 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]); Wed, 03 Feb 2010 09:13:20 +0000 (UTC) diff --git a/opensm/opensm/osm_sa.c b/opensm/opensm/osm_sa.c index 3473e4c..d950248 100644 --- a/opensm/opensm/osm_sa.c +++ b/opensm/opensm/osm_sa.c @@ -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..2cddc57 100644 --- a/opensm/opensm/osm_state_mgr.c +++ b/opensm/opensm/osm_state_mgr.c @@ -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;