delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/01/18/11:10:17

X-Spam-Check-By: sourceware.org
Date: Wed, 18 Jan 2006 17:10:00 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: "replaced while being copied" - was ... RE: Solved partially by findutils 4.3 - RE: "inode changed", ...
Message-ID: <20060118161000.GB16164@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CCAC2F20421E784A87FAFDB3E0EC5572016FF1D8 AT DEVXCH1 DOT brainlab DOT net>
Mime-Version: 1.0
In-Reply-To: <CCAC2F20421E784A87FAFDB3E0EC5572016FF1D8@DEVXCH1.brainlab.net>
User-Agent: Mutt/1.4.2i
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Jan 18 15:47, Jan Schormann wrote:
> Eric wrote on Wednesday, January 18, 2006 3:14 PM:
> > In which case, an strace may be interesting to show why stat()
> > is giving different inodes on the same network share file when it
> > has not been modified.
> 
> Does this help? See attachment.
> 
> ----
> ~$ strace cp -f //desdata2/universal/Sourcecode/test.exe /f/tmp >&
> /f/tmp/cp-strace.txt
> ----
> 
> > Also, do you know what filesystem (NFS, Samba, etc.) is on
> > //desdata1/divisions/ and //desdata2/universal/?  This will
> > probably be relevant, but Corinna will have to chime in here
> > (as I cannot reproduce the problem).
> 
> Hm, I know it's a Network Appliance filer, and I guess they have
> their own file system (but could dig deeper, if you like). Anyway,
> I'm using it as a "mapped network drive" so I'm guessing SMB (where
> else can I look?), while the Windows explorer "Properties" dialog calls
> it "NTFS". Oh, in case this makes a difference: "/f" is a local NTFS
> partition.

Your strace shows that the inode number of the file changes in two
subsequent calls to stat.  This is unfortunate, to say the least.
Can you give us more information about the remote file system?  Is
that Clear Case or something like that?  Could you please build and
run the below test application like this:

  $ gcc -o getvolinfo getvolinfo.c
  $ ./getvolinfo //desdata2/universal

and send the output to this list?


Thanks,
Corinna


==================== SNIP ====================
#include <stdio.h>
#include <string.h>
#include <sys/cygwin.h>
#define _WIN32_WINNT 0x0500
#include <windows.h>

#ifndef FILE_READ_ONLY_VOLUME
#define FILE_READ_ONLY_VOLUME 0x80000
#endif

int
main (int argc, char **argv)
{
  char winpath[256];
  char rootdir[256];
  char volname[256];
  char fsname[256];
  DWORD sernum = 0;
  DWORD maxlen = 0;
  DWORD flags = 0;

  if (argc < 2)
    {
      fprintf (stderr, "usage: %s path\n", argv[0]);
      return 1;
    }
  cygwin_conv_to_full_win32_path (argv[1], winpath);
  if (!GetVolumePathName(winpath, rootdir, 256))
    {
      fprintf (stderr, "GetVolumePathName: %d\n", GetLastError ());
      return 1;
    }
  printf ("rootdir: %s\n", rootdir);
  if (!GetVolumeInformation (rootdir, volname, 256, &sernum,
                             &maxlen, &flags, fsname, 256))
    {
      fprintf (stderr, "GetVolumeInformation: %d\n", GetLastError ());
      return 1;
    }
  printf ("Volume Name        : <%s>\n", volname);
  printf ("Serial Number      : %lu\n", sernum);
  printf ("Max Filenamelength : %lu\n", maxlen);
  printf ("Filesystemname     : <%s>\n", fsname);
  printf ("Flags:\n");

  printf ("  FILE_CASE_SENSITIVE_SEARCH  : %s\n",
          (flags & FILE_CASE_SENSITIVE_SEARCH) ? "TRUE" : "FALSE");
  printf ("  FILE_CASE_PRESERVED_NAMES   : %s\n",
          (flags & FILE_CASE_PRESERVED_NAMES) ? "TRUE" : "FALSE");
  printf ("  FILE_UNICODE_ON_DISK        : %s\n",
          (flags & FILE_UNICODE_ON_DISK) ? "TRUE" : "FALSE");
  printf ("  FILE_PERSISTENT_ACLS        : %s\n",
          (flags & FILE_PERSISTENT_ACLS) ? "TRUE" : "FALSE");
  printf ("  FILE_FILE_COMPRESSION       : %s\n",
          (flags & FILE_FILE_COMPRESSION) ? "TRUE" : "FALSE");
  printf ("  FILE_VOLUME_QUOTAS          : %s\n",
          (flags & FILE_VOLUME_QUOTAS) ? "TRUE" : "FALSE");
  printf ("  FILE_SUPPORTS_SPARSE_FILES  : %s\n",
          (flags & FILE_SUPPORTS_SPARSE_FILES) ? "TRUE" : "FALSE");
  printf ("  FILE_SUPPORTS_REPARSE_POINTS: %s\n",
          (flags & FILE_SUPPORTS_REPARSE_POINTS) ? "TRUE" : "FALSE");
  printf ("  FILE_SUPPORTS_REMOTE_STORAGE: %s\n",
          (flags & FILE_SUPPORTS_REMOTE_STORAGE) ? "TRUE" : "FALSE");
  printf ("  FILE_VOLUME_IS_COMPRESSED   : %s\n",
          (flags & FILE_VOLUME_IS_COMPRESSED) ? "TRUE" : "FALSE");
  printf ("  FILE_SUPPORTS_OBJECT_IDS    : %s\n",
          (flags & FILE_SUPPORTS_OBJECT_IDS) ? "TRUE" : "FALSE");
  printf ("  FILE_SUPPORTS_ENCRYPTION    : %s\n",
          (flags & FILE_SUPPORTS_ENCRYPTION) ? "TRUE" : "FALSE");
  printf ("  FILE_NAMED_STREAMS          : %s\n",
          (flags & FILE_NAMED_STREAMS) ? "TRUE" : "FALSE");
  printf ("  FILE_READ_ONLY_VOLUME       : %s\n",
          (flags & FILE_READ_ONLY_VOLUME) ? "TRUE" : "FALSE");
  return 0;
}
==================== SNAP ====================

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019