From owner-cvs-all Sun Sep 19 0:50: 0 1999 Delivered-To: cvs-all@freebsd.org Received: from implode.root.com (root.com [209.102.106.178]) by hub.freebsd.org (Postfix) with ESMTP id 2B94E151AE; Sun, 19 Sep 1999 00:49:55 -0700 (PDT) (envelope-from dg@implode.root.com) Received: from implode.root.com (localhost [127.0.0.1]) by implode.root.com (8.8.8/8.8.5) with ESMTP id AAA20860; Sun, 19 Sep 1999 00:48:41 -0700 (PDT) Message-Id: <199909190748.AAA20860@implode.root.com> To: Greg Lehey Cc: Matt Dillon , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: User block device access (was: cvs commit: src/sys/miscfs/specfs spec_vnops.c src/sys/sys vnode.h src/sys/kern vfs_subr.c) In-reply-to: Your message of "Sun, 19 Sep 1999 10:50:46 +0930." <19990919105045.T55065@freebie.lemis.com> From: David Greenman Reply-To: dg@root.com Date: Sun, 19 Sep 1999 00:48:41 -0700 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk >On Thursday, 16 September 1999 at 23:10:28 -0700, Matt Dillon wrote: >> dillon 1999/09/16 23:10:28 PDT >> >> Modified files: >> sys/miscfs/specfs spec_vnops.c >> sys/sys vnode.h >> sys/kern vfs_subr.c >> Log: >> Add vfs.enable_userblk_io sysctl to control whether user reads and writes >> to buffered block devices are allowed. The default is to be backwards >> compatible, i.e. reads and writes are allowed. >> >> The idea is for a larger crowd to start running with this disabled and >> see what problems, if any, crop up, and then to change the default to >> off and see if any problems crop up in the next 6 months prior to >> potentially removing support entirely. There are still a few people, >> Julian and myself included, who believe the buffered block device >> access from usermode to be useful. > >Add me to that list. What reasons have been given for disabling it? Well, for one thing, the block-buffered device existed originally because it was the mechanism that the system used to cache filesystem data. In 4.4BSD this is no longer the way it works (caching is file based), so its original purpose of existing is gone now. Second, support for device based caching causes a lot of internal problems with buffer aliasing/cache coherency whenever someone opens the device and starts using it when the underlying filesystem is also mounted. Third, since writes to buffered devices are asynchronous, there is no way to know when/if you get an I/O error (e.g. floppies or other removable media), so the most common use of the device is much better served by using the character device. The general feeling of both myself and Kirk McKusick is that the blocking/ buffering should be done at the application level and not by the kernel and that the block/buffered device should go away. -DG David Greenman Co-founder/Principal Architect, The FreeBSD Project - http://www.freebsd.org Creator of high-performance Internet servers - http://www.terasolutions.com Pave the road of life with opportunities. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message