X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Eric Blake Subject: cross-device mv regression in latest snapshot Date: Fri, 31 Aug 2007 14:05:27 +0000 (UTC) Lines: 82 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com I'm trying to track down a breakage in cross-device moves in the latest cygwin CVS code, whether it is in coreutils-9.6-5 or due to a recent cygwin change, although my current suspect is Corinna's changes. The symptoms of the problem are that I am no longer able to use mv to copy files from my local NTFS drive to a Clearcase network share (MVFS file system) or Samba share. However, an empty file is created at the target location, prior to the failure. And somehow, cp does not have the problem, nor does a netapp NFS drive. Once mv encounters the EXDEV rename() failure, it falls back to code shared with cp, so I'm not sure why only mv is triggering the EPERM failure when attempting the copy. The trace below is from a self-built dll, but at least the 20070813 snapshot also shows the same problem. Do you need an strace snippet? Do you need me to try various CVS dates to try and narrow down the regression? [Oh, and kudos to the nice new look of df -T in recent snapshots, thanks to the statvfs improvements. But should we teach it how to recognize clearcase MVFS devices?] $ uname -a CYGWIN_NT-5.1 EBLAKE 1.7.0(0.177/4/2) 2007-08-27 10:46 i686 Cygwin $ df -T ~ . /cygdrive/f /cygdrive/u Filesystem Type 1K-blocks Used Available Use% Mounted on C:\cygwin ntfs,fixed 156248156 29206196 127041960 19% / m: unknown,remote 1024000 512000 512000 50% /cygdrive/m f: netapp,remote 304087040 300238868 3848172 99% /cygdrive/f u: smbfs,remote 94371840 87416832 6955008 93% /cygdrive/u $ /tmp/volinfo . Device Type : 7 Characteristics : 10 Volume Name : Serial Number : 36984713 Max Filenamelength : 255 Filesystemname : Flags : 3 FILE_CASE_SENSITIVE_SEARCH : TRUE FILE_CASE_PRESERVED_NAMES : TRUE FILE_UNICODE_ON_DISK : FALSE FILE_PERSISTENT_ACLS : FALSE FILE_FILE_COMPRESSION : FALSE FILE_VOLUME_QUOTAS : FALSE FILE_SUPPORTS_SPARSE_FILES : FALSE FILE_SUPPORTS_REPARSE_POINTS: FALSE FILE_SUPPORTS_REMOTE_STORAGE: FALSE FILE_VOLUME_IS_COMPRESSED : FALSE FILE_SUPPORTS_OBJECT_IDS : FALSE FILE_SUPPORTS_ENCRYPTION : FALSE FILE_NAMED_STREAMS : FALSE FILE_READ_ONLY_VOLUME : FALSE FILE_SEQUENTIAL_WRITE_ONCE : FALSE FILE_SUPPORTS_TRANSACTIONS : FALSE $ rm -f ~/file1 file2 $ echo hi > ~/file1 $ mv ~/file1 file2 mv: cannot create regular file `file2': Permission denied $ ls -l ~/file1 file2 -rw-r--r-- 1 eblake Domain Users 3 Aug 31 07:50 /home/eblake/file1 -rw-r--r-- 1 eblake Domain Users 0 Aug 31 07:50 file2 $ cp -f ~/file1 file2 $ ls -l ~/file1 file2 -rw-r--r-- 1 eblake Domain Users 3 Aug 31 07:50 /home/eblake/file1 -rw-r--r-- 1 eblake Domain Users 3 Aug 31 07:53 file2 $ cd /cygdrive/f; rm -f file2 $ cp -f ~/file1 file2 $ ls -l ~/file1 file2 ls: cannot access /home/eblake/file1: No such file or directory -rw-r--r-- 1 eblake Domain Users 3 Aug 31 07:53 file2 $ mv file2 ~/file1 $ cd /cygdrive/u; rm -f file2 $ mv ~/file1 file2 mv: cannot create regular file `file2': Permission denied $ ls -l ~/file1 file2 -rw-r--r-- 1 eblake Domain Users 3 Aug 31 07:50 /home/eblake/file1 -rw-r--r-- 1 eblake Domain Users 0 Aug 31 08:01 file2 $ cp -f ~/file1 file2 $ ls -l ~/file1 file2 -rw-r--r-- 1 eblake Domain Users 3 Aug 31 07:50 /home/eblake/file1 -rw-r--r-- 1 eblake Domain Users 3 Aug 31 08:01 file2 -- Eric Blake -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/