bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils-6.4: mv(1), rename(2) and 9p


From: Paul Eggert
Subject: Re: coreutils-6.4: mv(1), rename(2) and 9p
Date: Fri, 05 Jan 2007 10:19:26 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

sqweek <address@hidden> writes:

> Quoting from copy.c (just above the patch):

Sure, but that quote talks about another problem: cross-device
renames that POSIX says should fail with errno == EXDEV but
instead fail with errno having some other value.

What we have here is a file system where POSIX says a within-device
rename should succeed, but instead it fails with errno == EPERM.  That
is a different situation.

That being said, it might be nice to work around the incompatibility
if it doesn't adversely affect ordinary uses of 'mv'.  However, the
patch suggested in
<http://lists.gnu.org/archive/html/bug-coreutils/2007-01/msg00018.html>
is obviously too broad, since it will cause 'mv' to mishandle ordinary
cases of EPERM.

If there is a cheap way to figure out that this file system is
non-conforming, and to work around the problem just for this file
system and just for files on that file system where the EPERM is not
conforming to POSIX, then we'd be on the right track.  But I'm
skeptical that a cheap workaround is possible (i.e., one that doesn't
harm performance for all other file systems).

This problem will affect lots of applications, so to some extent
you're swimming upstream trying to patch coreutils to work around the
problem.  Perhaps you might try changing the 9p file system instead,
so that it supports renames as POSIX requires.  Another (far less
satisfactory, but perhaps adequate) possibility would be to modify 9p
so that it reports EXDEV for cross-directory renames.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]