summaryrefslogtreecommitdiffstats
path: root/sys/sys/mdioctl.h
diff options
context:
space:
mode:
authordd <dd@FreeBSD.org>2001-08-07 19:23:16 +0000
committerdd <dd@FreeBSD.org>2001-08-07 19:23:16 +0000
commit045a8bbdf3d204f9af49aeba72bc5c7d309b57ec (patch)
treea89d9c90f75b5523685db7844d5fb94cba02cc76 /sys/sys/mdioctl.h
parentb80b9bc08636427818bc7ee7ac20841643ad1025 (diff)
downloadFreeBSD-src-045a8bbdf3d204f9af49aeba72bc5c7d309b57ec.zip
FreeBSD-src-045a8bbdf3d204f9af49aeba72bc5c7d309b57ec.tar.gz
Introduce a force option, MD_FORCE, that instructs the driver to
bypass some extra anti-foot-shooting measures. Currently, its only effect is to allow detaching a device while it's still open (e.g., mounted). This is useful for testing how the system reacts to a disk suddenly going away, which can happen with some removeable media. At this point, the force option is only checked on detach, so it would've been possible to allow the option to be passed with the MDIOCDETACH operation. This was not done to allow the possibility of having the force flag influence other tests in the future, which may not necessarily deal with detaching the device. Reviewed by: sobomax Approved by: phk
Diffstat (limited to 'sys/sys/mdioctl.h')
-rw-r--r--sys/sys/mdioctl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/mdioctl.h b/sys/sys/mdioctl.h
index 6ebda6b..6b16fde 100644
--- a/sys/sys/mdioctl.h
+++ b/sys/sys/mdioctl.h
@@ -84,5 +84,6 @@ struct md_ioctl {
#define MD_AUTOUNIT 0x04 /* Assign next free unit */
#define MD_READONLY 0x08 /* Readonly mode */
#define MD_COMPRESS 0x10 /* Compression mode */
+#define MD_FORCE 0x20 /* Don't try to prevent foot-shooting */
#endif /* _SYS_MDIOCTL_H_*/
OpenPOWER on IntegriCloud