From owner-freebsd-arch Fri Oct 8 23:53:20 1999 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id 884DF14FF6 for ; Fri, 8 Oct 1999 23:53:17 -0700 (PDT) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id IAA06524 for ; Sat, 9 Oct 1999 08:53:17 +0200 (CEST) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id IAA51024 for freebsd-arch@freebsd.org; Sat, 9 Oct 1999 08:53:16 +0200 (MET DST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by hub.freebsd.org (Postfix) with ESMTP id B31D614FF6; Fri, 8 Oct 1999 23:53:08 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.9.3/8.9.2) with ESMTP id IAA09799; Sat, 9 Oct 1999 08:53:04 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: arch@freebsd.org, mckusick@mckusick.com, core@freebsd.org Subject: Re: The eventual fate of BLOCK devices. In-reply-to: Your message of "Fri, 08 Oct 1999 19:06:30 PDT." Date: Sat, 09 Oct 1999 08:53:04 +0200 Message-ID: <9797.939451984@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG My position on this is as earlier stated: The use of block vs. char to decide if buffering should be used or not, leads to complexity and bites users who are used to Linux. I think that buffering behaviour should be specifically enabled with an ioctl(), and be reset to unbuffered on close. Since we currently don't have a defined semantics for mmap() on disk like devices, implmenting buffered behaviour through mmap() can be done in addition to the above mentioned ioctl. The migration path: 1. Implement an ioctl(DIOC_SCACHE) to enable buffered behaviour. 2. Make access to /dev/foo and /dev/rfoo from userland act the same. 3. Collapse behaviour of VBLK and VCHR vnodes in the kernel, so that they act all the same, apart from stat(2), mknod(2) and nfs exports. 4. Remove the block major numbers from device drivers, substituting a static, recording the, from this point forward, historical mapping from bmaj to cmaj. 5. Fix userland progams which know too much about blk/chr devices: mount, fdisk, fsck, newfs etc. etc. 6. Change MAKEDEV and sysinstall to only create char devices. 7. Change sysinstall to not create /dev/rfoo device nodes. -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message