Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Apr 2018 00:12:04 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r332519 - in stable/11: share/man/man4 sys/conf sys/geom
Message-ID:  <201804160012.w3G0C451008904@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Mon Apr 16 00:12:03 2018
New Revision: 332519
URL: https://svnweb.freebsd.org/changeset/base/332519

Log:
  MFC r322318-r322319
  
  r322318:
  Mark geom classes as deprecated.
  
  geom_bsd, geom_mbr and geom_sunlabel have been obsolete since Marcel
  Moolenaar's geom_part was in FreeBSD 7. They haven't been in GENERIC
  since FreeBSD 8. Add warning when used.
  
  geom_vol_ffs has been obsolete since ufs support to geom_label was
  committed in FreeBSD 5. It hasn't been in GENERIC since FreeBSD 5.
  Add warning when used.
  
  geom_fox has been obsolete since gmultipath was committed in FreeBSD 7.
  (no warning added, since this is a very obscure class).
  
  These will all be removed in FreeBSD 12.
  
  r322319:
  Also provide a warning for geom_fox.

Modified:
  stable/11/share/man/man4/geom.4
  stable/11/share/man/man4/geom_fox.4
  stable/11/sys/conf/NOTES
  stable/11/sys/geom/geom_bsd.c
  stable/11/sys/geom/geom_fox.c
  stable/11/sys/geom/geom_mbr.c
  stable/11/sys/geom/geom_sunlabel.c
  stable/11/sys/geom/geom_vol_ffs.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/man/man4/geom.4
==============================================================================
--- stable/11/share/man/man4/geom.4	Sun Apr 15 21:46:08 2018	(r332518)
+++ stable/11/share/man/man4/geom.4	Mon Apr 16 00:12:03 2018	(r332519)
@@ -34,7 +34,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 20, 2017
+.Dd August 9, 2017
 .Dt GEOM 4
 .Os
 .Sh NAME
@@ -43,17 +43,14 @@
 .Sh SYNOPSIS
 .Cd options GEOM_AES
 .Cd options GEOM_BDE
-.Cd options GEOM_BSD
 .Cd options GEOM_CACHE
 .Cd options GEOM_CONCAT
 .Cd options GEOM_ELI
-.Cd options GEOM_FOX
 .Cd options GEOM_GATE
 .Cd options GEOM_JOURNAL
 .Cd options GEOM_LABEL
 .Cd options GEOM_LINUX_LVM
 .Cd options GEOM_MAP
-.Cd options GEOM_MBR
 .Cd options GEOM_MIRROR
 .Cd options GEOM_MOUNTVER
 .Cd options GEOM_MULTIPATH
@@ -73,10 +70,8 @@
 .Cd options GEOM_RAID3
 .Cd options GEOM_SHSEC
 .Cd options GEOM_STRIPE
-.Cd options GEOM_SUNLABEL
 .Cd options GEOM_UZIP
 .Cd options GEOM_VIRSTOR
-.Cd options GEOM_VOL
 .Cd options GEOM_ZERO
 .Sh DESCRIPTION
 The
@@ -451,6 +446,24 @@ This is unused at this time.
 .It 0x80 Pq Dv G_F_CTLDUMP
 Dump contents of gctl requests.
 .El
+.Sh OBSOLETE OPTIONS
+.Pp
+The following options have been deprecated and will be removed in
+.Fx 12 :
+.Cd GEOM_BSD ,
+.Cd GEOM_FOX ,
+.Cd GEOM_MBR ,
+.Cd GEOM_SUNLABEL ,
+and
+.Cd GEOM_VOL .
+.Pp
+Use
+.Cd GEOM_PART_BSD ,
+.Cd GEOM_MULTIPATH ,
+.Cd GEOM_PART_MBR ,
+.Cd GEOM_PART_VTOC8 ,
+.Cd GEOM_LABEL
+options, respectively, instead.
 .Sh SEE ALSO
 .Xr libgeom 3 ,
 .Xr DECLARE_GEOM_CLASS 9 ,

Modified: stable/11/share/man/man4/geom_fox.4
==============================================================================
--- stable/11/share/man/man4/geom_fox.4	Sun Apr 15 21:46:08 2018	(r332518)
+++ stable/11/share/man/man4/geom_fox.4	Mon Apr 16 00:12:03 2018	(r332519)
@@ -51,6 +51,8 @@ This driver is obsolete.
 Users are advised to use
 .Xr gmultipath 8
 instead.
+This driver will be removed in
+.Fx 12 .
 .Ef
 .Pp
 The intent of the

Modified: stable/11/sys/conf/NOTES
==============================================================================
--- stable/11/sys/conf/NOTES	Sun Apr 15 21:46:08 2018	(r332518)
+++ stable/11/sys/conf/NOTES	Mon Apr 16 00:12:03 2018	(r332519)
@@ -147,17 +147,17 @@ options 	BOOTHOWTO=RB_MULTIPLE
 
 options 	GEOM_AES		# Don't use, use GEOM_BDE
 options 	GEOM_BDE		# Disk encryption.
-options 	GEOM_BSD		# BSD disklabels
+options 	GEOM_BSD		# BSD disklabels (obsolete, gone in 12)
 options 	GEOM_CACHE		# Disk cache.
 options 	GEOM_CONCAT		# Disk concatenation.
 options 	GEOM_ELI		# Disk encryption.
-options 	GEOM_FOX		# Redundant path mitigation
+options 	GEOM_FOX		# Redundant path mitigation (obsolete, gone in 12)
 options 	GEOM_GATE		# Userland services.
 options 	GEOM_JOURNAL		# Journaling.
 options 	GEOM_LABEL		# Providers labelization.
 options 	GEOM_LINUX_LVM		# Linux LVM2 volumes
 options 	GEOM_MAP		# Map based partitioning
-options 	GEOM_MBR		# DOS/MBR partitioning
+options 	GEOM_MBR		# DOS/MBR partitioning (obsolete, gone in 12)
 options 	GEOM_MIRROR		# Disk mirroring.
 options 	GEOM_MULTIPATH		# Disk multipath
 options 	GEOM_NOP		# Test class.
@@ -176,11 +176,11 @@ options 	GEOM_RAID		# Soft RAID functionality.
 options 	GEOM_RAID3		# RAID3 functionality.
 options 	GEOM_SHSEC		# Shared secret.
 options 	GEOM_STRIPE		# Disk striping.
-options 	GEOM_SUNLABEL		# Sun/Solaris partitioning
+options 	GEOM_SUNLABEL		# Sun/Solaris partitioning (obsolete, gone in 12)
 options 	GEOM_UZIP		# Read-only compressed disks
 options 	GEOM_VINUM		# Vinum logical volume manager
 options 	GEOM_VIRSTOR		# Virtual storage.
-options 	GEOM_VOL		# Volume names from UFS superblock
+options 	GEOM_VOL		# Volume names from UFS superblock (obsolete, gone in 12)
 options 	GEOM_ZERO		# Performance testing helper.
 
 #

Modified: stable/11/sys/geom/geom_bsd.c
==============================================================================
--- stable/11/sys/geom/geom_bsd.c	Sun Apr 15 21:46:08 2018	(r332518)
+++ stable/11/sys/geom/geom_bsd.c	Mon Apr 16 00:12:03 2018	(r332519)
@@ -72,6 +72,8 @@ FEATURE(geom_bsd, "GEOM BSD disklabels support");
 
 #define LABELSIZE (148 + 16 * MAXPARTITIONS)
 
+static int g_bsd_once;
+
 static void g_bsd_hotwrite(void *arg, int flag);
 /*
  * Our private data about one instance.  All the rest is handled by the
@@ -514,6 +516,12 @@ g_bsd_taste(struct g_class *mp, struct g_provider *pp,
 		g_slice_conf_hot(gp, 0, ms->labeloffset, LABELSIZE,
 		    G_SLICE_HOT_ALLOW, G_SLICE_HOT_DENY, G_SLICE_HOT_CALL);
 		gsp->hot = g_bsd_hotwrite;
+		if (!g_bsd_once) {
+			g_bsd_once = 1;
+			printf(
+			    "WARNING: geom_bsd (geom %s) is deprecated, "
+			    "use gpart instead.\n", gp->name);
+		}
 		return (gp);
 	}
 	/*

Modified: stable/11/sys/geom/geom_fox.c
==============================================================================
--- stable/11/sys/geom/geom_fox.c	Sun Apr 15 21:46:08 2018	(r332518)
+++ stable/11/sys/geom/geom_fox.c	Mon Apr 16 00:12:03 2018	(r332519)
@@ -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);

Modified: stable/11/sys/geom/geom_mbr.c
==============================================================================
--- stable/11/sys/geom/geom_mbr.c	Sun Apr 15 21:46:08 2018	(r332518)
+++ stable/11/sys/geom/geom_mbr.c	Mon Apr 16 00:12:03 2018	(r332519)
@@ -57,6 +57,8 @@ FEATURE(geom_mbr, "GEOM DOS/MBR partitioning support")
 #define MBR_CLASS_NAME "MBR"
 #define MBREXT_CLASS_NAME "MBREXT"
 
+static int g_mbr_once = 0;
+
 static struct dos_partition historical_bogus_partition_table[NDOSPART] = {
         { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
         { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
@@ -315,6 +317,12 @@ g_mbr_taste(struct g_class *mp, struct g_provider *pp,
 	if (LIST_EMPTY(&gp->provider)) {
 		g_slice_spoiled(cp);
 		return (NULL);
+	}
+	if (!g_mbr_once) {
+		g_mbr_once = 1;
+		printf(
+		    "WARNING: geom_mbr (geom %s) is deprecated, "
+		    "use gpart instead.\n", gp->name);
 	}
 	return (gp);
 }

Modified: stable/11/sys/geom/geom_sunlabel.c
==============================================================================
--- stable/11/sys/geom/geom_sunlabel.c	Sun Apr 15 21:46:08 2018	(r332518)
+++ stable/11/sys/geom/geom_sunlabel.c	Mon Apr 16 00:12:03 2018	(r332519)
@@ -65,6 +65,8 @@ struct g_sunlabel_softc {
 	u_char labelsum[16];
 };
 
+static int g_sunlabel_once = 0;
+
 static int
 g_sunlabel_modify(struct g_geom *gp, struct g_sunlabel_softc *ms, u_char *sec0)
 {
@@ -312,6 +314,12 @@ g_sunlabel_taste(struct g_class *mp, struct g_provider
 	g_slice_conf_hot(gp, 0, 0, SUN_SIZE,
 	    G_SLICE_HOT_ALLOW, G_SLICE_HOT_DENY, G_SLICE_HOT_CALL);
 	gsp->hot = g_sunlabel_hotwrite;
+	if (!g_sunlabel_once) {
+		g_sunlabel_once = 1;
+		printf(
+		    "WARNING: geom_sunlabel (geom %s) is deprecated, "
+		    "use gpart instead.\n", gp->name);
+	}
 	return (gp);
 }
 

Modified: stable/11/sys/geom/geom_vol_ffs.c
==============================================================================
--- stable/11/sys/geom/geom_vol_ffs.c	Sun Apr 15 21:46:08 2018	(r332518)
+++ stable/11/sys/geom/geom_vol_ffs.c	Mon Apr 16 00:12:03 2018	(r332519)
@@ -48,6 +48,7 @@ FEATURE(geom_vol, "GEOM support for volume names from 
 #define VOL_FFS_CLASS_NAME "VOL_FFS"
 
 static int superblocks[] = SBLOCKSEARCH;
+static int g_vol_ffs_once;
 
 struct g_vol_ffs_softc {
 	char *	vol;
@@ -144,6 +145,12 @@ g_vol_ffs_taste(struct g_class *mp, struct g_provider 
 	if (LIST_EMPTY(&gp->provider)) {
 		g_slice_spoiled(cp);
 		return (NULL);
+	}
+	if (!g_vol_ffs_once) {
+		g_vol_ffs_once = 1;
+		printf(
+		    "WARNING: geom_vol_Ffs (geom %s) is deprecated, "
+		    "use glabel instead.\n", gp->name);
 	}
 	return (gp);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804160012.w3G0C451008904>