Re: svn commit: r322318 - in head: share/man/man4 sys/conf sys/geom

2017-08-10 Thread Bruce Evans

On Wed, 9 Aug 2017, Warner Losh wrote:


Log:
 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.


geom_bsd (and possibly geom_mbr) can't be remove because they provide more
features than geom_part*.

The only loss that I noticed is for nested partitions on a backup drive:

GEOM_BSD + GEOM_MBR gives:

da1 da1s4aa da1s4be da1s4cs3d   da1s4e
da1s1   da1s4ac da1s4c  da1s4cs4da1s4f
da1s1a  da1s4ad da1s4cs1da1s4cs4a   da1s4g
da1s1c  da1s4b  da1s4cs2da1s4cs4c
da1s3   da1s4ba da1s4cs3da1s4cs4d
da1s4   da1s4bc da1s4cs3a   da1s4cs4e
da1s4a  da1s4bd da1s4cs3c   da1s4d

Here da1s4 = da1s4c contains an image backup of a whole drive modified
to hold a BSD label in the second sector.  The first sector contains
a copy of the MBR of the original drive, with offsets adjusted.  This
works right nested, but can only point to 4 slices.  The BSD label
points to these 4 and has 2 extras (for damaged and/or recovery areas).

The nested MBR gives slices da1s4cs[1-4].  da1s4cs[3-4] are BSD slices
containing nested labels.  These give the nested partitions
da1s4cs[3-4][a-h].

The BSD label in da1s4 gives aliases for da1s4cs[1-4].  2 of these
are for BSD slices (da1s4a == da1s4cs3 and da1s4b == da1s4cs4).  Nested
labels in these give the nested alasias da1s4[a-b][a-h].

GEOM_PART_BSD + GEOM_PART_EBR + GEM_PART_EBR_COMPAT + GEOM_PART_MBR only
gives:

da1 da1s1a  da1s4   da1s4b  da1s4e  da1s4g
da1s1   da1s3   da1s4a  da1s4d  da1s4f

It doesn't give any nesting.  It doesn't create 'c' devices for this or
any other drive.

Nesting and aliases give large complications, and I don't like even the
2-level MBR+label nesting that I normally use, but the above is what
turned up naturally and it is too hard to untangle it.

Bruce
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r322318 - in head: share/man/man4 sys/conf sys/geom

2017-08-09 Thread Warner Losh
Author: imp
Date: Wed Aug  9 16:15:24 2017
New Revision: 322318
URL: https://svnweb.freebsd.org/changeset/base/322318

Log:
  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.
  
  MFC After: 3 days
  Differential Revision: https://reviews.freebsd.org/D11935
  
  Note: Classes will be removed after MFC

Modified:
  head/share/man/man4/geom.4
  head/share/man/man4/geom_fox.4
  head/sys/conf/NOTES
  head/sys/geom/geom_bsd.c
  head/sys/geom/geom_mbr.c
  head/sys/geom/geom_sunlabel.c
  head/sys/geom/geom_vol_ffs.c

Modified: head/share/man/man4/geom.4
==
--- head/share/man/man4/geom.4  Wed Aug  9 15:38:24 2017(r322317)
+++ head/share/man/man4/geom.4  Wed Aug  9 16:15:24 2017(r322318)
@@ -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
@@ -71,10 +68,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
@@ -449,6 +444,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: head/share/man/man4/geom_fox.4
==
--- head/share/man/man4/geom_fox.4  Wed Aug  9 15:38:24 2017
(r322317)
+++ head/share/man/man4/geom_fox.4  Wed Aug  9 16:15:24 2017
(r322318)
@@ -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: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Wed Aug  9 15:38:24 2017(r322317)
+++ head/sys/conf/NOTES Wed Aug  9 16:15:24 2017(r322318)
@@ -147,17 +147,17 @@ options   BOOTHOWTO=RB_MULTIPLE
 
 optionsGEOM_AES# Don't use, use GEOM_BDE
 optionsGEOM_BDE# Disk encryption.
-optionsGEOM_BSD# BSD disklabels
+optionsGEOM_BSD# BSD disklabels (obsolete, gone in 12)
 optionsGEOM_CACHE  # Disk cache.
 optionsGEOM_CONCAT # Disk concatenation.
 optionsGEOM_ELI# Disk encryption.
-optionsGEOM_FOX# Redundant path mitigation
+optionsGEOM_FOX# Redundant path mitigation (obsolete, 
gone in 12)
 optionsGEOM_GATE   # Userland services.
 optionsGEOM_JOURNAL# Journaling.
 optionsGEOM_LABEL  # Providers labelization.
 optionsGEOM_LINUX_LVM  # Linux LVM2 volumes
 optionsGEOM_MAP# Map based partitioning
-optionsGEOM_MBR# DOS/MBR partitioning
+optionsGEOM_MBR# DOS/MBR partitioning (obsolete, gone 
in 12)
 optionsGEOM_MIRROR # Disk mirroring.
 optionsGEOM_MULTIPATH  # Disk multipath
 optionsGEOM_NOP# Test class.
@@ -174,11 +174,11 @@ options   GEOM_RAID   # Soft RAID 
functionality.
 optionsGEOM_RAID3  # RAID3 functionality.
 optionsGEOM_SHSEC  # Shared secret.
 optionsGEOM_STRIPE # Disk striping.
-optionsGEOM_SUNLABEL   # Sun/Solaris partitioning
+optionsGEOM_SUNLABEL   # Sun/Solaris partitioning (obsolete, 
gone in 12)
 optionsGEOM_UZIP