public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: "replaced while being copied" - was ... RE: Solved partially by findutils 4.3 - RE: "inode changed", ...
Date: Wed, 18 Jan 2006 16:18:00 -0000	[thread overview]
Message-ID: <20060118161000.GB16164@calimero.vinschen.de> (raw)
In-Reply-To: <CCAC2F20421E784A87FAFDB3E0EC5572016FF1D8@DEVXCH1.brainlab.net>

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/

  reply	other threads:[~2006-01-18 16:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-18 15:05 Jan Schormann
2006-01-18 16:18 ` Corinna Vinschen [this message]
2006-01-23 12:28   ` Jonas Mölsä
2006-01-23 15:23     ` Corinna Vinschen
2006-01-24 10:14       ` Jonas Mölsä
2006-01-24 12:09         ` Re: Corinna Vinschen
2006-01-23 12:45 "replaced while being copied" - was ... RE: Solved partially by findutils 4.3 - RE: "inode changed", Jan Schormann
2006-01-23 15:28 ` Corinna Vinschen
2006-01-23 16:12 Jan Schormann
2006-01-24 12:50 ` Corinna Vinschen
2006-07-12 18:43   ` Ty Sarna
2006-07-13 12:10     ` Corinna Vinschen
2006-09-24  1:26 Miller, Raul D
2006-09-24  2:28 ` Eric Blake
2006-09-24  2:40 Miller, Raul D
2006-09-25  0:05 ` Larry Hall (Cygwin)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060118161000.GB16164@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).