Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 09 Oct 1999 08:53:04 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        arch@freebsd.org, mckusick@mckusick.com, core@freebsd.org
Subject:   Re: The eventual fate of BLOCK devices. 
Message-ID:  <9797.939451984@critter.freebsd.dk>
In-Reply-To: Your message of "Fri, 08 Oct 1999 19:06:30 PDT." <Pine.BSF.4.10.9910081840300.8009-100000@current1.whistle.com> 

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9797.939451984>