Commit Graph

8377 Commits

Author SHA1 Message Date
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
Andrew Deason
ac79869f62 RX: Pre-10 Solaris lacks atomic inc/dec
The atomic primitives in Solaris before Solaris 10 lack atomic_inc_32
&co. Make things easier and just implement them in terms of
atomic_add_32 &co when we are older than Solaris 10.

Change-Id: I70c829ef969824efd7843df80bd48e98477a5574
Reviewed-on: http://gerrit.openafs.org/3663
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-15 14:59:26 -08:00
Andrew Deason
9cc9b0d618 RX: Include netinet/ip6.h before inet/ip.h
Some older Solaris (at least some Solaris 8) requires netinet/ip6.h to
be included before inet/ip.h, or the compiler chokes on some
ipv6-related declarations in inet/ip.h. So, include it.

Change-Id: Icabc32c093fab5e3442701b2ea6ae593d7fceb7e
Reviewed-on: http://gerrit.openafs.org/3662
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-01-14 22:31:53 -08:00
Andrew Deason
2045653647 merge-pod: Be more compatible with older perl
merge-pod works fine with perl 5.00503, if we eliminate the 3-argument
invocation of open(). So, replace the open() calls with their
2-argument equivalent, and relax the version requirement a bit.

Change-Id: Ibeda39f2620ab1056e2d42838833d140ec3c053f
Reviewed-on: http://gerrit.openafs.org/3661
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-14 22:30:12 -08:00
Ben Kaduk
3c91f1d881 FBSD: remove vestiges of Giant
We do not support versions of FreeBSD that used Giant to
serialize access to vnode fields, and we always use the same locking
(which really ought to be MPSAFE).  Always set the MPSAFE flags
as needed, and do not bother to call VFS_[UN]LOCK_GIANT which
will never do anything for us.

Change-Id: I973a24d43563f289d4a2baa6e067fbba72d17ed9
Reviewed-on: http://gerrit.openafs.org/3656
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-14 16:07:05 -08:00
Jeffrey Altman
a61a719d35 Windows: fixup gettmpdir()
Use InterlockedCompareExchangePointer for hostparse()
instead of fudging it and leaking memory.

If the max path length is MAX_PATH must allocate MAX_PATH+1.

Change-Id: I9162188c78922202b40859249736a23beae60b3e
Reviewed-on: http://gerrit.openafs.org/3658
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-14 08:30:42 -08:00
Jeffrey Altman
e50cab06c4 Windows: osilog param size is size_t
The parameter size is size_t which permits pointers to be stored
on 32-bit and 64-bit systems.  Make sure we store it as size_t
instead of truncating to long.

Change-Id: I96aaf231eedef742095edf247dc1013e3d90257e
Reviewed-on: http://gerrit.openafs.org/3657
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-14 08:29:51 -08:00
Andrew Deason
fa3584a48f RX: No userspace atomic_ops in Solaris pre-10
The atomic_ops(3C) family of functions do not exist in userspace
before Solaris 10. So, only use them for rx_atomic operations if
we're on AFS_SUN510_ENV, or if we're in the kernel.

Also, include <sys/atomic.h> for kernel code and <atomic.h> for
userspace. Although they are currently equivalent, they are documented
as separate, and pre-10 lacks <atomic.h>.

Change-Id: Id71857efcd6460f8223302850b548754c19d076f
Reviewed-on: http://gerrit.openafs.org/3652
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-12 19:25:54 -08:00
Derrick Brashear
6edcb18304 afsd: CellItems doesn't apply to memcache mode
avoid a potential panic from passing a bogus path into the kernel for
evaluation, in memcache mode.

Change-Id: Iaa11eded2e8946207f7df9e77c3de1e5ff4f963e
Reviewed-on: http://gerrit.openafs.org/3651
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-12 19:25:34 -08:00
Andrew Deason
6d03eef721 SOLARIS: Include sys/varargs.h for kernel stdarg
When compiling for the kernel, pre-10 Solaris seems to want
<sys/varargs.h> instead of <stdarg.h>, as documented in the Solaris
man pages. So include <sys/varargs.h> instead of <stdarg.h> where we
need variable arguments (afs_warn.c).

Change-Id: Id16453b1f7bb9f42d0cc9ca504ac64d04fb0b684
Reviewed-on: http://gerrit.openafs.org/3653
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-12 14:05:52 -08:00
Marc Dionne
8c54107957 Cache bypass: fix use of incorrect "states"
Test and set the correct field for cache bypass flags.  There was
some confusion between cachingStates and the states associated with
vcache entries in a few places.

Change-Id: Iae957b6f838a44d75776e49662b4aba685800d19
Reviewed-on: http://gerrit.openafs.org/3637
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-01-11 08:35:21 -08:00
Andrew Deason
336256c7a0 LINUX: afs_linux_put_link is void
The put_link callback doesn't return a value, so declare it as such.

Change-Id: Icdc19de48747fdfbd3349b2ef0c2b51d5a369550
Reviewed-on: http://gerrit.openafs.org/3636
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-10 12:27:42 -08:00
Stephan Wiesand
8d157961e9 rpm: don't package files twice
The LICENSE and two manpages were included in the main
package as well as one of the others. Remove duplicate entries.

Change-Id: I7626d758a65fe305f18e7cc9099d1fe1b4f86c6f
Reviewed-on: http://gerrit.openafs.org/3628
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-10 12:27:14 -08:00
Andrew Deason
60322b4675 git-version: Do not specify --ignore-submodules
Only new git versions reognize the --ignore-submodules option to
diff-index and diff-files. Do not pass this, to make git-version more
likely to work across different versions, as we don't have any
submodules in the tree anyway.

Change-Id: Ic9dbd9ec5f332f36cec291fc3d324db14615f831
Reviewed-on: http://gerrit.openafs.org/3627
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-10 12:26:53 -08:00
Jeffrey Altman
9f584e8114 Windows: refactor buf_Get() to improve readability
Refactor buf_Get() by using a switch() instead of a jumble
of if() conditionals.

Improve comments to make it clear that given the current
use and implementation of cm_BufRead() from cm_dcache.c
that created buffer pages will never be populated with
actual data.

Change-Id: Ib3f5778ae32f210127537e16ecc32e1598dbefc7
Reviewed-on: http://gerrit.openafs.org/3630
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-10 11:54:42 -08:00
Jeffrey Altman
f58b17a615 Windows: remove all refs to unused buf_GetNew()
Change-Id: I09b87a2042efff1b5930ebe6e50a64379d592bc2
Reviewed-on: http://gerrit.openafs.org/3629
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-10 11:54:28 -08:00
Tom Keiser
3f0c08ad93 provide more verbose logging when VGetVolumeByVp_r fails
FSYNC_com_VolOff() commits sepuku when VGetVolumeByVp_r() fails to return
a heavyweight ref to the volume.  This small patch provides more detailed
debugging information so we have a better idea why VGetVolumeByVp_r failed.

Change-Id: I9b8b6e734653701c4f35b458f4c4701a2b0d2d5e
Reviewed-on: http://gerrit.openafs.org/2969
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-04 18:17:20 -08:00
Jeffrey Altman
9bb6b06c76 Windows: remove unused vars from cm_server.c
Change-Id: Ia2e1d5ecbc5dbc349ac8e7bfcb63b42545f876f5
Reviewed-on: http://gerrit.openafs.org/3617
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-04 08:41:43 -08:00
Jeffrey Altman
3ab948769c Windows: netidmgr_plugin move roken.h to afscred.h
Due to historical issues with the MIT KFW headers
the netidmgr plugin must define _USE_32BIT_TIME_T
which alters the size of time_t in all C RTL data
structures that include it.   roken.h must be included
after this definition in order for it to do the right
thing in conjunction with the MIT KFW headers.  This
means that an exception to the rule that roken.h must
be one of the first three files included in every
source file in the tree must exist for this directory.
In the netidmgr_plugin directory, afscred.h includes
roken.h and afscred.h is the first header included
in all other files.

Change-Id: I11214e5eaac0144aaf04c3a21bb92d521d75c6e1
Reviewed-on: http://gerrit.openafs.org/3616
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-04 08:41:16 -08:00
Jeffrey Altman
605b7c3baa Windows: permit clean when switching platforms
When switching between i386 and amd64 in the same build tree
the "clean" make directive would fail due to NTLang.bat not
having been built in the new platform's destination directory.
Force NTLang.bat to be built as a dependency of cleanup and
delete it at the end along with the version files.

Change-Id: I49a44204c636ab9ad89be44d4fad20ed6050fdda
Reviewed-on: http://gerrit.openafs.org/3615
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-03 18:24:15 -08:00
Simon Wilkinson
bf163cbebf roken: Check for bswap16 and bswap32 defines
Our imported roken.h provides definitions for bswap16 and bswap32,
but configure doesn't check to see if those functions already exist.
On operating systems where they do, and where the header containing
them is included in our build, this results in compilation errors.

Add a configure test for bswap16 and bswap32, which is complicated
by the fact that they may be macros, or static inline functions, so
a simple CHECK_FUNCS won't work.

Change-Id: Iae3411bf4bb22af8cfd770e01026a28e1863e078
Reviewed-on: http://gerrit.openafs.org/3613
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-03 06:38:42 -08:00