From owner-freebsd-fs Fri Nov 15 11:11:39 2002 Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5518737B401 for ; Fri, 15 Nov 2002 11:11:38 -0800 (PST) Received: from vbook.express.ru (vbook.nc.express.ru [212.24.37.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C76243E9C for ; Fri, 15 Nov 2002 11:11:30 -0800 (PST) (envelope-from vova@sw.ru) Received: from vova by vbook.express.ru with local (Exim 4.10) id 18Cls5-0000IW-00 for fs@freebsd.org; Fri, 15 Nov 2002 22:11:17 +0300 Subject: Question about not locked vnode in VOP_RENAME From: "Vladimir B. " Grebenschikov To: fs@freebsd.org Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: SWsoft Inc. Message-Id: <1037387476.1037.6.camel@vbook> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.1.2 (Preview Release) Date: 15 Nov 2002 22:11:17 +0300 Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi ppl Question about int VOP_RENAME(struct vnode *fdvp, struct vnode *fvp, struct componentname *fcnp, struct vnode *tdvp, struct vnode *tvp, struct componentname *tcnp); It gets fdvp unlocked. Why it is differ from other similar VOPs. What will happens if between VOP_LOOKUP and VOP_RENAME another VOP_LOOKUP will happens, say for for file removal in same directory ? Second lookup can destroy in-inode data (for ufs) saved by first lookup. It is seems that panics http://spitfire.velocet.net/pipermail/freebsd-stable/2002-January/025074.html http://docs.freebsd.org/mail/archive/1998/freebsd-current/19980913.freebsd-current.html are because this race. -- Vladimir B. Grebenschikov SWsoft Inc. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message