bug-coreutils
[Top][All Lists]
Advanced

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

Re: 'cp: .snapshot/xxx and xxx are identical'


From: Paul Eggert
Subject: Re: 'cp: .snapshot/xxx and xxx are identical'
Date: Mon, 07 Mar 2005 11:23:23 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Jim Meyering <address@hidden> writes:

> Can someone make sure this patch works and let me know?
> Just apply it, build cp, and then run a command like
>
>   ./cp .snapshot/F F
>
> for some file F, on a NetApp-backed file system.
> The above command should succeed, while using an
> unpatched `cp' should fail.

I just tried it on a Solaris 8 host with a remote NetApp filesystem,
and it sort of worked, but it had problems.

1.  Patched GNU "cp .snapshot/weekly.1/F F" fails if F has not been
    changed since the snapshot.  It succeeds only if F has changed.
    This is pretty weird, especially if you do "cp
    .snapshot/weekly.1/* ."  and get a bunch of error messages for
    your unchanged files.

2.  Solaris 8 "cp .snapshot/weekly.1/F F" fails regardless of whether
    F has changed, with these symptoms:

    $ /bin/cp -p .snapshot/weekly.1/rcs-5.7.tar.gz rcs-5.7.tar.gz
    cp: .snapshot/weekly.1/rcs-5.7.tar.gz and rcs-5.7.tar.gz are identical

    So if we make this change to GNU "cp", it won't be compatible with
    Solaris "cp".

The simplest approach is to leave cp alone, so that we're compatible
with Solaris 8.  Admittedly that is unsatisfying.

Tim, do you have contacts with Network Appliance?  Is there some way
an application program can discover whether two file descriptors
actually point to the same Network Appliance file?  Perhaps we could
special-case it, if we discover the inode numbers and devices are the
same, and the file system type is "nfs".  This has got to be an FAQ
with Network Appliance, since people have been complaining about it
for more than a decade -- perhaps they have a solution or fix by now.




reply via email to

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