path: root/sys/sys/mdioctl.h
diff options
authorDima Dorfman <dd@FreeBSD.org>2001-08-07 19:23:16 +0000
committerDima Dorfman <dd@FreeBSD.org>2001-08-07 19:23:16 +0000
commit26a0ee75c61008e362cf4900298f942b09ebd5e2 (patch)
treea89d9c90f75b5523685db7844d5fb94cba02cc76 /sys/sys/mdioctl.h
parent5ebe32c611f85d54d26a9b8dbdfa6dccd2a363d2 (diff)
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
Notes: svn path=/head/; revision=81257
Diffstat (limited to 'sys/sys/mdioctl.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/mdioctl.h b/sys/sys/mdioctl.h
index 6ebda6b8dfaf..6b16fde61f14 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_*/