NetBSD Problem Report #42210
From www@NetBSD.org Wed Oct 21 19:27:25 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 31DEB63B902
for <gnats-bugs@gnats.netbsd.org>; Wed, 21 Oct 2009 19:27:25 +0000 (UTC)
Message-Id: <20091021192721.693D163B8B6@www.NetBSD.org>
Date: Wed, 21 Oct 2009 19:27:21 +0000 (UTC)
From: pooka@iki.fi
Reply-To: pooka@iki.fi
To: gnats-bugs@NetBSD.org
Subject: rename EXDEV & abortop fail
X-Send-Pr-Version: www-1.0
>Number: 42210
>Category: kern
>Synopsis: rename EXDEV & abortop fail
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Oct 21 19:30:00 +0000 2009
>Closed-Date: Sun Jun 17 20:22:18 +0000 2012
>Last-Modified: Sun Jun 17 20:22:18 +0000 2012
>Originator: Antti Kantee
>Release:
>Organization:
read it and weep inc.
>Environment:
>Description:
In a new and exciting episode of "I thought we fixed the last bug
from rename last week", plenty of drivers will happily fail VOP_RENAME
with EXDEV but neglect to call VOP_ABORTOP. Notably, since one of the
vnodes might be of completely different type, a given driver
cannot decide to just not call abortop because it "knows" it's
not required.
>How-To-Repeat:
>Fix:
Is there some layering marvel preventing us from checking for
EXDEV before calling rename? otherwise, have fun
>Release-Note:
>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/42210: rename EXDEV & abortop fail
Date: Thu, 22 Oct 2009 00:28:51 +0000
On Wed, Oct 21, 2009 at 07:30:00PM +0000, pooka@iki.fi wrote:
> In a new and exciting episode of "I thought we fixed the last bug
> from rename last week", plenty of drivers will happily fail VOP_RENAME
> with EXDEV but neglect to call VOP_ABORTOP. Notably, since one of the
> vnodes might be of completely different type, a given driver
> cannot decide to just not call abortop because it "knows" it's
> not required.
Maybe we can abolish ABORTOP? Only onionfs uses it, but the purpose of
the onionfs code in question is clear as mud...
> Is there some layering marvel preventing us from checking for
> EXDEV before calling rename? otherwise, have fun
I have been attempting to figure that one myself, and I don't know of
any valid reason.
--
David A. Holland
dholland@netbsd.org
From: Antti Kantee <pooka@iki.fi>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/42210: rename EXDEV & abortop fail
Date: Thu, 22 Oct 2009 14:39:13 +0300
On Thu Oct 22 2009 at 00:30:04 +0000, David Holland wrote:
> Maybe we can abolish ABORTOP? Only onionfs uses it, but the purpose of
> the onionfs code in question is clear as mud...
libp2k uses it. Admittedly, it could do without it with more implicit
magic, but I think there's enough implicit magic going on as-is.
Feel free to look at p2k_node_lookup().
No, I don't mind if you fix the componentname handling ;)
> > Is there some layering marvel preventing us from checking for
> > EXDEV before calling rename? otherwise, have fun
>
> I have been attempting to figure that one myself, and I don't know of
> any valid reason.
We really really need to come up with a set of tests which define the
requirements for vfs & file systems. Currently there are just too many
butterfly effects ...
From: Antti Kantee <pooka@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/42210 CVS commit: src/sys/fs/puffs
Date: Thu, 19 Nov 2009 16:21:04 +0000
Module Name: src
Committed By: pooka
Date: Thu Nov 19 16:21:04 UTC 2009
Modified Files:
src/sys/fs/puffs: puffs_vnops.c
Log Message:
Send VOP_ABORTOP() in case attempting cross-dev rename, part of
PR kern/42210. Also, fix a memory management error in said case.
To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/sys/fs/puffs/puffs_vnops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/42210 CVS commit: [netbsd-5] src/sys/fs/puffs
Date: Sat, 28 Nov 2009 16:00:17 +0000
Module Name: src
Committed By: bouyer
Date: Sat Nov 28 16:00:17 UTC 2009
Modified Files:
src/sys/fs/puffs [netbsd-5]: puffs_vnops.c
Log Message:
Pull up following revision(s) (requested by pooka in ticket #1154):
sys/fs/puffs/puffs_vnops.c: revision 1.140
Send VOP_ABORTOP() in case attempting cross-dev rename, part of
PR kern/42210. Also, fix a memory management error in said case.
To generate a diff of this commit:
cvs rdiff -u -r1.129.4.4 -r1.129.4.5 src/sys/fs/puffs/puffs_vnops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 17 Jun 2012 20:22:18 +0000
State-Changed-Why:
EXDEV is detected in fs-independent rename code now, so this is
no longer an issue. The fact that libp2k uses ABORTOP is a bug
of sorts but we don't need to keep this PR open just because of
that.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.