From baef6c410b6bbddeb6ac28807920f2251003c3fc Mon Sep 17 00:00:00 2001 From: imp Date: Wed, 9 Aug 2017 16:37:37 +0000 Subject: [PATCH] Also provide a warning for geom_fox. Differential Review: https://reviews.freebsd.org/D11935 Requested by: jhb@ MFC After: 3 days --- sys/geom/geom_fox.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/geom/geom_fox.c b/sys/geom/geom_fox.c index 2fea00d963a5..ed3396781aa5 100644 --- a/sys/geom/geom_fox.c +++ b/sys/geom/geom_fox.c @@ -53,6 +53,8 @@ #define FOX_CLASS_NAME "FOX" #define FOX_MAGIC "GEOM::FOX" +static int g_fox_once; + FEATURE(geom_fox, "GEOM FOX redundant path mitigation support"); struct g_fox_softc { @@ -438,8 +440,15 @@ printf("fox %s lock %p\n", gp->name, &sc->lock); g_free(buf); g_access(cp, -1, 0, 0); - if (!LIST_EMPTY(&gp->provider)) + if (!LIST_EMPTY(&gp->provider)) { + if (!g_fox_once) { + g_fox_once = 1; + printf( + "WARNING: geom_fox (geom %s) is deprecated, " + "use gmultipath instead.\n", gp->name); + } return (gp); + } g_free(gp->softc); g_detach(cp);