aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_conf.c
diff options
context:
space:
mode:
authorKATO Takenori <kato@FreeBSD.org>1997-09-27 13:40:20 +0000
committerKATO Takenori <kato@FreeBSD.org>1997-09-27 13:40:20 +0000
commit81bca6ddae8d2ed045ada4d1dc3d1ba214b5b364 (patch)
tree531e60adf6f57225cae1ac4c6f4e5e93b5ecedc9 /sys/kern/kern_conf.c
parenta7eacb17d7e75d02d98b462ddf952a89738c8b7b (diff)
downloadsrc-81bca6ddae8d2ed045ada4d1dc3d1ba214b5b364.tar.gz
src-81bca6ddae8d2ed045ada4d1dc3d1ba214b5b364.zip
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
Notes
Notes: svn path=/head/; revision=29888
Diffstat (limited to 'sys/kern/kern_conf.c')
-rw-r--r--sys/kern/kern_conf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
index 103064826c74..fba334b897ef 100644
--- a/sys/kern/kern_conf.c
+++ b/sys/kern/kern_conf.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: kern_conf.c,v 1.20 1997/09/21 22:14:54 julian Exp $
+ * $Id: kern_conf.c,v 1.21 1997/09/21 22:20:12 julian Exp $
*/
#include <sys/param.h>
@@ -198,10 +198,12 @@ bdevsw_add_generic(int bdev, int cdev, struct bdevsw *bdevsw)
/*
* XXX hack alert.
*/
- if (isdisk(makedev(bdev, 0), VBLK) && bdevsw->d_flags != D_DISK) {
+ if (isdisk(makedev(bdev, 0), VBLK) &&
+ (bdevsw->d_flags & D_TYPEMASK) != D_DISK) {
printf("bdevsw_add_generic: adding D_DISK flag for device %d\n",
bdev);
- bdevsw->d_flags = D_DISK;
+ bdevsw->d_flags &= ~D_TYPEMASK;
+ bdevsw->d_flags |= D_DISK;
}
cdevsw_make(bdevsw);
dev = makedev(cdev, 0);