Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Sep 2000 00:30:28 -0400 (EDT)
From:      Christopher Stein <stein@eecs.harvard.edu>
To:        Marc Tardif <intmktg@CAM.ORG>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: writing(2) to raw devices
Message-ID:  <Pine.OSF.4.20.0009200009510.10157-100000@wally>
In-Reply-To: <Pine.LNX.4.10.10009192302540.12429-100000@Gloria.CAM.ORG>

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

That is only if the write is to a file within a partition mounted
as an FFS file system. vn_write() contains the VOP_WRITE switch, which
will switch to the write implementation based on the vnode type. VOP_WRITE
calls through the function hanging off the vnode in the vnode op
vector at the offset specified by vop_write_desc (record defined in
sys/compile/GENERIC/vnode_if.c -- generated by a perl script from
sys/kern/vnode_if.src during kernel build). Finding out which write
implementation is actually hanging off the vnode for the raw device is
left as an exercise for the reader.

-Chris


On Tue, 19 Sep 2000, Marc Tardif wrote:

> >From The Design and Implementation of the 4.4BSD Operating System, the
> write(2) system call must go through vn_write(), ffs_write(),
> ffs_balloc(), cluster(), bio() and finally dev() which performs the actual
> disk write. Considering all this block-oriented overhead, how can dd(1)
> which calls write(2), perform raw io on devices such as /dev/rwd0? Doesn't
> write(2) confine the process to block io by its very nature?
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-hackers" in the body of the message
> 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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