This is the mail archive of the
cygwin
mailing list for the Cygwin project.
unlink()/rmdir() on busy file on MVFS
- From: Eric Blake <ebb9 at byu dot net>
- To: cygwin at cygwin dot com
- Date: Fri, 28 Aug 2009 14:59:52 +0000 (UTC)
- Subject: unlink()/rmdir() on busy file on MVFS
I noticed this inconsistency:
shell 1:
$ df -T /cygdrive/[mu]
Filesystem Type 1K-blocks Used Available Use% Mounted on
M: mvfs 1024000 512000 512000 50% /cygdrive/m
U: smbfs 83886080 76761088 7124992 92% /cygdrive/u
$ cd /cygdrive/u
$ mkdir dir
$ touch dir/f
shell 2:
$ cd /cygdrive/u/dir
$ exec 3<f
shell 1:
$ rm dir/f
rm: cannot remove `dir/f': Device or resource busy
$ rmdir dir
rmdir: failed to remove `dir': Directory not empty
shell 2:
$ exec 3<&-
$ cd ..
shell 1:
$ rm dir/f
$ rmdir dir
$
So far, so good - since we can't delete in-use objects on remote systems, this
is nice behavior. But repeat the test on MVFS, and:
$ cd /cygdrive/m
$ mkdir dir
$ touch dir/f
shell 2:
$ cd /cygdrive/m/dir
$ exec 3<f
shell 1:
$ rm dir/f
$ ls dir
f
shell 2:
$ exec 3<&-
shell 1:
$ ls dir
$ rmdir dir
$ ls -d dir
dir
shell 2:
$ ls
ls: cannot open directory .: Permission denied
$ cd ..
shell 1:
$ ls -d dir
ls: cannot access dir: No such file or directory
Yes, the file and directory are being closed when the last client closes its
handles, but it leads to confusing non-posix semantics in the meantime.
Any advice on what to try to make MVFS behave like other remote fs to reject
deletion of in-use objects? Or do we just leave it alone, since we've already
faced more than our fair share of working around MVFS anomalies?
--
Eric Blake
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple