Bug 9211

Summary: 9p: mv (rename) silently failing
Product: File System Reporter: Eric Van Hensbergen (ericvh)
Component: v9fsAssignee: Eric Van Hensbergen (ericvh)
Status: CLOSED CODE_FIX    
Severity: normal CC: sqweek
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.22 Subsystem:
Regression: --- Bisected commit-id:

Description Eric Van Hensbergen 2007-10-22 11:02:21 UTC
Sometimes a mv between directories will rename the file but leave it
in the same directory. Unfortunately it's not as reproducable as I'd
like, but here's the basic idea:

$ mkdir a b
$ touch a/c
$ while mv a/c b/d && mv b/d a/c; do 9 ls a b; done; 9 ls a b
a/c
mv: cannot stat `b/d': No such file or directory
a/d

 The second time around when I ran the loop it seemed to be working
consistently, then I ctrl-C'd it and now I have a/c *and* b/d, but
attempts to access a/c are met with "Bad file descriptor". After I
removed a/c and tried to recreate it I seem to have crashed u9fs.
 I can reproduce the problem with spfs's ufs. It took longer, and each
individual mv was quicker, but I don't know if these observations are
relevant or just circumstancial.

 Versions:
linux 2.6.22
coreutils 6.9
u9fs (non .u version, from plan9)
spfs/ufs ~20061225
Comment 1 Eric Van Hensbergen 2007-10-23 15:25:30 UTC
Fixed by Lucho w/commit 22150c4f0f02619c256f35db2f1ec912549b4ca5
pending merge into 2.6.24-rc0