]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: Unique file ID is per volume
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 14 Feb 2013 14:26:16 +0000 (09:26 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Thu, 14 Feb 2013 14:58:24 +0000 (06:58 -0800)
The unique file ID returned as part of the BY_HANDLE_FILE_INFORMATION
data structure obtained via GetFileInformationByHandle() is only
guarranteed to be unique within the volume where volume uniqueness is
determined by the volume's serial number.

It therefore doesn't make sense to return the volume id as part of
FILE_INTERNAL_INFORMATION IndexNumber.  Instead return Vnode and
Unique as that is what ensures uniqueness within an existing AFS
volume.

Unfortunately, {VolId, Vnode, Unique} does not guarantee uniqueness
for when multiple cells are in use.

Change-Id: I6c6ea4a04aa79778cce811560d8106a3a5e373cb
Reviewed-on: http://gerrit.openafs.org/9108
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsrdr/kernel/lib/AFSFileInfo.cpp

index 0deb3765a269a6709a0f19139b2d8cc16bb0dfc6..114037c6225f92a27cc1868678cce16ae51c6c01 100644 (file)
@@ -1031,9 +1031,9 @@ AFSQueryInternalInfo( IN PIRP Irp,
     if( *Length >= sizeof( FILE_INTERNAL_INFORMATION))
     {
 
-        Buffer->IndexNumber.HighPart = Fcb->ObjectInformation->FileId.Volume;
+        Buffer->IndexNumber.HighPart = Fcb->ObjectInformation->FileId.Vnode;
 
-        Buffer->IndexNumber.LowPart = Fcb->ObjectInformation->FileId.Vnode;
+        Buffer->IndexNumber.LowPart = Fcb->ObjectInformation->FileId.Unique;
 
         *Length -= sizeof( FILE_INTERNAL_INFORMATION);
     }