struct buf * and journaled-UFS help

Tim Robbins tjr at freebsd.org
Wed Mar 3 14:34:33 PST 2004


On Wed, Mar 03, 2004 at 05:20:51PM -0500, David E. Cross wrote:

> Well, I can agree with that.... Now, "how" do I get a struct buf *?

Generally, bread() or getblk() on a vnode. The vnode can either be
that of the underlying special device (um_devvp), or, if your journal
is going to appear as a file on disk, that file's vnode (use VFS_VGET()
if the inode number is fixed, or namei() if it isn't.)


Tim


More information about the freebsd-fs mailing list