[opensm] ignore and overwrite corrupted guid2lid file.
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 6 Nov 2008 20:24:37 +0000 (20:24 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 6 Nov 2008 20:24:37 +0000 (20:24 +0000)
signed off by: kliteyn@dev.mellanox.co.il

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1738 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/opensm/user/opensm/osm_lid_mgr.c

index 9217ea0..565fa2c 100644 (file)
@@ -299,14 +299,22 @@ osm_lid_mgr_init(
   {
     if (osm_db_restore(p_mgr->p_g2l))
     {
+#ifndef __WIN__
+      /*
+       * When Windows is BSODing, it might corrupt files that were
+       * previously opened for writing, even if the files are closed.
+       * This is because of Windows write caching option.
+       * As a result, we might see corrupted guid2lid file.
+       */    
       if (p_subn->opt.exit_on_fatal) 
-      {
+      {      
         osm_log( p_mgr->p_log, OSM_LOG_SYS,
                  "FATAL: Error restoring Guid-to-Lid persistent database\n" );
         status = IB_ERROR;
         goto Exit;
       }
       else
+#endif        
       {
         osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                  "osm_lid_mgr_init: ERR 0317: "