[ofw] [PATCH] opensm: ignore and overwrite corrupted guid2lid file

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Wed Nov 5 02:42:45 PST 2008


Tzachi,

When Windows is crashing with BSOD, it might corrupt files that were
previously opened for writing, even if the files are closed. As a result,
we might see corrupted guid2lid file, and OpenSM will exit on such error.
This patch makes SM ignore (and later overwrite) corrupted guid2lid files.

-- Yevgeny

Index: osm_lid_mgr.c
===================================================================
--- osm_lid_mgr.c	(revision 3426)
+++ osm_lid_mgr.c	(working copy)
@@ -299,6 +299,13 @@ 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,
@@ -307,6 +314,7 @@ osm_lid_mgr_init(
         goto Exit;
       }
       else
+#endif
       {
         osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                  "osm_lid_mgr_init: ERR 0317: "



More information about the ofw mailing list