geom_virstor with kernel panic in FreeBSD 9.x

Marcelo Gondim gondim at bsdinfo.com.br
Fri Aug 3 17:04:08 UTC 2012


Em 03/08/2012 13:49, Jim Harris escreveu:
> ===================================================================
> --- sys/geom/virstor/g_virstor.c        (revision 238909)
> +++ sys/geom/virstor/g_virstor.c        (working copy)
> @@ -235,6 +235,12 @@
>                          return;
>                  }
>                  sc = virstor_find_geom(cp, name);
> +               if (sc == NULL) {
> +                       gctl_error(req, "Don't know anything about '%s'", name);
> +                       g_topology_unlock();
> +                       return;
> +               }
> +
>                  LOG_MSG(LVL_INFO, "Stopping %s by the userland command",
>                      sc->geom->name);
>                  update_metadata(sc);
Hi Jim,

When I applied the patch gave this error:

# patch < /root/patch.diff
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- sys/geom/virstor/g_virstor.c        (revision 238909)
|+++ sys/geom/virstor/g_virstor.c        (working copy)
--------------------------
Patching file sys/geom/virstor/g_virstor.c using Plan A...
Hunk #1 failed at 235.
1 out of 1 hunks failed--saving rejects to sys/geom/virstor/g_virstor.c.rej
done




# cat sys/geom/virstor/g_virstor.c.rej
***************
*** 235,240 ****
                          return;
                  }
                  sc = virstor_find_geom(cp, name);
                  LOG_MSG(LVL_INFO, "Stopping %s by the userland command",
                      sc->geom->name);
                  update_metadata(sc);
--- 235,246 ----
                          return;
                  }
                  sc = virstor_find_geom(cp, name);
+                if (sc == NULL) {
+                        gctl_error(req, "Don't know anything about 
'%s'", name);
+                        g_topology_unlock();
+                        return;
+                }
+
                  LOG_MSG(LVL_INFO, "Stopping %s by the userland command",
                      sc->geom->name);
                  update_metadata(sc);


More information about the freebsd-stable mailing list