DEVEL15-vol-lock-fd-type-20090323
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 23 Mar 2009 22:47:47 +0000 (22:47 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 23 Mar 2009 22:47:47 +0000 (22:47 +0000)
commitcde1fb287cea83e55eff507d13e6d65a4a7970b7
tree51d643d8a286897bf613970f287fad5996ba19f3
parentb7a6c264210d824b153a820575370a73de9d79fe
DEVEL15-vol-lock-fd-type-20090323

LICENSE IPL10

the lock_fd field of DiskPartition[64] is a file descriptor.
On Windows this is a HANDLE and on *nix platforms an int.
OpenAFS uses the FD_t type to provide platform specific type
info for file descriptors.  Use it for the lock_fd field and
the salvageLock in ObtainsSalvageLock().

Finally, the on the wire diskPartition[64] struct in volser/volint.xg
also contains a lock_fd field.  This is an on the wire field and
must be left at a fixed width of 32-bits.  Since a file descriptor
is not portable across machines we truncate the 64-bit HANDLE value
to fit in the 32-bit lock_fd field when necessary.

(cherry picked from commit a209012f1a3f83959f9df14ebad4aa2b50bacae0)
src/vol/partition.c
src/vol/partition.h
src/vol/vol-salvage.c