[Top][All Lists]

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

Re: [Gnu-arch-users] tla1.2 on cygwin -> FAT partition

From: Aaron Bentley
Subject: Re: [Gnu-arch-users] tla1.2 on cygwin -> FAT partition
Date: Fri, 05 Mar 2004 08:59:59 -0500
User-agent: Mozilla Thunderbird 0.5 (X11/20040217)

address@hidden wrote:
Here is a small program to print out the "inode" number
returned by cygwin.

#include <sys/stat.h>

main(int argc, char* argv[])
  char* path;
  struct stat buf;
  int err;

  path = argv[1];
  err = stat(path, &buf);
  if (err != 0) {
    perror("stat failed");
  } else {
    printf("ino=%u\n", buf.st_ino);

let's see what happens:
cd /cygwin/ntfs-partition
$ touch t
$ inode t
$ mv t x
$ inode x

cd /cygwin/fat-partition
$ touch t
$ inode t
$ mv t x
$ inode x

Cygwin does return an inode (I thought it didn't, but it might have been
added recently, because I update cygwin from time to time).
It looks like they're using the same trick as linux.

(That makes me wonder: does tla work on a VFAT partition
that is mounted on a linux machine? Could someone try this out?)

Now, the issue is that tla uses the inode value to detect that a file
was renamed. Same inode number == same file. This logic fails
on FAT partitions.

There are also many situations on POSIX systems where file changes inodes, with or without changing names and tla can tolerate that in your working tree.

It's possible that this behavour could produce corrupted inode-signatures in pristine trees or revision libraries, since the directories themselves are renamed after inode sigs have been generated.

I'll try out your inode program under Linux vfat and see what happens. Then I'll consider tla tests.


Aaron Bentley
Manager of Information Technology
Panometrics, Inc.

reply via email to

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