From owner-freebsd-hackers Sun Aug 15 19:29: 5 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from assaris.sics.se (assaris.sics.se [193.10.66.108]) by hub.freebsd.org (Postfix) with ESMTP id 52AC314BE1 for ; Sun, 15 Aug 1999 19:29:01 -0700 (PDT) (envelope-from assar@sics.se) Received: (from assar@localhost) by assaris.sics.se (8.9.3/8.7.3) id EAA07342; Mon, 16 Aug 1999 04:30:16 +0200 (CEST) To: John Polstra Cc: hackers@FreeBSD.ORG Subject: Re: Getting device and inode number from a vnode References: Mime-Version: 1.0 (generated by tm-edit 7.68) Content-Type: text/plain; charset=US-ASCII From: Assar Westerlund Date: 16 Aug 1999 04:30:15 +0200 In-Reply-To: John Polstra's message of "Sun, 15 Aug 1999 14:56:45 -0700 (PDT)" Message-ID: <5lhfm0lao7.fsf@assaris.sics.se> Lines: 17 X-Mailer: Gnus v5.5/Emacs 19.34 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG John Polstra 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 majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message