Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Feb 2011 10:24:35 +0000 (UTC)
From:      Alexander Leidinger <netchild@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r219029 - in head/sys/geom: . bde cache concat eli gate journal label linux_lvm mirror multipath part raid3 shsec stripe uzip virstor
Message-ID:  <201102251024.p1PAOZUs025635@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: netchild
Date: Fri Feb 25 10:24:35 2011
New Revision: 219029
URL: http://svn.freebsd.org/changeset/base/219029

Log:
  Add some FEATURE macros for various GEOM classes.
  
  No FreeBSD version bump, the userland application to query the features will
  be committed last and can serve as an indication of the availablility if
  needed.
  
  Sponsored by:	Google Summer of Code 2010
  Submitted by:	kibab
  Reviewed by:	silence on geom@ during 2 weeks
  X-MFC after:	to be determined in last commit with code from this project

Modified:
  head/sys/geom/bde/g_bde.c
  head/sys/geom/cache/g_cache.c
  head/sys/geom/concat/g_concat.c
  head/sys/geom/eli/g_eli.c
  head/sys/geom/gate/g_gate.c
  head/sys/geom/geom_bsd.c
  head/sys/geom/geom_fox.c
  head/sys/geom/geom_mbr.c
  head/sys/geom/geom_pc98.c
  head/sys/geom/geom_sunlabel.c
  head/sys/geom/geom_vol_ffs.c
  head/sys/geom/journal/g_journal.c
  head/sys/geom/label/g_label.c
  head/sys/geom/linux_lvm/g_linux_lvm.c
  head/sys/geom/mirror/g_mirror.c
  head/sys/geom/multipath/g_multipath.c
  head/sys/geom/part/g_part_apm.c
  head/sys/geom/part/g_part_bsd.c
  head/sys/geom/part/g_part_ebr.c
  head/sys/geom/part/g_part_gpt.c
  head/sys/geom/part/g_part_mbr.c
  head/sys/geom/part/g_part_pc98.c
  head/sys/geom/part/g_part_vtoc8.c
  head/sys/geom/raid3/g_raid3.c
  head/sys/geom/shsec/g_shsec.c
  head/sys/geom/stripe/g_stripe.c
  head/sys/geom/uzip/g_uzip.c
  head/sys/geom/virstor/g_virstor.c

Modified: head/sys/geom/bde/g_bde.c
==============================================================================
--- head/sys/geom/bde/g_bde.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/bde/g_bde.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -41,6 +41,7 @@
 #include <sys/systm.h>
 #include <sys/kernel.h>
 #include <sys/kthread.h>
+#include <sys/sysctl.h>
 
 #include <crypto/rijndael/rijndael-api-fst.h>
 #include <crypto/sha2/sha2.h>
@@ -48,6 +49,8 @@
 #include <geom/bde/g_bde.h>
 #define BDE_CLASS_NAME "BDE"
 
+FEATURE(geom_bde, "GEOM-based Disk Encryption");
+
 static void
 g_bde_start(struct bio *bp)
 {

Modified: head/sys/geom/cache/g_cache.c
==============================================================================
--- head/sys/geom/cache/g_cache.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/cache/g_cache.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -42,6 +42,8 @@ __FBSDID("$FreeBSD$");
 #include <geom/geom.h>
 #include <geom/cache/g_cache.h>
 
+FEATURE(geom_cache, "GEOM cache module");
+
 static MALLOC_DEFINE(M_GCACHE, "gcache_data", "GEOM_CACHE Data");
 
 SYSCTL_DECL(_kern_geom);

Modified: head/sys/geom/concat/g_concat.c
==============================================================================
--- head/sys/geom/concat/g_concat.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/concat/g_concat.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$");
 #include <geom/geom.h>
 #include <geom/concat/g_concat.h>
 
+FEATURE(geom_concat, "GEOM concatenation support");
 
 static MALLOC_DEFINE(M_CONCAT, "concat_data", "GEOM_CONCAT Data");
 

Modified: head/sys/geom/eli/g_eli.c
==============================================================================
--- head/sys/geom/eli/g_eli.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/eli/g_eli.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
 #include <geom/eli/g_eli.h>
 #include <geom/eli/pkcs5v2.h>
 
+FEATURE(geom_eli, "GEOM crypto module");
 
 MALLOC_DEFINE(M_ELI, "eli data", "GEOM_ELI Data");
 

Modified: head/sys/geom/gate/g_gate.c
==============================================================================
--- head/sys/geom/gate/g_gate.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/gate/g_gate.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -53,6 +53,8 @@ __FBSDID("$FreeBSD$");
 #include <geom/geom.h>
 #include <geom/gate/g_gate.h>
 
+FEATURE(geom_gate, "GEOM Gate module");
+
 static MALLOC_DEFINE(M_GATE, "gg_data", "GEOM Gate Data");
 
 SYSCTL_DECL(_kern_geom);

Modified: head/sys/geom/geom_bsd.c
==============================================================================
--- head/sys/geom/geom_bsd.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/geom_bsd.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/param.h>
 #include <sys/endian.h>
 #include <sys/systm.h>
+#include <sys/sysctl.h>
 #include <sys/kernel.h>
 #include <sys/fcntl.h>
 #include <sys/conf.h>
@@ -60,6 +61,8 @@ __FBSDID("$FreeBSD$");
 #include <geom/geom.h>
 #include <geom/geom_slice.h>
 
+FEATURE(geom_bsd, "GEOM BSD disklabels support");
+
 #define	BSD_CLASS_NAME "BSD"
 
 #define ALPHA_LABEL_OFFSET	64

Modified: head/sys/geom/geom_fox.c
==============================================================================
--- head/sys/geom/geom_fox.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/geom_fox.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -37,6 +37,7 @@
 
 #include <sys/param.h>
 #include <sys/systm.h>
+#include <sys/sysctl.h>
 #include <sys/kernel.h>
 #include <sys/conf.h>
 #include <sys/bio.h>
@@ -52,6 +53,8 @@
 #define FOX_CLASS_NAME "FOX"
 #define FOX_MAGIC	"GEOM::FOX"
 
+FEATURE(geom_fox, "GEOM FOX redundant path mitigation support");
+
 struct g_fox_softc {
 	off_t			mediasize;
 	u_int			sectorsize;

Modified: head/sys/geom/geom_mbr.c
==============================================================================
--- head/sys/geom/geom_mbr.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/geom_mbr.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/errno.h>
 #include <sys/endian.h>
 #include <sys/systm.h>
+#include <sys/sysctl.h>
 #include <sys/kernel.h>
 #include <sys/fcntl.h>
 #include <sys/malloc.h>
@@ -50,6 +51,8 @@ __FBSDID("$FreeBSD$");
 #include <geom/geom.h>
 #include <geom/geom_slice.h>
 
+FEATURE(geom_mbr, "GEOM DOS/MBR partitioning support");
+
 #define MBR_CLASS_NAME "MBR"
 #define MBREXT_CLASS_NAME "MBREXT"
 

Modified: head/sys/geom/geom_pc98.c
==============================================================================
--- head/sys/geom/geom_pc98.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/geom_pc98.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/param.h>
 #include <sys/endian.h>
 #include <sys/systm.h>
+#include <sys/sysctl.h>
 #include <sys/kernel.h>
 #include <sys/fcntl.h>
 #include <sys/malloc.h>
@@ -47,6 +48,8 @@ __FBSDID("$FreeBSD$");
 #include <geom/geom.h>
 #include <geom/geom_slice.h>
 
+FEATURE(geom_pc98, "GEOM NEC PC9800 partitioning support");
+
 #define PC98_CLASS_NAME "PC98"
 
 struct g_pc98_softc {

Modified: head/sys/geom/geom_sunlabel.c
==============================================================================
--- head/sys/geom/geom_sunlabel.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/geom_sunlabel.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/param.h>
 #include <sys/endian.h>
 #include <sys/systm.h>
+#include <sys/sysctl.h>
 #include <sys/kernel.h>
 #include <sys/conf.h>
 #include <sys/bio.h>
@@ -51,6 +52,8 @@ __FBSDID("$FreeBSD$");
 #include <geom/geom_slice.h>
 #include <machine/endian.h>
 
+FEATURE(geom_sunlabel, "GEOM Sun/Solaris partitioning support");
+
 #define SUNLABEL_CLASS_NAME "SUN"
 
 struct g_sunlabel_softc {

Modified: head/sys/geom/geom_vol_ffs.c
==============================================================================
--- head/sys/geom/geom_vol_ffs.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/geom_vol_ffs.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/param.h>
 #include <sys/errno.h>
 #include <sys/systm.h>
+#include <sys/sysctl.h>
 #include <sys/kernel.h>
 #include <sys/malloc.h>
 #include <sys/bio.h>
@@ -42,6 +43,8 @@ __FBSDID("$FreeBSD$");
 #include <geom/geom.h>
 #include <geom/geom_slice.h>
 
+FEATURE(geom_vol, "GEOM support for volume names from UFS superblock");
+
 #define VOL_FFS_CLASS_NAME "VOL_FFS"
 
 static int superblocks[] = SBLOCKSEARCH;

Modified: head/sys/geom/journal/g_journal.c
==============================================================================
--- head/sys/geom/journal/g_journal.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/journal/g_journal.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$");
 
 #include <geom/journal/g_journal.h>
 
+FEATURE(geom_journal, "GEOM journaling support");
 
 /*
  * On-disk journal format:

Modified: head/sys/geom/label/g_label.c
==============================================================================
--- head/sys/geom/label/g_label.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/label/g_label.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -36,10 +36,12 @@ __FBSDID("$FreeBSD$");
 #include <sys/bio.h>
 #include <sys/malloc.h>
 #include <sys/libkern.h>
+#include <sys/sysctl.h>
 #include <geom/geom.h>
 #include <geom/geom_slice.h>
 #include <geom/label/g_label.h>
 
+FEATURE(geom_label, "GEOM labeling support");
 
 SYSCTL_DECL(_kern_geom);
 SYSCTL_NODE(_kern_geom, OID_AUTO, label, CTLFLAG_RW, 0, "GEOM_LABEL stuff");

Modified: head/sys/geom/linux_lvm/g_linux_lvm.c
==============================================================================
--- head/sys/geom/linux_lvm/g_linux_lvm.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/linux_lvm/g_linux_lvm.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -42,6 +42,8 @@ __FBSDID("$FreeBSD$");
 
 #include <geom/linux_lvm/g_linux_lvm.h>
 
+FEATURE(geom_linux_lvm, "GEOM Linux LVM partitioning support");
+
 /* Declare malloc(9) label */
 static MALLOC_DEFINE(M_GLLVM, "gllvm", "GEOM_LINUX_LVM Data");
 

Modified: head/sys/geom/mirror/g_mirror.c
==============================================================================
--- head/sys/geom/mirror/g_mirror.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/mirror/g_mirror.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/sched.h>
 #include <geom/mirror/g_mirror.h>
 
+FEATURE(geom_mirror, "GEOM mirroring support");
 
 static MALLOC_DEFINE(M_MIRROR, "mirror_data", "GEOM_MIRROR Data");
 

Modified: head/sys/geom/multipath/g_multipath.c
==============================================================================
--- head/sys/geom/multipath/g_multipath.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/multipath/g_multipath.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
 #include <geom/geom.h>
 #include <geom/multipath/g_multipath.h>
 
+FEATURE(geom_multipath, "GEOM multipath support");
 
 SYSCTL_DECL(_kern_geom);
 SYSCTL_NODE(_kern_geom, OID_AUTO, multipath, CTLFLAG_RW, 0,

Modified: head/sys/geom/part/g_part_apm.c
==============================================================================
--- head/sys/geom/part/g_part_apm.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/part/g_part_apm.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -41,11 +41,14 @@ __FBSDID("$FreeBSD$");
 #include <sys/queue.h>
 #include <sys/sbuf.h>
 #include <sys/systm.h>
+#include <sys/sysctl.h>
 #include <geom/geom.h>
 #include <geom/part/g_part.h>
 
 #include "g_part_if.h"
 
+FEATURE(geom_part_apm, "GEOM partitioning class for Apple-style partitions");
+
 struct g_part_apm_table {
 	struct g_part_table	base;
 	struct apm_ddr		ddr;

Modified: head/sys/geom/part/g_part_bsd.c
==============================================================================
--- head/sys/geom/part/g_part_bsd.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/part/g_part_bsd.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -40,11 +40,14 @@ __FBSDID("$FreeBSD$");
 #include <sys/queue.h>
 #include <sys/sbuf.h>
 #include <sys/systm.h>
+#include <sys/sysctl.h>
 #include <geom/geom.h>
 #include <geom/part/g_part.h>
 
 #include "g_part_if.h"
 
+FEATURE(geom_part_bsd, "GEOM partitioning class for BSD disklabels");
+
 struct g_part_bsd_table {
 	struct g_part_table	base;
 	u_char			*bbarea;

Modified: head/sys/geom/part/g_part_ebr.c
==============================================================================
--- head/sys/geom/part/g_part_ebr.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/part/g_part_ebr.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -42,11 +42,19 @@ __FBSDID("$FreeBSD$");
 #include <sys/queue.h>
 #include <sys/sbuf.h>
 #include <sys/systm.h>
+#include <sys/sysctl.h>
 #include <geom/geom.h>
 #include <geom/part/g_part.h>
 
 #include "g_part_if.h"
 
+FEATURE(geom_part_ebr,
+    "GEOM partitioning class for extended boot records support");
+#if defined(GEOM_PART_EBR_COMPAT)
+FEATURE(geom_part_ebr_compat,
+    "GEOM EBR partitioning class: backward-compatible partition names");
+#endif
+
 #define	EBRSIZE		512
 
 struct g_part_ebr_table {

Modified: head/sys/geom/part/g_part_gpt.c
==============================================================================
--- head/sys/geom/part/g_part_gpt.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/part/g_part_gpt.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -41,12 +41,15 @@ __FBSDID("$FreeBSD$");
 #include <sys/queue.h>
 #include <sys/sbuf.h>
 #include <sys/systm.h>
+#include <sys/sysctl.h>
 #include <sys/uuid.h>
 #include <geom/geom.h>
 #include <geom/part/g_part.h>
 
 #include "g_part_if.h"
 
+FEATURE(geom_part_gpt, "GEOM partitioning class for GPT partitions support");
+
 CTASSERT(offsetof(struct gpt_hdr, padding) == 92);
 CTASSERT(sizeof(struct gpt_ent) == 128);
 

Modified: head/sys/geom/part/g_part_mbr.c
==============================================================================
--- head/sys/geom/part/g_part_mbr.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/part/g_part_mbr.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -40,11 +40,14 @@ __FBSDID("$FreeBSD$");
 #include <sys/queue.h>
 #include <sys/sbuf.h>
 #include <sys/systm.h>
+#include <sys/sysctl.h>
 #include <geom/geom.h>
 #include <geom/part/g_part.h>
 
 #include "g_part_if.h"
 
+FEATURE(geom_part_mbr, "GEOM partitioning class for MBR support");
+
 #define	MBRSIZE		512
 
 struct g_part_mbr_table {

Modified: head/sys/geom/part/g_part_pc98.c
==============================================================================
--- head/sys/geom/part/g_part_pc98.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/part/g_part_pc98.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -40,11 +40,14 @@ __FBSDID("$FreeBSD$");
 #include <sys/queue.h>
 #include <sys/sbuf.h>
 #include <sys/systm.h>
+#include <sys/sysctl.h>
 #include <geom/geom.h>
 #include <geom/part/g_part.h>
 
 #include "g_part_if.h"
 
+FEATURE(geom_part_pc98, "GEOM partitioning class for PC-9800 disk partitions");
+
 #define	SECSIZE		512
 #define	MENUSIZE	7168
 #define	BOOTSIZE	8192

Modified: head/sys/geom/part/g_part_vtoc8.c
==============================================================================
--- head/sys/geom/part/g_part_vtoc8.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/part/g_part_vtoc8.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -39,12 +39,15 @@ __FBSDID("$FreeBSD$");
 #include <sys/queue.h>
 #include <sys/sbuf.h>
 #include <sys/systm.h>
+#include <sys/sysctl.h>
 #include <sys/vtoc.h>
 #include <geom/geom.h>
 #include <geom/part/g_part.h>
 
 #include "g_part_if.h"
 
+FEATURE(geom_part_vtoc8, "GEOM partitioning class for SMI VTOC8 disk labels");
+
 struct g_part_vtoc8_table {
 	struct g_part_table	base;
 	struct vtoc8		vtoc;

Modified: head/sys/geom/raid3/g_raid3.c
==============================================================================
--- head/sys/geom/raid3/g_raid3.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/raid3/g_raid3.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/sched.h>
 #include <geom/raid3/g_raid3.h>
 
+FEATURE(geom_raid3, "GEOM RAID-3 functionality");
 
 static MALLOC_DEFINE(M_RAID3, "raid3_data", "GEOM_RAID3 Data");
 

Modified: head/sys/geom/shsec/g_shsec.c
==============================================================================
--- head/sys/geom/shsec/g_shsec.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/shsec/g_shsec.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
 #include <geom/geom.h>
 #include <geom/shsec/g_shsec.h>
 
+FEATURE(geom_shsec, "GEOM shared secret device support");
 
 static MALLOC_DEFINE(M_SHSEC, "shsec_data", "GEOM_SHSEC Data");
 

Modified: head/sys/geom/stripe/g_stripe.c
==============================================================================
--- head/sys/geom/stripe/g_stripe.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/stripe/g_stripe.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
 #include <geom/geom.h>
 #include <geom/stripe/g_stripe.h>
 
+FEATURE(geom_stripe, "GEOM striping support");
 
 static MALLOC_DEFINE(M_STRIPE, "stripe_data", "GEOM_STRIPE Data");
 

Modified: head/sys/geom/uzip/g_uzip.c
==============================================================================
--- head/sys/geom/uzip/g_uzip.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/uzip/g_uzip.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -36,10 +36,13 @@ __FBSDID("$FreeBSD$");
 #include <sys/mutex.h>
 #include <sys/malloc.h>
 #include <sys/systm.h>
+#include <sys/sysctl.h>
 
 #include <geom/geom.h>
 #include <net/zlib.h>
 
+FEATURE(geom_uzip, "GEOM uzip read-only compressed disks support");
+
 #undef GEOM_UZIP_DEBUG
 #ifdef GEOM_UZIP_DEBUG
 #define DPRINTF(a)	printf a

Modified: head/sys/geom/virstor/g_virstor.c
==============================================================================
--- head/sys/geom/virstor/g_virstor.c	Fri Feb 25 10:11:01 2011	(r219028)
+++ head/sys/geom/virstor/g_virstor.c	Fri Feb 25 10:24:35 2011	(r219029)
@@ -52,6 +52,8 @@ __FBSDID("$FreeBSD$");
 #include <geom/virstor/g_virstor.h>
 #include <geom/virstor/g_virstor_md.h>
 
+FEATURE(g_virstor, "GEOM virtual storage support");
+
 /* Declare malloc(9) label */
 static MALLOC_DEFINE(M_GVIRSTOR, "gvirstor", "GEOM_VIRSTOR Data");
 



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