Ustimenko Semen <se...@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 majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to