lkml.org 
[lkml]   [2005]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: what is our answer to ZFS?
Once upon a time, Alan Cox <alan@lxorguk.ukuu.org.uk> said:
> It was a nice try but there is a giant gotcha most people forget. Its
> only safe to make this assumption while you have all of the
> files/directories in question open.

Tru64 adds a "st_gen" field to struct stat. It is an unsigned int that
is a "generation" counter for a particular inode. To get a collision
while creating and removing files, you'd have to remove and create a
file with the same inode 2^32 times while tar (or whatever) is running.
Here's what stat(2) says:

Two structure members in <sys/stat.h> uniquely identify a file in a file
system: st_ino, the file serial number, and st_dev, the device id for the
directory that contains the file.

[Tru64 UNIX] However, in the rare case when a user application has been
deleting open files, and a file serial number is reused, a third structure
member in <sys/stat.h>, the file generation number, is needed to uniquely
identify a file. This member, st_gen, is used in addition to st_ino and
st_dev.

--
Chris Adams <cmadams@hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-22 20:59    [W:0.125 / U:0.468 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site