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

Hal Rosenstock hal.rosenstock at gmail.com
Thu Nov 6 06:11:49 PST 2008


Yevgeny,

On Wed, Nov 5, 2008 at 5:42 AM, Yevgeny Kliteynik
<kliteyn at dev.mellanox.co.il> wrote:
> 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.

If this patch is accepted into ofw, should a similar one be pushed
into the main OpenSM code base (Linux) so this is not lost in the
future when hopefully the Windows version catches up to the Linux
version ?

-- Hal

>
> -- 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: "
> _______________________________________________
> ofw mailing list
> ofw at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
>



More information about the ofw mailing list