Skip site navigation (1)Skip section navigation (2)
Date:      01 Jun 1999 09:14:49 +0300
From:      Ville-Pertti Keinonen <will@iki.fi>
To:        Ustimenko Semen <semen@iclub.nsu.ru>
Cc:        current@freebsd.org
Subject:   Re: FS Driver writing tactic
Message-ID:  <864skse9ba.fsf@not.demophon.com>
In-Reply-To: Ustimenko Semen's message of "1 Jun 1999 00:50:28 %2B0300"
References:  <Pine.BSF.4.05.9906010444460.70646-100000@iclub.nsu.ru.newsgate.clinet.fi>

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

Ustimenko Semen <semen@iclub.nsu.ru> writes:

> Is this a good tactic to write working VOP_BMAP and
> VOP_STRATEGY handlers, and implement VOP_READ and VOP_WRITE
> via bread and bwrite of own vnodes?

Considering that that's how the primary filesystem layers (ufs/ffs) do
it, it should be fair to assume that it's at least a reasonable way of
doing things.

If you *don't* do it that way...the alternative (unless you want to
bypass the cache) is to bread/bwrite the underlying device from
VOP_READ/VOP_WRITE, which avoids a layer of indirection when the cache
doesn't get hit (not very useful).  The problem is, you're not going
to be able to associate cached data with vm_objects usefully because
you're buffers are associated with the underlying (device) vnode
rather than the file vnode.


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




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