summaryrefslogtreecommitdiffstats
path: root/sys/sys/conf.h
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1997-09-27 13:40:20 +0000
committerkato <kato@FreeBSD.org>1997-09-27 13:40:20 +0000
commitfe9b86cf0b7a453c772a2756389fda91c12c3fab (patch)
treee695260038ca9665181b5b5c99ae6fa77fba443a /sys/sys/conf.h
parent31e1d6ad00b9d8f39549115d4ef76fbee62e9748 (diff)
downloadFreeBSD-src-fe9b86cf0b7a453c772a2756389fda91c12c3fab.zip
FreeBSD-src-fe9b86cf0b7a453c772a2756389fda91c12c3fab.tar.gz
Clustered read and write are switched at mount-option level.
1. Clustered I/O is switched by the MNT_NOCLUSTERR and MNT_NOCLUSTERW bits of the mnt_flag. The sysctl variables, vfs.foo.doclusterread and vfs.foo.doclusterwrite are deleted. Only mount option can control clustered I/O from userland. 2. When foofs_mount mounts block device, foofs_mount checks D_CLUSTERR and D_CLUSTERW bits of the d_flags member in the block device switch table. If D_NOCLUSTERR / D_NOCLUSTERW are set, MNT_NOCLUSTERR / MNT_NOCLUSTERW bits will be set. In this case, MNT_NOCLUSTERR and MNT_NOCLUSTERW cannot be cleared from userland. 3. Vnode driver disables both clustered read and write. 4. Union filesystem disables clutered write. Reviewed by: bde
Diffstat (limited to 'sys/sys/conf.h')
-rw-r--r--sys/sys/conf.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index 0a7e323..194bfd9 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)conf.h 8.5 (Berkeley) 1/9/95
- * $Id: conf.h,v 1.34 1997/02/22 09:44:58 peter Exp $
+ * $Id: conf.h,v 1.35 1997/09/14 02:25:40 peter Exp $
*/
#ifndef _SYS_CONF_H_
@@ -85,6 +85,15 @@ typedef int l_modem_t __P((struct tty *tp, int flag));
#define D_DISK 2
#define D_TTY 3
+#define D_TYPEMASK 0xffff
+
+/*
+ * Flags for d_flags.
+ */
+#define D_NOCLUSTERR 0x10000 /* disables cluter read */
+#define D_NOCLUSTERW 0x20000 /* disables cluster write */
+#define D_NOCLUSTERRW (D_NOCLUSTERR | D_NOCLUSTERW)
+
/*
* Block device switch table
*/
@@ -95,7 +104,7 @@ struct bdevsw {
d_ioctl_t *d_ioctl;
d_dump_t *d_dump;
d_psize_t *d_psize;
- int d_flags;
+ u_int d_flags;
char *d_name; /* name of the driver e.g. audio */
struct cdevsw *d_cdev; /* cross pointer to the cdev */
int d_maj; /* the major number we were assigned */
OpenPOWER on IntegriCloud