1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

Move objflags from vinumvar.h to vinumobj.h in preparation for

requiring fewer header files for userland programs.

Remove the gross debug device/non-debug device hack used to recognize
whether the kernel module was in sync with the userland module.
This commit is contained in:
Greg Lehey 2001-05-23 05:27:40 +00:00
parent dd3dced8c4
commit 468f05c7f7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77030

View File

@ -37,7 +37,7 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
* $Id: vinumvar.h,v 1.24 2000/03/01 02:34:57 grog Exp grog $
* $Id: vinumvar.h,v 1.27 2001/05/22 04:07:22 grog Exp grog $
* $FreeBSD$
*/
@ -146,14 +146,7 @@ enum constants {
* or the other way round.
*/
#ifdef VINUMDEBUG
#define VINUM_SUPERDEV VINUMMINOR (1, 0, 0, VINUM_SUPERDEV_TYPE) /* superdevice number */
#define VINUM_WRONGSUPERDEV VINUMMINOR (2, 0, 0, VINUM_SUPERDEV_TYPE) /* non-debug superdevice number */
#else
#define VINUM_SUPERDEV VINUMMINOR (2, 0, 0, VINUM_SUPERDEV_TYPE) /* superdevice number */
#define VINUM_WRONGSUPERDEV VINUMMINOR (1, 0, 0, VINUM_SUPERDEV_TYPE) /* debug superdevice number */
#endif
#define VINUM_DAEMON_DEV VINUMMINOR (0, 0, 0, VINUM_SUPERDEV_TYPE) /* daemon superdevice number */
/*
@ -226,46 +219,9 @@ struct devcode {
* These definitions help catch
* userland/kernel mismatches.
*/
#if VINUMDEBUG
#define VINUM_WRONGSUPERDEV_NAME VINUM_DIR"/control" /* normal super device */
#define VINUM_SUPERDEV_NAME VINUM_DIR"/Control" /* debug super device */
#else
#define VINUM_WRONGSUPERDEV_NAME VINUM_DIR"/Control" /* debug super device */
#define VINUM_SUPERDEV_NAME VINUM_DIR"/control" /* normal super device */
#endif
#define VINUM_DAEMON_DEV_NAME VINUM_DIR"/controld" /* super device for daemon only */
/*
* Flags for all objects. Most of them only apply
* to specific objects, but we currently have
* space for all in any 32 bit flags word.
*/
enum objflags {
VF_LOCKED = 1, /* somebody has locked access to this object */
VF_LOCKING = 2, /* we want access to this object */
VF_OPEN = 4, /* object has openers */
VF_WRITETHROUGH = 8, /* volume: write through */
VF_INITED = 0x10, /* unit has been initialized */
VF_WLABEL = 0x20, /* label area is writable */
VF_LABELLING = 0x40, /* unit is currently being labelled */
VF_WANTED = 0x80, /* someone is waiting to obtain a lock */
VF_RAW = 0x100, /* raw volume (no file system) */
VF_LOADED = 0x200, /* module is loaded */
VF_CONFIGURING = 0x400, /* somebody is changing the config */
VF_WILL_CONFIGURE = 0x800, /* somebody wants to change the config */
VF_CONFIG_INCOMPLETE = 0x1000, /* haven't finished changing the config */
VF_CONFIG_SETUPSTATE = 0x2000, /* set a volume up if all plexes are empty */
VF_READING_CONFIG = 0x4000, /* we're reading config database from disk */
VF_FORCECONFIG = 0x8000, /* configure drives even with different names */
VF_NEWBORN = 0x10000, /* for objects: we've just created it */
VF_CONFIGURED = 0x20000, /* for drives: we read the config */
VF_STOPPING = 0x40000, /* for vinum_conf: stop on last close */
VF_DAEMONOPEN = 0x80000, /* the daemon has us open (only superdev) */
VF_CREATED = 0x100000, /* for volumes: freshly created, more then new */
VF_HOTSPARE = 0x200000, /* for drives: use as hot spare */
VF_RETRYERRORS = 0x400000, /* don't down subdisks on I/O errors */
};
/*
* Slice header
*