Jeffrey Altman [Thu, 20 Jan 2011 05:57:03 +0000 (00:57 -0500)]
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.
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.
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.
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.
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).
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.
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.
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.
Jeffrey Altman [Sun, 16 Jan 2011 20:49:02 +0000 (15:49 -0500)]
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().
Jeffrey Altman [Fri, 14 Jan 2011 05:22:39 +0000 (00:22 -0500)]
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.
Jeffrey Altman [Sat, 15 Jan 2011 16:54:40 +0000 (11:54 -0500)]
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.
Jeffrey Altman [Sat, 15 Jan 2011 16:47:47 +0000 (11:47 -0500)]
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.
Jeffrey Altman [Sat, 15 Jan 2011 16:39:39 +0000 (11:39 -0500)]
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.
Jeffrey Altman [Sat, 15 Jan 2011 16:07:19 +0000 (11:07 -0500)]
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.
Jeffrey Altman [Sat, 15 Jan 2011 16:04:48 +0000 (11:04 -0500)]
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.
Jeffrey Altman [Sat, 15 Jan 2011 16:01:55 +0000 (11:01 -0500)]
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.
Andrew Deason [Fri, 14 Jan 2011 21:13:46 +0000 (15:13 -0600)]
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.
Andrew Deason [Fri, 14 Jan 2011 20:52:10 +0000 (14:52 -0600)]
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.
Andrew Deason [Fri, 14 Jan 2011 20:00:14 +0000 (14:00 -0600)]
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.
Ben Kaduk [Fri, 14 Jan 2011 01:16:44 +0000 (20:16 -0500)]
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.
Jeffrey Altman [Fri, 14 Jan 2011 05:13:49 +0000 (00:13 -0500)]
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.
Andrew Deason [Mon, 10 Jan 2011 23:13:15 +0000 (17:13 -0600)]
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>.
Andrew Deason [Wed, 12 Jan 2011 16:29:46 +0000 (10:29 -0600)]
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).
Marc Dionne [Tue, 11 Jan 2011 02:31:18 +0000 (21:31 -0500)]
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>
Andrew Deason [Sat, 8 Jan 2011 01:48:18 +0000 (20:48 -0500)]
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.
Jeffrey Altman [Sat, 8 Jan 2011 17:21:23 +0000 (12:21 -0500)]
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.
Tom Keiser [Wed, 13 Oct 2010 05:16:25 +0000 (01:16 -0400)]
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.
Jeffrey Altman [Wed, 12 May 2010 15:27:17 +0000 (11:27 -0400)]
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.
Jeffrey Altman [Tue, 4 Jan 2011 02:07:10 +0000 (21:07 -0500)]
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.
Simon Wilkinson [Mon, 3 Jan 2011 10:47:30 +0000 (10:47 +0000)]
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.
Simon Wilkinson [Mon, 3 Jan 2011 10:40:56 +0000 (10:40 +0000)]
autoconf: Tidy up header includes
Tidy up our list of header includes so it's easier to see what
we're testing for. The list is now one-per-line, in alphabetically
sorted order.
Note that this won't affect our use of the default include set, as
autoconf will already have tested for all of those before it starts
this CHECK_HEADERS run.
Simon Wilkinson [Thu, 30 Dec 2010 17:52:00 +0000 (17:52 +0000)]
libadmin: Don't use internal struct for key data
The afsconf_dir structure should be regarded as private to the libauth
library, which provides accessors for the commonly used parameters
within it. Rework libadmin so that it uses those accessors when looking
up key data.
Simon Wilkinson [Thu, 30 Dec 2010 17:56:36 +0000 (17:56 +0000)]
tests: Add more tests for auth KeyFile handling
Add tests to make sure that we serialise updated KeyFiles to and
from disk correctly, and that the restriction on 8 keys in a KeyFile
is enforced by AddKey
Simon Wilkinson [Sun, 14 Feb 2010 10:01:14 +0000 (10:01 +0000)]
Add "brief" option to rxgen
Add a new -b option to rxgen that turns on "brief" output. This makes a
number of changes to the data definitions produced by rxgen so they can
be more easily used by the calling code.
The changes are:
*) Use the new struct rx_opaque structure for all opaque data
definitions, rather than defining each as a unique structure.
This permits moving opaque data between rxgen structures to be
performed by simple assignment.
*) Use anonymous structures for internal definitions. Currently
rxgen also uses the field name as the structure name, which
prevents the use of a field name more than once within a
source file.
*) Don't embed the structure name within the names of the elements
within the structure. This significantly reduces the length of
assignment code, and makes for more readable callers.
Simon Wilkinson [Sat, 1 Jan 2011 23:58:20 +0000 (23:58 +0000)]
auth: Don't crash if UserList contains bogus line
If the first line of the UserList was bogus (caused ParseLine to
return an error), then we would attempt to free the contents of
an uninitialised identity structure, and crash. Initialise the
structure so this no longer happens.
Vincent Archer [Thu, 30 Dec 2010 16:34:28 +0000 (11:34 -0500)]
Windows: MIT license applies to parsemode()
Vincent Archer grants permission to OpenAFS to re-license
his MINIX contributions under the MIT license. A copy of the
e-mail granting permission is located in OpenAFS RT issue 128805.
Jeffrey Altman [Wed, 29 Dec 2010 16:35:17 +0000 (11:35 -0500)]
Windows: buf_CleanAsync scp->fid == bp->fid
If buf_CleanAsync or buf_CleanAsyncLocked are called
with a non-NULL cm_scache_t parameter, that status object's
fid must be the same as the associated cm_buf_t object.
If not, the wrong locks will be held.
If the cm_scache_t parameter is NULL and cm_FindSCache()
returns NULL, it means that the cm_scache_t object associated
with the bp->fid has been flushed from the cache. cm_GetSCache()
must therefore be called to allocate a new status object for the
FID. If the status object cannot be allocated, then any dirty
data stored in the buffer will be discarded.
Jeffrey Altman [Tue, 28 Dec 2010 19:39:47 +0000 (14:39 -0500)]
Windows: fs checkserver skip multi-homed up server
Multi-homed file servers can be detected by comparing the
uuid for the cm_server_t entries. If a server has at least
one up interface, do not list it as being down in the "fs checkserver"
response list.
Jeffrey Altman [Tue, 28 Dec 2010 00:34:14 +0000 (19:34 -0500)]
vos: do not mix memory allocation methods
ListVLDB mixed memory allocated with xdr_alloc() and memory
allocated with malloc(). This is not safe to do since it is
possible on some platforms for xdr_alloc() to allocated memory
using a method other than the malloc() linked to the vos
executable.
Instead of stealing the xdr_alloc()'d buffer, allocate a new
buffer and copy the contents.
Do not use reserved preprocessor symbol names. Instead
use OPENAFS_<PATH>_<HEADER>_H formatted names where <PATH>
is the subdirectory path from src/ in which the header
file originates in the repository.
Simon Wilkinson [Mon, 27 Dec 2010 20:29:48 +0000 (20:29 +0000)]
tests: Add tests for afsconf_'s key functions
Add tests for all of the public functions that afsconf exports
to manipulate KeyFiles. Include a sample Keyfile to start with, to
ensure that we can continue to read KeyFiles produced by current
versions of the code.
These tests are here to catch regressions with a forthcoming rewrite
of KeyFile handling.
Simon Wilkinson [Sun, 26 Dec 2010 14:54:43 +0000 (14:54 +0000)]
Don't trust # of entries from ListAttributes
ListAttributes returns the number of entries in its array as an RPC
argument. But, we can't trust this, as it could be manipulated and
end up pointing past the end of the returned array (which is counted,
so the entries argument is actually pointless).
Add bounds checking to the functions which use this value to prevent
this problem.
Andrew Deason [Wed, 22 Dec 2010 02:40:19 +0000 (21:40 -0500)]
Remove extra trailing \s in Makefiles
Remove a few extra trailing \s in Makefiles in viced and bozo. Some
'make's (such as the make on HP-UX) interpret this to e.g. include the
following "headers=" stuff to be included in LIBS, which obviously
causes problems.
Simon Wilkinson [Sun, 26 Dec 2010 14:14:38 +0000 (14:14 +0000)]
volser: Fix broken bulk conversion
The converstions between the original, N and U bulk list return
values were all broken in various ways:
1/ Shifting from malloc to xdr_alloc() (in 4f1efdc8b73ed)
subtly changed the behaviour when handling an empty list. The
correct XDR representation of an empty list is {0, NULL}, not
{0, &memZero}. Fix the code so that if the source list is empty,
an empty destination list is returned.
2/ The destination list length was never being filled in. This means
that xdr_free() could not be safely used on this list, as the wrong
length would be passed to the allocator. Fill in the destination
list length as part of the conversion.
3/ xdr_free(...) is a no-op when called with an empty list - there's
no need to check before calling it. Remove these checks to improve
the code's readability.
4/ xdr_free(...) should only be called when the RPC returned
sucessfully. The stub is responsible for freeing data should the call
fail mid way through unmarshalling.
5/ Where an RPC returns the number of entries independently of the
length of a counted array, it is unsafe to use that length to
iterate the array without checking that it is within the array
bounds. Instead, just use the array length when performing
conversions.
Simon Wilkinson [Sun, 26 Dec 2010 14:00:42 +0000 (14:00 +0000)]
vos: Abstract out bulk list conversion
Pull the various segments of code that do bulk list conversion into
their own functions. This is purely code reorganisation at this point,
fixes for these functions will follow in subsequent patches.
Andrew Deason [Wed, 22 Dec 2010 15:46:11 +0000 (10:46 -0500)]
Link hcrypto before roken
We must e.g. -lafshcrypto before we -lrokenafs, since stuff in hcrypto
can use functions provided by roken (such as ct_memcmp or
rk_cloexec_file). Fix any users of LIB_hcrypto that do not do this to
put LIB_roken after LIB_hcrypto.
Russ Allbery [Fri, 24 Dec 2010 18:53:22 +0000 (10:53 -0800)]
Update NEWS for 1.5.78 and 1.6.0pre1
Based on the release notes. Add an entry for 1.6.0 with in progress
instead of a date to hold the release notes for 1.6.0pre1 rather than
creating separate entries for each release candidate. Users who track
the release candidates can refer to the public announcements, and this
will be cleaner when reading history later on.
Simon Wilkinson [Fri, 24 Dec 2010 18:32:30 +0000 (18:32 +0000)]
auth: Add more tests and resulting fixes to userok
Add tests for the functions afsconf_SuperUser() and
afsconf_SuperIdentity(). These had been missing tests because testing
them requires starting a client and a server, so amend the superuser-t
tests so that they can start up a simple server.
Fix a number of problems that the tests expose, with setting (and
freeing) identities in corner cases.
Andrew Deason [Wed, 22 Dec 2010 05:02:45 +0000 (00:02 -0500)]
HPUX: Put __HP_CURSES back in
We need __HP_CURSES to be defined in order to get the _maxx WINDOW*
field among other things. Define it on HPUX again (it was taken out as
part of 4a6a00d6f45bd0ac94e2eb05adee41552073643a).
Simon Wilkinson [Thu, 16 Dec 2010 10:46:43 +0000 (10:46 +0000)]
rx: Make rx_atomic.h a shared header
Copy rx_atomic.h into the shared header directory so that it can be
used by other modules within the AFS build. Note that we can't actually
install this header onto the system (and it cannot be included by
headers which are installed) because it uses autoconf defines to control
its behaviour.
Andrew Deason [Tue, 21 Dec 2010 15:31:39 +0000 (10:31 -0500)]
LINUX: Avoid unnecessary afs_ShakeLooseVCaches
Before some of the NewVCache refactoring, we only called
afs_ShakeLooseVCaches when afs_vcount was over (or equal to)
afs_maxvcount. Do this again, so we only try to shake loose vcaches
when we need more vcaches. Otherwise, we will call
afs_ShakeLooseVCaches every single time we want a new vcache when
dynamic vcaches are disabled (such as 2.4 Linux), and we log a warning
when we can't free any (which is likely when there are only 1 or 2
vcaches in use).
Andrew Deason [Fri, 3 Dec 2010 23:20:54 +0000 (17:20 -0600)]
LINUX: Reduce stack depth on recursive symlink res
Instead of calling vfs_follow_link inside afs_linux_follow_link
ourselves, we can just resolve the next step of the symlink resolution
and set the result in nd_set_link(), freeing the string in
.put_link().
For kernels without a usable symlink text cache, this reduces call
depth when resolving a path containing many symlinks by two frames per
layer of indirection, allowing for more deeply-nested symlink paths to
be usable.
Andrew Deason [Mon, 20 Dec 2010 22:29:37 +0000 (17:29 -0500)]
Cache bypass: remove ifdefs under src/afs/LINUX24
Same as commit 9657695d34badaac654227be8c731a1512f2106b, but for
LINUX24. Remove the AFS_CACHE_BYPASS references in LINUX24, since it
is always enabled. Also remove messages about a "cache bypass patched
module".
Derrick Brashear [Tue, 21 Dec 2010 13:58:31 +0000 (08:58 -0500)]
DARWIN: make growlagent build not run afoul of ._ fun
in some cases a git checkout would promptly merge the ._ file away,
meaning a subsequent build would fail. just use the developer tools
to set an icon instead of clever tricks.
Ben Kaduk [Mon, 20 Dec 2010 00:33:28 +0000 (19:33 -0500)]
FBSD7: Don't sleep with the glock
On FreeBSD 7.X, vinvalbuf() can (will) sleep; this results in a panic
when the kernel is configured with WITNESS and we hold the glock around
it.
Drop the glock in this case.
Ben Kaduk [Sun, 19 Dec 2010 04:52:44 +0000 (23:52 -0500)]
Bring FBSD 7.X client back to life
Having been untested for quite some time, we had several
places that needed more conditionals to compile on FreeBSD 7.
Now we compile and start on 7.3-RELEASE, but have locking issues
under actual use.
It seems that we are also incompatible with the Heimdal 0.6.3 in
the base system -- aklog is unable to actually obtain the needed
credential when compiled against that kerberos implementation;
using MIT krb5 1.6.3 from ports works without incident.
Ben Kaduk [Sun, 19 Dec 2010 05:06:13 +0000 (00:06 -0500)]
FBSD: StopListener glocking fixup
afs_osi_Sleep requires the glock (so that it can sleep on it); we
dropped the glock earlier in osi_StopListener because soshutdown and
soclose can sleep, but we must (unconditionally!) acquire it for our
loop waiting on rxk_ListenerPid.
Ben Kaduk [Mon, 20 Dec 2010 00:29:17 +0000 (19:29 -0500)]
Zero rx_multi_lock before initializing it
FreeBSD's kernel debugging facilities will panic if it detects
an attempt to re-initialize an already-initialized lock, as detected
through some particular bits being nonzero. Zero everything out
before starting, to prevent this panic.
Jeffrey Altman [Sat, 18 Dec 2010 23:39:07 +0000 (18:39 -0500)]
Windows: fs chmod and display mode in fs examine
Make use of the new pioctl VIOC_GETUNIXMODE and VIOC_SETUNIXMODE
operations to display the current mode in fs examine and permit
setting the mode with "fs chmod". The mode string parsing makes
use of Vincent Archer's code from Minix. The required copyright
statement and license is attached to parsemode().
afsconfig-windows.h gains definitions for various mode symbols
that are not defined by Visual Studio runtime headers.
Jeffrey Altman [Mon, 20 Dec 2010 14:59:43 +0000 (09:59 -0500)]
Windows: clear mountPointStringp on status change
If the data version of the cm_scache_t changes, we must clear
the mountPointString. Otherwise, if the object is a mountpoint
or symlink, cm_HandleLink() will not attempt to build the new
target string. The Windows CM never updates the contents of
a mountpoint or symlink. It always destroys the old and creates
a new one. However, the Unix CM simply updates the link data.
Apparently, the Windows clients have never noticed.
Anders Kaseorg [Sat, 6 Nov 2010 07:03:19 +0000 (03:03 -0400)]
Linux: Fix AFS_NORETURN violation with osi_AssertFailK
Commit d86f0c44d3c5910a6b54895484dc0286eac9bc73 changed the
AFS_LINUX26_ENV implementation of osi_AssertFailK so that it returns,
contradicting its AFS_NORETURN prototype, in an effort to make the
following BUG() display the right line number. To fix this, move the
returning implementation into its only caller, the osi_Assert macro.
This fixes possible compiler misoptimizations due to
rx_kcommon.c:255:1: warning: ‘noreturn’ function does return
Change-Id: Ibbcc630037002ce4659e2e6a36b39d271f9bdc58 Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/3276 Reviewed-by: Andrew Deason <adeason@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com> Reviewed-by: Derrick Brashear <shadow@dementia.org>
Simon Wilkinson [Mon, 25 Oct 2010 10:26:51 +0000 (11:26 +0100)]
opr: Add new queue implementation
Add a new queue implementation for OpenAFS. This has a similar calling
form as the current RX queue implementation, but is implementated using
type safe functions, and supports structures with multiple queue
headers. This permits threading a structure onto multiple queues at the
same time.
The eventual intention is that this queue implementation will replace
both rx_queue and the Unix cache manager afs_q.