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

Tzachi Dar tzachid at mellanox.co.il
Thu Nov 6 12:25:56 PST 2008


Applied on 1738/9.

Thanks
Tzachi 

> -----Original Message-----
> From: Yevgeny Kliteynik [mailto:kliteyn at dev.mellanox.co.il] 
> Sent: Wednesday, November 05, 2008 12:43 PM
> To: Tzachi Dar
> Cc: ofw at lists.openfabrics.org; Ishai Rabinovitz
> Subject: [PATCH] opensm: ignore and overwrite corrupted guid2lid file
> 
> 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