John Polstra <[EMAIL PROTECTED]> writes:
> 1. I have a pointer to a vnode and I want to get the corresponding
> dev_t and inode number.  Is there a non-sleazy way to do that other
> than calling vn_stat?

I think you just want to call VOP_GETATTR(vp, vap, cred, proc) and
then look at vap->va_fsid and vap->va_fileid.

> 2. The first action of vn_stat is to call VOP_GETATTR.  VOP_GETATTR(9)
> says, "The file should not be locked on entry."  But when stat calls
> vn_stat, the vnode is locked.  Which is correct -- or doesn't it
> matter?

According to vnode_if.src getattr shouldn't change the locked status
of a vnode.

/assar


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to