sqweek <[EMAIL PROTECTED]> 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.


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to