Commit Graph

8347 Commits

Author SHA1 Message Date
Antoine Verheijen
be0e9fb703 OpenBSD: Add support for OpenBSD 4.8
Add param headers and other config info for OpenBSD 4.8
support.

Change-Id: I3af37dd79260d29bb7f3793c9a965bb84faab31f
Reviewed-on: http://gerrit.openafs.org/3748
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-01-24 09:07:57 -08:00
Rod Widdowson
40497fa667 Windows: remove unused label in ntops.c
The label 'retry' in nt_open is not used and was causing a warning.  Remove it.

Change-Id: I964d954e4f9cdb672c689a6e757a5f62bea8f65c
Reviewed-on: http://gerrit.openafs.org/3747
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-24 05:56:24 -08:00
Rod Widdowson
ffb0cdcc91 Windows: remove faulty assumptions about device names in vol-salvage
The implementation has an assumption that all disk volumes have an
object name of \Device\HarddiskXXX (where XXX is a number).  This is
wrong since the name is purely a convention and since about WXP they
have been called \Device\HarddiskVolumeXXX.

Either way it is spurious to assume the format and then try to compare
the XXX.  This change just compares the strings.  This is done in a
case insenstive manner which is the safer option.  It is quite
feasible, but very unlikely that someone will uses 'case sensitively
different' object names.

Change-Id: Ifa91c88f2b17f747f30541b8833b722cf5993e48
Reviewed-on: http://gerrit.openafs.org/3745
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-23 21:10:57 -08:00
Jeffrey Altman
f60bca943f Windows: more exports afsauthent.dll
pr_SIdToName
afsconf_GetExtendedCellInfo
afsconf_UpToDate

required for new Explorer Shell functionality

Change-Id: I085d32b9786d9bf26d527cc3dd49c2d51ab1cb56
Reviewed-on: http://gerrit.openafs.org/3739
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stefan Kueng <tortoisesvn@gmail.com>
Tested-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-22 19:30:18 -08:00
Jeffrey Altman
de7af90fb8 Windows: log and invalidate invalid dir pages
If when parsing a directory page in cm_ApplyDir the consistency
checks fail, log a message and invalidate the page in case
it was a transient failure.

Change-Id: Iab690cd876a717fbdef30fb78e4ed559fa7e0a5a
Reviewed-on: http://gerrit.openafs.org/3742
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-22 19:29:26 -08:00
Antoine Verheijen
cd6bd75d1c OpenBSD: Make OpenBSD 4.7 param headers consistent
OpenBSD follows the policy of using a separate common
param file (post 1.4.x). However, when introducing support
for i386 OpenBSD 4.7, this was not done and a single param
config header file was created instead. This patch changes
the param files for OpenBSD 4.7 so that they are
consistent with the other OpenBSD versions by using a
separate common param header file.

Change-Id: I9d828d2447a2d018eeea0fbe9f4c047ac819d209
Reviewed-on: http://gerrit.openafs.org/3725
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-01-22 12:58:45 -08:00
Jeffrey Altman
5fdc2679dc vol: fix CreateFile params nt_unlink and nt_open
nt_unlink: when opening a file handle to assign delete on close
status the caller must request DELETE permission.

nt_open: make sure that DELETE permission along with FILE_SHARE_DELETE
is requested if we wish to permit another CreateFile call in the future
to assign delete on close.

Change-Id: Ib971ecc098dbc5eb64dcbfed93c334397c9d8ac9
Reviewed-on: http://gerrit.openafs.org/3711
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-22 12:44:36 -08:00
Jeffrey Altman
d6528628b4 vol: namei_ops improve readability; fix namei_create on Windows
use NAMEI_SPECDIRC, NAMEI_INODESPECIAL, INVALID_FD and other
preprocessor symbols in place of numeric constants.

namei_create() on Windows must call namei_CreateDataDirectories()
and retry if the afs_open() call fails with either ENOTDIR or
ENOENT.

modify namei_HandleToName() on Windows to make its decision
process clearer.

Change-Id: Ib1dfbaa3afe81f57685c95cdcae749c67cc95598
Reviewed-on: http://gerrit.openafs.org/3712
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-22 12:44:20 -08:00
Jeffrey Altman
eb6f3a89a3 vol: add comment nt_unlink cannot with fopen handles
On Windows, files opened via the CRT fopen or open
POSIX compatibility functions cannot be marked for delete
on close.  Add a comment until such time as the use of
fopen and open on Windows can be replaced.

Change-Id: I9cec46bef332c981b2f64ba85e310783e3c71bc9
Reviewed-on: http://gerrit.openafs.org/3707
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
2011-01-22 12:43:58 -08:00
Jeffrey Altman
55ca096adb vol: remove potential data loss warnings in vol-salvage.c
afs_sfsize_t is not always the same size as 'int'.
Avoid warnings by using afs_sfsize_t in the appropriate locations.

Change-Id: I88f7458421c3a9c2081597e5481d352bd5a2927a
Reviewed-on: http://gerrit.openafs.org/3706
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
2011-01-22 12:43:51 -08:00
Jeffrey Altman
01fc5d0577 vol: use correct file name base for temporary file
Inconsistent use of temporary file name bases resulted in
the temporary files never being deleted.

Change-Id: I0be59282488bb2db0f1b7b5200df5bd6ac285711
Reviewed-on: http://gerrit.openafs.org/3705
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-22 12:43:44 -08:00
Jeffrey Altman
089a3f5e8b vol: use OS_UNLINK instead of unlink
Use OS_UNLINK in order to ensure that platform specific
unlink functions are called.  OS_UNLINK is unlink on Unix.

Change-Id: Idcfc18345abe5532e9ebe97fc757d6f435c2af52
Reviewed-on: http://gerrit.openafs.org/3704
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-22 12:43:34 -08:00
Jeffrey Altman
141aca818e vol: fix namei_ListAFSSubDirs on Windows
The directory level represented by 'dirp2' does not exist on
Windows.  Do not attempt to close the DIR object that was
never opened.

Remove unnecessary function prototypes.

Change-Id: Ib6b27e52f0120115173cb04893092ba6f2da32fe
Reviewed-on: http://gerrit.openafs.org/3703
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-22 12:43:24 -08:00
Jeffrey Altman
259a0e886a vol: use OS_DIRSEP in many more places
For consistency use OS_DIRSEP and OS_DIRSEPC throughout the
package.

Change-Id: I7bb93b4fe7324492e71a6d303e2b74723aaefc5a
Reviewed-on: http://gerrit.openafs.org/3702
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-22 12:43:10 -08:00
Jeffrey Altman
8bb5e29177 vol: fix _namei_examine_reg DELETE_ZLC usage
replace 'i' with 'dirl' and assign the new variable a value
before using it.

Change-Id: Ia93b6c75154b6f2a9238f0e9c2881d6c79c36540
Reviewed-on: http://gerrit.openafs.org/3701
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-22 12:43:00 -08:00
Jeffrey Altman
270e5c0178 vol: make it clearer that SetOGM is not impl on Windows
Separate the SetOGM function into two implementations to
match the other OGM functions.  Implement the Windows version
as returning -1 always.

In the future, the OGM functions could be renamed to express
their purpose: saving and restoring the volume id and tag
associated with a file.   Windows currently encodes this
information using the CreationDate and the file name but
in the future this information might be stored in an alternate
data stream.

Change-Id: I7e60cceb4548b7ad3a1e045f390e7052fece4926
Reviewed-on: http://gerrit.openafs.org/3700
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-22 12:42:48 -08:00
Jeffrey Altman
959a892afc vol: avoid double dir separators from addtoname
The manner in which addtoname() is used can often result
in double dir separators in path names.  Check for it and
avoid doubling the separator in addtoname()

Change-Id: Ie33459bec3bcc93f81f13020cd35ed8c473b6ca5
Reviewed-on: http://gerrit.openafs.org/3699
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-22 12:42:36 -08:00
Jeffrey Altman
9e689e9609 vol: clear ih_synced before dropping lock
in ih_reallyclose() clear ihP->ih_synced before dropped
the IH_LOCK.  ih_reallyclose() is already committed to
performing the OS_SYNC() call.  Failing to clear the ih_synced
flag before dropping the lock permits another thread, the ih_sync_all()
thread for example, to also conclude that it must sync the
file.

Change-Id: Icb928f7d2ec2342a57ed21b440ae0580c980e9d2
Reviewed-on: http://gerrit.openafs.org/3696
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-22 12:42:26 -08:00
Derrick Brashear
6f39035c92 MacOS: don't allow krb5 at login when AD plugin authenticates
if AD is being used to verify authentication (e.g. via builtin)
don't allow get krb5 at login to succeed. since a helper does this we can't
grey the option, but we can decline to act on it.

Change-Id: I1f2bb891377c3ed9765f9e58141c77ec54d3ae22
Reviewed-on: http://gerrit.openafs.org/3690
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-20 11:14:56 -08:00
Jeffrey Altman
53dcb4a56e vol: nt_DriveToDev must return a value
Change-Id: I27cf468e9d61542f9893367a18c2f7dd6854cdf6
Reviewed-on: http://gerrit.openafs.org/3710
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-01-20 05:41:17 -08:00
Jeffrey Altman
1ad22ed7e1 vol: nt_open should not create missing directories
Revert the prior change that added directory creation
to nt_open().  nt_open() should fail and the caller should
create the directories.  Failure to do so results in an
incomplete tree which confuses the salvager.

Change-Id: Ieb2a05baada2531dad1869e95823fe2006bdc2c6
Reviewed-on: http://gerrit.openafs.org/3709
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-01-20 05:40:59 -08:00
Jeffrey Altman
3c25ae062a vol: Make ntops functions 64-bit capable
Add 64-bit offset and length support to ntops functions.

Change-Id: I1804d49df344839598c39084b7763cec4100c8c7
Reviewed-on: http://gerrit.openafs.org/3708
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-20 05:40:33 -08:00
Jeffrey Altman
48508a2021 vol: avoid defining unused struct on windows
namei_ogm_t is not used on Windows.  There is no equivalent
to owner/group mode.

Change-Id: Ib0675f106bf5e77b006ebe5eae5d67ee232313e0
Reviewed-on: http://gerrit.openafs.org/3698
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-20 05:30:10 -08:00
Jeffrey Altman
5184261cde vol: indent cpp definitions; add NAMEI_SPECDIRC
Change-Id: Id6d962a7c9e78f6a4b4bb7a6250e77efd40cc3c4
Reviewed-on: http://gerrit.openafs.org/3697
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-20 05:29:53 -08:00
Jeffrey Altman
fe9285f77a vol: remove [UN]LOCKFILE data loss warnings on Windows
Cast to DWORD since the results of the mask and shift
are guaranteed to be 32-bit.  This avoids sixteen warnings.

Change-Id: Ifdb9356e207b4b8791b5923985a70efeb457edb1
Reviewed-on: http://gerrit.openafs.org/3695
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-20 05:29:09 -08:00
Jeffrey Altman
6bf5f463c7 Windows: build mtafsdir.lib and use it
The executables built in src/vol are pthreaded.  Therefore, they
require a pthread safe version of the src/dir objects.  Instead
of building the dir object files in yet another directory, create
a mtafsdir.lib in src/dir and use it in src/vol, src/tviced and
src/tsalvaged.

Change-Id: I50017bd56ec741af1ff3fc1dd39208e610369088
Reviewed-on: http://gerrit.openafs.org/3693
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-20 05:28:35 -08:00
Toby Burress
bc674908ca FreeBSD: properly identify the rxk_Listener so that msleep() returns
afs_osi_Wakeup() was not being called with the proper argument,
causing afs_osi_Sleep() to fail forever while waiting for rxk_Listener
to wake up.

Change-Id: I1b650c57ae507987359d0cb230400d3d23984cfa
Reviewed-on: http://gerrit.openafs.org/3692
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-20 05:26:55 -08:00
Antoine Verheijen
02a1eb4aae OpenBSD: Change code optimization setting
Change the optimization level set when optimization is
enabled during build from the sytem default of '-O' to
'-O2' for OpenBSD systems.

Change-Id: I20962c124da5426409638453e1efdd37b4e5f393
Reviewed-on: http://gerrit.openafs.org/3689
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-19 17:55:51 -08:00
Antoine Verheijen
8b932375ec Move check for unspecified CFLAGS in configure.ac
configure.ac provides a check to see if the user has
specified CFLAGS and if not, it sets CFLAGS to a blank
(not NULL) string so that the resultant configure script
does not set '-g' and/or '-O2' by default. This check
occurs after AC_USE_SYSTEM_EXTENSIONS in the configure.ac
file. However, on at least some systems, such as OpenBSD,
AC_USE_SYSTEM_EXTENSIONS expands to include the code that
configure uses to set '-g -O2' so the check has no effect
and '-g' or '-O2' can not be turned off. This patch moves
the "CFLAGS specified" check so that it precedes the
AC_USE_SYSTEM_EXTENSIONS directive, in which case
everything works.

Change-Id: I68ed5a3c5129a55f7dcd7413c93f35cc7cb14b9c
Reviewed-on: http://gerrit.openafs.org/3688
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-19 17:55:23 -08:00
Antoine Verheijen
a5441776b6 OpenBSD: No ruid/rgid in cred structure.
OpenBSD does not retain ruid or rgid values in the
afs_creds_t structure (ucred). This patch, therefore,
removes any references to them in the afs.h file. Since
no attempt is made to actually use the removed code (or
macros) on OpenBSD, at least at this time, this does
not result in any real functional change.

Change-Id: Iaceb792f0c39ba6f7caa205bc66af16a23193549
Reviewed-on: http://gerrit.openafs.org/3687
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-19 17:55:15 -08:00
Antoine Verheijen
646a6a4169 OpenBSD: Don't call non-existent routines in osi_vfsops.c
The OpenBSD version of osi_vfsops.c makes calls to routines
that do not exist in the system and aren't needed. In the
past, these calls were wrappered by an #ifdef for
AFS_DISCON_ENV which was never defined. That #ifdef is now
gone so this patch removes the calls to these routines,
which are remnants of the NBSD origins for this particular
code.

Change-Id: I8cc97fde8cd5cf6c241dd3074c0f97b5d3e2ccfd
Reviewed-on: http://gerrit.openafs.org/3686
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-19 17:55:08 -08:00
Antoine Verheijen
5ff6c88fcc OpenBSD: Fix parameters in call to afs_close()
OpenBSD passes an extra parameter in a call to afs_close()
in its OS-specific code. It went undetected in the past
but now causes compile headaches because of more accurate
prototypes in the header file. This patch removes the
offending extra parameter (which never actually caused any
problems because it was the last one in the parameter list).

Change-Id: I6bde0c6c98867c47a574fa5e3e01ec560deb17b0
Reviewed-on: http://gerrit.openafs.org/3685
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-19 13:41:36 -08:00
Antoine Verheijen
6d8e3392b7 OpenBSD: Install no-NFS version of libafs
The build process for OpenBSD builds the no-NFS version of
the kernel module but, at install time, the NFS version is
subseuquently built and installed while the no-NFS version
is ignored. The NFS version does not load and is not needed
in OpenBSD so this patch makes sure that the no-NFS version
is installed and used.

Change-Id: I1d07334121911c22aea1f6d157f34e1b40e5b780
Reviewed-on: http://gerrit.openafs.org/3684
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-19 13:41:23 -08:00
Derrick Brashear
9743a644ad MacOS: panic decoder should check for unloaded kexts
if the openafs kext was unloaded from under us, try to handle that.

Change-Id: I6a5e56da3c4b6290b71dd10e919a0f374998338e
Reviewed-on: http://gerrit.openafs.org/3683
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-19 12:39:21 -08:00
Antoine Verheijen
d5367b5f14 OpenBSD: Fix use of macros for AFS_KALLOC/AFS_KFREE
The macro definitions for AFS_KALLOC and AFS_KFREE used by
afs_osi_alloc.c to perform OS-specific memory allocation
are only defined by the OpenBSD osi_machdep.h header file
if they already exist, which means: never. This patch fixes
this situtation and makes sure that afs_osi_alloc.c
actually uses them, eliminating a direct OS-specific call
in afs_osi_alloc.c.

Change-Id: Ida1608774de3bc5861b223574f3cbf0d9647266c
Reviewed-on: http://gerrit.openafs.org/3682
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-19 12:05:03 -08:00
Antoine Verheijen
1c74204223 OpenBSD: Remove macros definitions for afs_osi_Alloc et al.
The afs_osi_Alloc, afs_osi_Free, etc. routines are now
defined in afs_osi_alloc.c so the macro definitions defined
by osi_machdep.h for OpenBSD are no longer needed and, in
fact, interfere with the compile. Remove them.

Change-Id: I98a261b5cd5e44136e4dde677f86d90212b0cfba
Reviewed-on: http://gerrit.openafs.org/3681
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-19 12:04:14 -08:00
Jeffrey Altman
26f0ddd0cd volser: select() cannot be used to sleep on windows
On Windows must use Sleep() instead of select() with no
fd_set parameters.

Change-Id: I693718c74dd9be0b4eb58ec26afac0882845e71c
Reviewed-on: http://gerrit.openafs.org/3675
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
2011-01-18 09:55:35 -08:00
Jeffrey Altman
8895fe0fab Windows: refactor cm_CheckCBExpiration multihomed
cm_CheckCBExpiration() is refactored to make it easier
to read the decision process.  cm_CheckCBExpiration()
determines when a callback is no longer usable and as a
result the object status info should be discarded.

The windows cache manager preserves status info past
callback expiration if all of the sources of a volume
became inaccessible prior to the callback expiration
time.  The cache manager was improperly preserving the
status info for objects when the callback was issued by
a multi-homed file server when only the interface that
issued the callback is down.

A separate cm_server_t object is used to represent
each file server interface.  When one interface goes
down and others are left up, the cache manager will
now replace the down cm_server_t reference for one that
is up.  This substitution is performed as a side effect
of computing the effective downTime in cm_CBServersDownTime().

Change-Id: Ia6336a3bdd0219497fd47460accddd0cd2629f00
Reviewed-on: http://gerrit.openafs.org/3674
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-18 09:54:44 -08:00
Jeffrey Altman
f25cbdf09f Windows: use cm_ServerEqual() in cm_Analyze()
In cm_Analyze() when processing VNOVOL, VMOVED or VOFFLINE errors
do not use pointer equivalence as the test to determine if a
server is affected by the error.  Use cm_ServerEqual() instead.

Fix cm_ServerEqual() to work even when both cm_server_t objects
are not UUID aware.

Change-Id: Icb83ba77984075216a44cdeba689bc05e98ed92a
Reviewed-on: http://gerrit.openafs.org/3659
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-18 09:52:49 -08:00
Rainer Toebbicke
7c0d4b331e Re-enable rx connection hard timeout
A missing "conn->" in rxi_CheckCall prevents checking hard connection timeouts.

Change-Id: I893a1ba71957e2a830029dfc4e3ac51fa461d6ca
Reviewed-on: http://gerrit.openafs.org/3677
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-18 09:13:51 -08:00
Andrew Deason
802899aac0 vol: Windows requires binary fmode for salvaged
Same as 98f633c60d, but for the
salvageserver.

Change-Id: I961e31fd6a2a6e08e3bd4381793195bb1e388e7c
Reviewed-on: http://gerrit.openafs.org/3676
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-17 12:04:33 -08:00
Jeffrey Altman
038264b4d6 vol: use OS_UNLINK() instead of unlink()
OS_UNLINK provides the platform specific mechanism
for unlinking objects.

Change-Id: Id0a1f50e57fe3c21c46e137e86507bf28bafa046
Reviewed-on: http://gerrit.openafs.org/3670
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-16 13:23:07 -08:00
Jeffrey Altman
a65ea91e2a vol: construct proper VolDir path on Windows
namei_HandleToInodeDir initializes the path name with
the nt_drive value.  Therefore calling addtoname(name, name->n_drive)
produces the invalid path "D:\D:\\Vol_.....".  Remove the unnecessary
addtoname() call.

Change-Id: I4933d3f4fda76050eecde3caeaa6bc30011cd974
Reviewed-on: http://gerrit.openafs.org/3672
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-15 15:40:12 -08:00
Jeffrey Altman
bae39a9aa3 vol: fdHandleAllocateChunk should init all fields
fdHandleAllocateChunk() failed to initialize the fd_ihnext
and fd_ihprev fields.

Change-Id: I605b6fc3c4cefe6e5c4169762fbd6047fb895b70
Reviewed-on: http://gerrit.openafs.org/3671
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-15 15:02:05 -08:00
Jeffrey Altman
47e2149335 vol: use OS_DIRSEP when constructing paths
Do not assume that / is the directory separator when constructing
paths for internal consumption or log messages.  Use OS_DIRSEP
or OS_DIRSEPC as appropriate.

Change-Id: Ifed618dfa30f2aee27de1ef57de5e504d6701d4d
Reviewed-on: http://gerrit.openafs.org/3669
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-15 15:01:50 -08:00
Jeffrey Altman
ecf55b063e volser: use OS_CLOSE() instead of close()
Use OS_CLOSE() instead of close() when closing vol package
allocated file descriptors.  On Windows, close() != nt_close().

Change-Id: I5737c0e4e83534bd5f4183dde195c4b8091474c1
Reviewed-on: http://gerrit.openafs.org/3668
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-15 15:01:35 -08:00
Jeffrey Altman
05d5f012e0 vol: initialize FdHandle_t stack objects
In namei_create() a temporary FdHandle_t is allocated on
the stack but was never initialized.  Depending on what
prior data was on the stack the FdHandle_t could result
in subsequent operations failing in unpredictable ways.

Change-Id: I6246930adc87cf84ad9c0913cda2d00e6f851bc1
Reviewed-on: http://gerrit.openafs.org/3667
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-15 15:01:23 -08:00
Jeffrey Altman
714b3ffb22 vol: Fix ntops to provide expected semantics
nt_open() can be asked to open a file with a path containing
directory components that do not yet exist.  Modify nt_open()
to automatically create directories if necessary.

nt_read() and nt_pread() should not treat partial reads due
to reaching EOF as an error.  Instead, return the bytes read.

Change-Id: If088393a842d6f6d7ad901345e94e92d23f2321c
Reviewed-on: http://gerrit.openafs.org/3666
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-15 15:01:09 -08:00
Jeffrey Altman
98f633c60d vol: Windows requires binary fmode for salvager
In order for salvager to work properly it must read and
write data in binary mode.  On Windows, this is accomplished
by calling _set_fmode(_O_BINARY) to set the default mode for
fopen(), etc.

Change-Id: Ieb00222ceccb6f044453b60d288e2badf713e517
Reviewed-on: http://gerrit.openafs.org/3665
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-15 15:00:54 -08:00
Jeffrey Altman
e8e69d5b2c vol: fix OS_LOCKFILE/OS_UNLOCKFILE for Windows
On UNIX the OS_LOCKFILE and OS_UNLOCKFILE macros return zero
on success.  Since Windows LockFile() and UnlockFile() return
non-zero (TRUE) on success, negate the return value as part
of the macro definition.

Change-Id: Icb4c8555de9a16fdfddcaeb9ede28bbd401e76b7
Reviewed-on: http://gerrit.openafs.org/3664
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-15 15:00:47 -08:00