Subject: Re: NetBSD device names
To: None <hafner@sdf-eu.org>
From: Marko Schuetz <MarkoSchuetz@web.de>
List: netbsd-help
Date: 07/06/2003 14:52:43
From: Thomas Hafner <hafner@sdf-eu.org>
Subject: NetBSD device names
Date: 06 Jul 2003 11:33:04 +0200

> Hello,
> 
> please recommend me man pages and/or documentations about NetBSD 1.6
> device names, if available. I'm still a bit confused about the device
> names (Floppy disks have to be mounted as /dev/fd?a (trailing a), but
> CDROMs as /dev/cd?d (trailing d). There is cd?d and rcd?d - what's the
> difference?).

man 4 fdc

man 4 cd

from "Design and Implementation of the 4.4 BSD Operating System" by
McKusick, Bostic, Karels and Quaterman:

   Raw  Devices and Physical I/O
   Most raw devices differ from block devices only in the way that
   they do I/O. Whereas most block devices read and write data to and
   from the system buffer cache, raw devices transfer data to and from
   user buffers. Bypassing the buffer cache eliminates the
   memory-to-memory copy that must be done by block devices, but also
   denies applications the benefits of data caching. In addition, for
   devices that support both raw- and block-device access,
   applications must take care to preserve consistency between data in
   the buffer cache and data written directly to the device; the raw
   device should be used only when the block device is
   idle. Raw-device access is used by many filesystem utilities, such
   as the filesystem check program, fsck, and by programs that read
   and write magnetic tapes -- for example, tar, dump, and restore. 

   Because raw devices bypass the buffer cache, they are responsible
   for managing their own buffer structures. Most devices borrow swap
   buffers to describe their I/O. The read and write routines use the
   physio() routine to start a raw I/O operation (see Fig. 6.3 [not
   quoted]). 
   [..]

HTH
Marko