Benjamin Kaduk [Sun, 1 May 2016 23:48:40 +0000 (19:48 -0400)]
Linux 4.5: don't access i_mutex directly
Linux commit 5955102c, in preparation for future work, introduced
wrapper functions to lock/unlock inode mutexes. This is to
prepare for converting it to a read-write semaphore, so that
lookup can be done with only the shared lock held.
Adopt the afs_linux_*lock_inode() functions accordingly, and
convert afs_linux_fsync() to using those wrappers, since the
FOP_FSYNC_TAKES_RANGE case appears to be the current case.
Amusingly, afs_linux_*lock_inode() already have a branch to
handle the case when inode serialization is protected by a
semaphore; it seems that this is going to come full-circle.
Change-Id: Ia5a194acc559de21808655ef066151a0a3826364
Reviewed-on: https://gerrit.openafs.org/12268 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Joe Gorse <jhgorse@gmail.com> Tested-by: Joe Gorse <jhgorse@gmail.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Linux 4.5: get_link instead of follow_link+put_link
In linux commit 6b255391, the follow_link inode operation was
replaced by the get_link operation, which is basically the same
but takes the inode and dentry separately, allowing for the
possibility of staying in RCU mode.
For now, only support this if page_get_link is available and we are
using the USABLE_KERNEL_PAGE_SYMLINK_CACHE
The previous test for USABLE_KERNEL_PAGE_SYMLINK_CACHE used a bogus,
undefined configure variable (ac_cv_linux_kernel_page_follow_link).
Remove it, as it was not needed
Change-Id: I2d7851d31dd4b1b944b16fad611addb804930eca
Reviewed-on: https://gerrit.openafs.org/12265 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Joe Gorse <jhgorse@gmail.com> Tested-by: Joe Gorse <jhgorse@gmail.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Use rxkad_crypt for inter-volser traffic, if asked
Add a -s2scrypt option to the volume server, with possible options:
* never -- the existing behavior
* always -- switch to using afsconf_ClientAuthSecure, which uses
rxkad_crypt, for ForwardVolume calls.
* inherit -- encrypt inter-server traffic if the causal client
connection is encrypted. This has the effect of "inheriting" the
"-encrypt" flag given to "vos release", for example.
Thanks to Jeffrey Altman for pointers and to Andrew Deason for noting
the existence of rxkad_GetServerInfo.
[mmeffie@sinenomine.net fix assertion and style update.]
Change-Id: Ia295ba3f29a8494c8250a480fb26594468d2116a
Reviewed-on: https://gerrit.openafs.org/11349 Reviewed-by: Mark Vitale <mvitale@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Thomas Keiser <tkeiser@gmail.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Benjamin Kaduk [Sat, 14 May 2016 18:37:54 +0000 (13:37 -0500)]
Fix typo in kaserver appendix
Though it's very unlikely that someone would actually want to
set up a new kaserver installation, if we have documentation for
it, it ought to at least do what it claims to do.
Mark Vitale [Fri, 13 May 2016 02:23:36 +0000 (22:23 -0400)]
salvageserver: unable to write child log: out of memory
Changes to salvageserver logging in commit 24fed351fd13b38bfaf9f278c914a47782dbf670
introduced a new bug in SalvageLogCleanup; the test for calloc() failure
was inadvertently inverted.
Andrew Deason [Thu, 5 May 2016 05:01:22 +0000 (00:01 -0500)]
ubik: Don't clear ubik_lastYesTime on startup
In uvote_Init, we set ubik_lastYesTime to the current time just a few
lines before. It is important to set ubik_lastYesTime to the current
time, since that prevents us from voting for anyone in an ubik
election for at least BIGTIME seconds.
If we clear ubik_lastYesTime to 0, that means restarting a ubik server
could cause it to immediately start voting for a different site than
it was voting for before it started. This violates one of the ubik
invariants; as mentioned in the comments in SVOTE_Beacon, we cannot
promise sync site support to more than one site within BIGTIME
seconds. So initializing ubik_lastYesTime to 0 could cause two
different sites to be voted sync site simultaneously, if our restart
caused a premature change in vote.
Change-Id: I410fbefa8d699aac1c900d1fdd4e355b87917ad7
Reviewed-on: https://gerrit.openafs.org/12279 Reviewed-by: Mark Vitale <mvitale@sinenomine.net> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Jeffrey Altman <jaltman@auristor.com> Reviewed-by: Jeffrey Hutzelman <jhutz@cmu.edu> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Michael Meffie [Wed, 4 May 2016 00:31:41 +0000 (20:31 -0400)]
afs: retire HAVE_LINUX_COMPLETION_H conditionals
Now that support for linux 2.4 has been sunset, as of commit ccf353ede6ef5cce7c562993d1bea0d20844bdb7, it is no longer necessary to
put conditional compilation checks around the linux wait-for-completion
functions, which were introduced sometime during the linux 2.4 series
and have been available since.
Michael Meffie [Thu, 28 Apr 2016 21:23:23 +0000 (17:23 -0400)]
afs: remove commented out sleep in afs_call.c
The cell info setup was moved to the beginning of the startup sequence
and an unnecessary sleep commented out in the syscall in which the cell
info was set in commit 3fa5f389b2b7778cf0df5a506c91b427b147c4c2.
Clean up afs_call.c a bit by removing this commented out code.
Michael Meffie [Thu, 28 Apr 2016 21:15:06 +0000 (17:15 -0400)]
afs: remove commented out AIX specific tweak
This AIX specific code block has been commented out since
openafs-ibm-1_0. The comments seem to indicate this was a networking
tweak specific to AIX, but the kernel variables involved were not
exported. Clean up afs_call.c by removing this dead code.
Michael Meffie [Thu, 28 Apr 2016 20:52:42 +0000 (16:52 -0400)]
afs: cleanup remnant afs_vfs_mount prototype in afs_call.c
The call to afs_vfs_mount() in afs_call.c was removed in commit a5ab24af71efe6b80eb0f78d1979c5ab1d1e594d. Remove the remnant prototype
and the useless conditionals around it.
Chas Williams [Fri, 25 Dec 2015 11:37:06 +0000 (06:37 -0500)]
LINUX: dcache updates for mkdir and sillyrename
Commit d075b0549d62e4a81b7543b9c2f5dac242074909 introduced
parent_vcache_dv() to get the data version from fakestat mount points.
.mkdir (essentially .create for directories) should use this when
updating ->d_time.
In sillyrename, __dp is a negative dentry that should be forced to
revalidate since the new name in dentry now exists.
Benjamin Kaduk [Thu, 20 Aug 2015 17:55:02 +0000 (13:55 -0400)]
Make setting of CFLAGS_NOSTRICT make sense
Previously, we would set -fno-strict-aliasing only when
--enable-checking was given to configure but not
--enable-checking=all. The intent seems to have been to
only warn about strict aliasing violations when --enable-checking=all
is in use, but that there was no need to disable the strict-aliasing
diagnostics when -Werror was not enabled.
Unfortunately, -fno-strict-aliasing affects not only the diagnostics
emitted by the compiler, but also the code generation! So we were
leaving the normal (no --enable-checking) case with the compiler
assuming C's strict aliasing rules. The OpenAFS codebase has
historically not been strict-aliasing safe (for example,
commit 15e8678661ec49f5eac3954defad84c06b3e0164 refers to a
runtime crash using a certain compiler version, which is diagnosed
as the compiler using the C strict aliasing rules to make
optimizations that exposed the invalid program code.
To avoid futher surprises due to new compiler optimizations
that utilize the C strict aliasing rules, always disable
strict aliasing except when --enable-checking=all is used.
Benjamin Kaduk [Sun, 20 Dec 2015 19:33:36 +0000 (13:33 -0600)]
Partially unifdef afs_pag_call.c
This file is only built on linux, for afspag.ko. There is no
need to retain the artifiacts of its historical origin that include
conditionals for SUN5 or HPUX or the like.
Andrew Deason [Tue, 1 Apr 2014 18:28:20 +0000 (13:28 -0500)]
vos: Remove redundant " done" messages
In 1.4, a 'vos backup' command looked like this:
$ vos backup root.cell -verbose
Re-cloning backup volume 537351386 ... done
Created backup volume for root.cell
As of 1.6.1, this output now looks like this:
$ vos backup root.cell -verbose
Re-cloning backup volume 537351386 ... done
done
Created backup volume for root.cell
Note the extra " done". This change can break scripts that parse "vos"
output, but mainly it just looks confusing and doesn't make any sense.
This extra " done" appeared in verbose output for 'vos backup', 'vos
backupsys', and 'vos clone'. It was introduced by commit 13a4f2b1,
which added a VDONE to DoVolClone. This new VDONE call does make
sense, as this does make DoVolClone more self-contained, but the old
VDONE messages were not removed, so an extra " done" got printed.
In addition, commit 13a4f2b1 introduced a new call to DoVolDelete
followed by a VDONE, even though DoVolDelete calls VDONE itself,
causing another redundant " done".
To get rid of all of these redundant " done" messages, remove some
extra VDONE calls in UV_BackupVolume and UV_CloneVolume.
Almost all other calls to VDONE in vsprocs.c are matched by a
preceding message that says what we are doing. The sole exception is
UV_ChangeLocation, which outputs a " done" without any preceding
message. However, this is the behavior that UV_ChangeLocation (and
thus 'vos changeloc') has always has since it was introduced in 0c03f860.
Thanks to Jakub Moscicki of CERN, who originally reported this issue
at EAKC 2014.
Change-Id: I6a13c85e73deb59b511086207a296f4017f799dc
Reviewed-on: https://gerrit.openafs.org/10980 Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Stephan Wiesand [Mon, 11 May 2015 11:54:25 +0000 (13:54 +0200)]
redhat: remove leftover legacy kmod code from spec
Commit ec706b21530240d7fb66bad2f08513eff8f7c335 removed support
for Linux 2.4 and legacy kernel modules, but missed a few more
occurances of the latter. Remove those too.
Benjamin Kaduk [Sat, 13 Feb 2016 19:02:55 +0000 (13:02 -0600)]
doc: set use.id.as.filename for chunk.xsl
The deployed documentation on docs.openafs.org uses html file names
that match the id element for the XML elements in question. On
recent Debian systems, rebuilding these documents uses different
names for the files, based on their position within the document
hierarchy.
For consistency with past usage, and to avoid breaking direct links
when possible, set the xsl parameter use.id.as.filename to go back
to the old naming scheme.
Change-Id: I6d3fa2b74e319d1375891170817760d027e82f03
Reviewed-on: https://gerrit.openafs.org/12189 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Steve Simmons [Tue, 13 Sep 2011 17:41:19 +0000 (13:41 -0400)]
Reconciliation of src/{afs,vol}/voldefs.h
Bring these two files back into synchronization. Fix
possible bug on very old SysV hosts where volume
header file extension could be handled inconsistently.
Overall differences reduced by about 50%. HPUX/AIX
differences now correctly managed in both versions.
Comment formats and whitespace in both modified to
remove differences and follow openafs standards.
Change-Id: I8fdf9941a0ee6ad7a091be38740bc2796f2b1d18
Reviewed-on: https://gerrit.openafs.org/5405 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Benjamin Kaduk [Fri, 25 Dec 2015 00:17:34 +0000 (18:17 -0600)]
Add extra parentheses to macro bodies
In order to avoid surprises due to operator precedence, the bodies
of macros that are intended to be used as values should always
be enclosed in an outer set of parentheses, if they contain more than
one term.
Change-Id: If175b1977b9452a7507c5906e4e611eccafb4d67
Reviewed-on: https://gerrit.openafs.org/12143 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Benjamin Kaduk [Wed, 4 Mar 2015 18:34:53 +0000 (13:34 -0500)]
configure: check for some more krb5 functions
We will want to create a krb5_principal object that is used
as a sigil for comparison against, and need to do so in a portable
fashion. krb5_parse_name and krb5_unparse_name have been around
for a long time, but the counterpart krb5_free_unparsed_name is
not always available, so provide compatibility for it.
krb5_free_keytab_entry_contents is only a symbol in MIT krb5;
we will need a compat macro on Heimdal systems where it is not present.
Change-Id: I1cfe12910adac39216b8c7dd337b7e22d73555ed
Reviewed-on: https://gerrit.openafs.org/11785 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Michael Meffie [Thu, 5 Nov 2015 21:29:05 +0000 (16:29 -0500)]
roken: do not include the rk_rename() implementation on unix
libroken provides roken/rename.c for platforms where the native rename()
implementation does not replace the target if it already exists. As designed,
rk_rename() should be used instead of rename() everywhere and rk_rename()
is #defined to be rename() on platforms where this fix is not necessary.
Do not include the rk_rename() implementation on platforms which do not need
the rk_rename since it is not used on those platforms.
Note: This fix also avoids a recursive rename(). As currently implemented, the
rk_rename() function is redefined to rename() within the roken/rename.c module
when RENAME_DOES_NOT_UNLINK is not defined. This can mask the standard library
rename() and leads to a recursive call to rename().
Change-Id: I47a1fcd21939b161aaa7df7ffab26dc84e7b75ed
Reviewed-on: https://gerrit.openafs.org/12091 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Mark Vitale <mvitale@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Michael Meffie [Fri, 6 Feb 2015 16:33:48 +0000 (11:33 -0500)]
externalize log rotation
Do not create new server log files when servers are restarted by
default. External log rotation tools may be used to rotate the logs by
renaming log files and then signaling server processes to reopen
log files.
Add the -transarc-logs option to each server to provide backward
compatibility with the traditional Transarc-style logging. When
-transarc-logs is given, log files are renamed to an ".old" file
(overwriting the existing ".old" file) and the previous the log file is
truncated.
Michael Meffie [Fri, 6 Feb 2015 15:56:43 +0000 (10:56 -0500)]
util: reopen server logs on SIGUSR1 for external log rotation
Claim the SIGUSR1 signal for reopening server log files. A server
process will reopen the log file when the SIGUSR1 signal is received.
If the log file does not exist, the server process will create a new,
empty log file.
This allows external log rotation programs to rotate log files by
renaming an existing log file then sending a SIGUSR1 signal to the
corresponding server process. Any messages written to the log after the
log file was renamed but before the SIGUSR1 signal is received will
continue to be written to the renamed log file. The server process will
write messages to the new log file after handling the SIGUSR1 signal.
The SIGUSR1 signal is used to reopen the log file instead of the more
commonly used SIGHUP signal, since SIGHUP is already used for resetting
the logging level.
The retirement of Linux 2.4 support, in particular the desupport of
LinuxThreads, in commit ccf353ede6ef5cce7c562993d1bea0d20844bdb7 allows
for the use of SIGUSR1 in OpenAFS.
Michael Meffie [Wed, 6 Jan 2016 22:06:54 +0000 (17:06 -0500)]
Remove server logging globals
Remove the global variables used to setup server logging and replace
with an argument to OpenLog.
Keep the LogLevel variable as a global for use by the logging macros,
but provide an inline function for applications which check the log
level to dump more information when the log level is increased.
Provide consistency by adding syslog tags to processes that did not
previously set one (salvageserver, salvager, and volserver).
[kaduk@mit.edu: update commit message, use old-style log rotation for
kalog, minor commenting fixes]
Michael Meffie [Thu, 5 Feb 2015 21:59:52 +0000 (16:59 -0500)]
Reopen the correct filename when -logfile is given
The name of the log file passed to ReOpenLog() may not match the name
given in the initial OpenLog() call. This can happen when the -logfile
option is given to the fileserver or volume server.
Since the name given to ReOpenLog() must match the original name, change
ReOpenLog() to use the name previously given to OpenLog() and update all
callers.
Michael Meffie [Wed, 4 Feb 2015 17:19:32 +0000 (12:19 -0500)]
util: always reopen the log file
Reopen the log file even if the filename exists. This fixes the
situation where an external program moves or deletes the log
file, then creates a new file with the same log file name.
Michael Meffie [Thu, 5 Feb 2015 15:47:32 +0000 (10:47 -0500)]
util: refactor OpenLog and ReOpenLog
Non-functional changes and cleanups in preparation for fixes and
enhancements.
Move the duplicated code to redirect the stdio/stderr streams to a common
static function. Add a helper function to check for named pipes. Move the
code to rename files when opening logs to a separate static function.
Benjamin Kaduk [Mon, 21 Dec 2015 04:11:23 +0000 (22:11 -0600)]
util: Remove undocumented magic of mrafs-style logs
The MR-AFS-style logs would always include the thread number in
log entries with the timestamp; now that we are trying to rebrand
this feature as "timestampped logs", having this bonus feature
is unexpected.
Thread ids are still used at higher log levels, as enabled by SIGTSTP.
Michael Meffie [Thu, 5 Feb 2015 20:42:16 +0000 (15:42 -0500)]
util: fix file descriptor leak in mrafs-style logging
When MR-AFS style logging is in effect, the SIGHUP signal handler will rename
then create a new, empty server log file to support log rotation.
Unfortunately, the old log file descriptor is not closed, so each SIGHUP
signal will leak one file descriptor.
Be sure to close the current log file descriptor before opening the log again.
The OpenLog() routine will move the current log file to a new file, with a
timestamp string appended to the log file, then open the server log file with
truncate flag to start a new log file.
Michael Meffie [Sun, 13 Mar 2016 21:27:59 +0000 (17:27 -0400)]
util: fix log file renaming of mrafs-style logs
Do not make timestamped log files with an invalid number of seconds when
renaming old mrsafs-style log files, i.e., more than 59 seconds in the
seconds field.
Replace the goto used in the mrafs-style make file name retries with a
regular, bounded loop.
Michael Meffie [Mon, 14 Mar 2016 20:09:56 +0000 (16:09 -0400)]
util: allocate log filename buffers
Allocate the ourName buffer to save the log filename during OpenLog(),
instead of trying to copy the log filename to a fixed size buffer.
Deallocate this buffer when the log is closed with CloseLog(). Save the
log file name even when MR-AFS style logging is not effect to allow
ReOpenLog() to use the saved filename in a later commit.
Dynamically allocate a buffer when formatting a file name for log
rotation instead of using a fixed size buffer on the stack. Allocate
the buffer for both traditional Transarc-style log file renaming
(appending ".old" to the log filename) and the MR-AFS style logging
(appending a timestamp to the log filename).
Michael Meffie [Sun, 13 Mar 2016 20:55:48 +0000 (16:55 -0400)]
util: open mrafs-style logs with O_APPEND too
Commit b71a041364d28d6a56905a770cd20d1497ee26ec added the O_APPEND flag when
opening the log file to allow sites to use logrotate's "copy and truncate"
feature.
Add the O_APPEND to MR-AFS style logs as well so MR-AFS style logs can also be
handled correctly with logrotate, we have consistent open flags, and can remove
a duplicate call to open the log file descriptor.
Michael Meffie [Sun, 1 Feb 2015 21:53:26 +0000 (16:53 -0500)]
util: remove obsolete SETVBUF_REVERSED
Commit 8af5762909714367c1cc764b3f491c06c2bcd5d0 "Clean up some
obsolete Autoconf code" removed the obsolete autoconf check
AC_FUNC_SETVBUF_REVERSED and one use of the results, but
overlooked another instance; remove it.
Change-Id: Id62a2a96b911c0d16d51d8cce0966ae3736bde87
Reviewed-on: https://gerrit.openafs.org/11718 Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Reviewed-by: Perry Ruiter <pruiter@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Michael Meffie [Wed, 2 Sep 2015 20:33:46 +0000 (16:33 -0400)]
ptserver: convert the ptserver to opr softsig
Convert the ptserver from regular signal handling to the opr soft
signal handling when built with pthreads. This makes it safe to call
pthread functions within signal handlers.
Change-Id: I43d345517c75e275d6896154a979a908181a1f39
Reviewed-on: https://gerrit.openafs.org/11997 Reviewed-by: Perry Ruiter <pruiter@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Michael Meffie [Wed, 2 Sep 2015 20:32:54 +0000 (16:32 -0400)]
vlserver: convert the vlserver to opr softsig
Convert the vlserver from regular signal handling to the opr soft
signal handling when built with pthreads. This makes it safe to call
pthread functions within signal handlers.
Change-Id: Ic9bd841c4796bd64b603505541da7e767afda83e
Reviewed-on: https://gerrit.openafs.org/11996 Reviewed-by: Perry Ruiter <pruiter@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Michael Meffie [Wed, 2 Sep 2015 20:28:43 +0000 (16:28 -0400)]
volser: convert the volume server to opr softsig
Convert the volume server from regular signal handling to the opr soft
signal handling when built with pthreads. This makes it safe to call
pthread functions within signal handlers.
Change-Id: I25b9a9184c526f4ce9b6e2abb25ae9135cc97ec6
Reviewed-on: https://gerrit.openafs.org/11995 Reviewed-by: Perry Ruiter <pruiter@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Michael Meffie [Mon, 29 Jun 2015 15:03:16 +0000 (11:03 -0400)]
viced: remove old signal handler wrappers
Remove remnants of old lwp thread signal handler wrapper functions from
the fileserver. The lwp softsig handlers required a function which was
passed a void pointer argument and returned a void pointer. Tidy the
code by removing the unneeded wrappers and use the signal handler
functions directly.
Change-Id: I3d52efe659b03ee9a9484ec7a9d74404f1970278
Reviewed-on: https://gerrit.openafs.org/11921 Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Mark Vitale <mvitale@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Michael Meffie [Thu, 31 Mar 2016 20:39:48 +0000 (16:39 -0400)]
util: softsig version of function to setup logging signal handlers
Provide a new routine to setup the server log signals which registers
soft signal handlers for the common log management signals (SIGTSTP and
SIGHUP). Keep the old SetupLogSignals() routine around while lwp still
exists.
Michael Meffie [Thu, 31 Mar 2016 20:37:42 +0000 (16:37 -0400)]
procmgmt: wrappers for softsig handlers
Provide procmgmt wrappers for Windows environments which match the opr_softsig
functions. This allows builds of the windows servers continue to use the
existing process management signal handling functions, without introducing
additional conditional compilation in the server code.
Michael Meffie [Thu, 10 Sep 2015 01:26:23 +0000 (21:26 -0400)]
salvager: convert salvager and salvagerserver to libutil logging
Use the libutil logging facility in the salvager and DAFS salvageserver
in order to have consistent logging features and time stamp formats with
the other OpenAFS servers.
Michael Meffie [Thu, 27 Aug 2015 17:06:05 +0000 (13:06 -0400)]
afs: shake harder in shake-loose-vcaches
Linux based cache managers will allocate vcaches on demand and
deallocate batches of vcaches in the background. This feature is called
dynamic vcaches.
Vcaches to be deallocated are found by traversing the vcache LRU list
(VLRU) from the oldest vcache to the newest. Up to a target number of
vcaches are attempted to be evicted. The afs_xvcache lock protecting
the VLRU may be dropped and re-acquired while attempting to evict a
vcache. When this happens, it is possible the VLRU may have changed, so
the traversal of the VLRU is restarted. This restarting of the VLRU
transversal is limited to 100 iterations to avoid looping indefinitely.
Vcaches which are busy cannot be evicted and remain in the VLRU. When a
busy cache was not evicted and the afs_xvache lock was dropped, the VLRU
traversal is restarted from the end of the VLRU. When the busy vcache is
encountered on the retry, it will trigger additional retries until the
loop limit is reached, at which point the target number of vcaches will
not be deallocated.
This can leave a very large number of unbusy vcaches which are never
deallocated. On a busy machine, tens of millions of unused vcaches can
remain in memory. When the busy vcache at the end of the VLRU is finally
evicted, the log jam is broken, and the background deamon will hold the
afs_xvcache lock for an excessively long time, hanging the system.
Fix this by moving busy vcaches to the head of the VLRU before
restarting the VLRU traversal. These busy vcaches will be skipped when
retrying the VLRU traversal, allowing the cache manager to make progress
deallocating vcaches down to the target level.
This was already done on the mac osx platform while attempting to evict
vcaches. Move the code to move busy vcaches to the head of the VLRU up
the the platform agnostic caller.
Thanks to Andrew Deason for the initial version of this patch.
Change-Id: I7768d00604e56d8d5369ac5215f7c2ab7996c4eb
Reviewed-on: https://gerrit.openafs.org/11654 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Andrew Deason <adeason@dson.org> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Michael Meffie [Thu, 25 Feb 2016 23:49:20 +0000 (18:49 -0500)]
LINUX: hold vcache while dropping dcache refs
Hold a reference on a vcache while attempting to evict the inode from
the dcache. Since the afs_xvcache lock is dropped, it could be possible
for the vcache to be flushed during this time, making it unsafe to use
the vcache after the eviction attempt.
Change-Id: I9d91db98387b7aaa986ed915420c6cafb4f12438
Reviewed-on: https://gerrit.openafs.org/12206 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Andrew Deason <adeason@dson.org> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Stephan Wiesand [Thu, 7 Apr 2016 08:58:30 +0000 (10:58 +0200)]
Linux: Fix misleading indentation and other whitespace
Commit 7edc6694e7632c9736bd1516935604a638165313 introduced a
misleading indentation of a line in afs_linux_prefetch. Correct
it, and once here remove trailing whitespace throughout the file.
Stephan Wiesand [Tue, 8 Mar 2016 13:15:17 +0000 (14:15 +0100)]
Linux 4.4: Do not use splice()
splice() may return -ERESTARTSYS if there are pending signals, and
it's not even clear how this should be dealt with. This potential
problem has been present for a long time, but as of Linux 4.4
(commit c725bfce7968009756ed2836a8cd7ba4dc163011) seems much more
likely to happen.
Until resources are available to fix the code to handle such errors,
avoid the riskier uses of splice().
If there is a default implementation of file_splice_{write,read},
use that; on somewhat older kernels where it is not available,
use the generic version instead.
[kaduk@mit.edu: add test for default_file_splice_write]
Change-Id: Ib4477cdfb2cd0f49f516da75edc3cb9d1a8817dc
Reviewed-on: https://gerrit.openafs.org/12217 Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Michael Laß [Mon, 18 Jan 2016 17:29:00 +0000 (18:29 +0100)]
Linux 4.4: key_payload has no member 'value'
In Linux 4.4 (146aa8b1453bd8f1ff2304ffb71b4ee0eb9acdcc) type-specific and
payload data have been merged. The payload is now accessed directly and has
no 'value' member anymore.
FIXES 132677
Change-Id: Id26c40c80314a0087ecc0735029412787058ef07
Reviewed-on: https://gerrit.openafs.org/12169 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Mark Vitale <mvitale@sinenomine.net> Tested-by: Mark Vitale <mvitale@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Chas Williams [Mon, 23 Nov 2015 19:15:08 +0000 (14:15 -0500)]
rxgen: Don't use size_t in struct rx_opaque with XDR
OpenAFS's XDR doesn't support size_t at this time. For now, use a
temporary stack variable to avoid 32/64-bit issues and copy back the
returned value upon success.
Change-Id: Ia3dd8abd665a19e04aa611f940728d088a8f87b7
Reviewed-on: https://gerrit.openafs.org/12115 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Michael Meffie [Fri, 18 Mar 2016 14:22:33 +0000 (10:22 -0400)]
doc: fs examine no longer requires read rights on the volume root vnode
Update the man page to reflect the current access rights required for fs
examine. Historically, fs examine required read access on the root
vnode of the volume housing the directory or file being examined. This
access check was relaxed in commit d2d591caf2c9b4cf2ebae708cc9b4c8b78ca5a5a,
since the information returned by the file server is already available
anonymously by other means.
Change-Id: If62b625bce8a260b98fb56a6feec49c674f2de53
Reviewed-on: https://gerrit.openafs.org/12223 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Benjamin Kaduk [Tue, 15 Mar 2016 04:15:20 +0000 (23:15 -0500)]
OPENAFS-SA-2016-002 ListAddrByAttributes information leak
The ListAddrByAttributes structure is used as an input to the GetAddrsU
RPC; it contains a Mask field that controls which of the other fields
will actually be read by the server during the RPC processing.
Unfortunately, the client only wrote to the fields indicated by the
mask, leaving the other fields uninitialized for transmission on the
wire, leaking some contents of client memory.
Plug the information leak by zeroing the entire structure before use.
Benjamin Kaduk [Tue, 15 Mar 2016 04:15:20 +0000 (23:15 -0500)]
OPENAFS-SA-2016-002 VldbListByAttributes information leak
The VldbListByAttributes structure is used as an input to several
RPCs; it contains a Mask field that controls
which of the other fields will actually be read by the server
during the RPC processing. Unfortunately, the client only
wrote to the fields indicated by the mask, leaving the other
fields uninitialized for transmission on the wire, leaking
some contents of client memory.
Plug the information leak by zeroing the entire structure before use.
Benjamin Kaduk [Tue, 15 Mar 2016 04:15:20 +0000 (23:15 -0500)]
OPENAFS-SA-2016-002 AFSStoreVolumeStatus information leak
The AFSStoreVolumeStatus structure is used as an input to the
RXAFS_SetVolumeStatus RPC; it contains a Mask field that controls
which of the other fields will actually be read by the server
during the RPC processing. Unfortunately, the client only
wrote to the fields indicated by the mask, leaving the other
fields uninitialized for transmission on the wire, leaking
some contents of kernel memory.
Plug the information leak by zeroing the entire structure before use.
Benjamin Kaduk [Sun, 13 Mar 2016 17:56:24 +0000 (12:56 -0500)]
OPENAFS-SA-2016-002 AFSStoreStatus information leak
Marc Dionne reported that portions of the AFSStoreStatus structure
were not written to before being sent over the network for
operations such as create, symlink, etc., leaking the contents
of the kernel stack to observers. Which fields in the request
are used are controlled by a flags field, and so if a field was
not going to be used by the server, it was sometimes left
uninitialized.
Fix the information leak by zeroing out the structure before use.
Jeffrey Altman [Thu, 10 Mar 2016 02:38:10 +0000 (20:38 -0600)]
OPENAFS-SA-2016-001 group creation by foreign users
CVE-2016-2860:
In AFS 3.3 as part of the addition of the cross-cell support for foreign
user auto-registration a bug was introduced that permits foreign users
to create arbitrary groups as if they were system administrators. This
permits the groups to be created without any group quota checks, and
using group names that non-administrators would not normally be able to
create, such as groups with the "system:" prefix or groups with no colon
(that is, in the namespace for users).
Additionally, all entries created using the auto-registration service
were marked as being created by system:administrators. This behavior
should not be changed on the stable release branch, but for the next
release the behavior will change to show these entries as being
self-created, to better reflect reality.
FIXES 132822
[kaduk@mit.edu: reword commit message, minor style adjustments]
Jeffrey Altman [Thu, 10 Mar 2016 04:34:55 +0000 (22:34 -0600)]
ptserver: fix pt_util creation of groups
In commit 53ac98931adf9f04c150d9bc084cae31f3913476 the adjustment of
owner id was moved from CreateEntry() into CreateGroupName(). This was
done for two reasons:
1. to reuse the computation of "is administrator" within
CreateGroupName() in order to permit the owner id to be set
to the invalid values 0 and ANONYMOUSID.
2. to allow the owner id to be altered in ChangeEntry().
Unfortunately, CreateEntry() needs to be able to alter the owner id
when creating users not only groups.
This change moves the computation of "is administrator" and the
owner id assignment to CreateEntry() and ChangeEntry().
Michael Meffie [Wed, 24 Feb 2016 21:57:11 +0000 (16:57 -0500)]
LINUX: ifconfig is deprecated
ifconfig is deprecated and is no longer installed by default on RHEL 7 and
Centos 7. Use the replacement ip command in the init script for linux.
Fallback to ifconfig in the event the ip command is not available.
Thanks to Ben Kaduk for pointing out the hash built-in command.
Change-Id: I7ffe272eb712cd83a70a7d880d239f72b40cb5df
Reviewed-on: http://gerrit.openafs.org/12192 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Note: This crash was exposed by other bugs (to be addressed in future
commits) in OpenAFS large volume support. However, there may
be other failure paths (unrelated to large volumes) that expose
this error as well.
When VAllocVnode() must allocate a new vnode but fails while
updating the vnode index file (e.g. an "addled bitmap" due to other
bugs in working with a vnode index larger than 2^31 bytes), it branches
to common recovery logic at label error_encountered:.
Part of this recovery is to call VFreeBitmapEntry_r(). Commit 08ffe3e81d875b58ae5fe4c5733845d5132913a0 added a VOL_FREE_BITMAP_WAIT
flag to VFreeBitmapEntry() in order to prevent races with VAllocBitmapEntry().
If the caller specifies VOL_FREE_BITMAP_WAIT, VFreeBitmapEntry_r will
call VCreateReservation_r() and VWaitExclusiveState_r(). However, the
exit from VFreeBitmapEntry_r() calls VCancelReservation_r() unconditionally.
This works correctly with the majority of callers to VFreeBitmapEntry_r,
which do specify the VOL_FREE_BITMAP_WAIT flag.
However, the VAllocVnode() error_encountered logic must specify 0 for
this flag because the thread is already in an exclusive state
(VOL_STATE_VNODE_ALLOC). This correctly causes VFreeBitmapEntry_r() to
forgo both the reservation and wait-for-exclusive-state. However, before
exit it erroneously calls VCancelReservation_r(). We now have unbalanced
reservations (nWaiters); this causes an assert when the VAllocVnode()
error_encountered recovery code later calls VCancelReservation_r()
for what it believes is its own prior reservation.
Modify VFreeBitmapEntry_r() to make its final VCancelReservation_r()
conditional on flag VOL_FREE_BITMAP_WAIT.
Change-Id: Id6cf6b1279b11e6dfc4704bba5739912f663beca
Reviewed-on: http://gerrit.openafs.org/11983 Reviewed-by: Perry Ruiter <pruiter@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Jeffrey Altman <jaltman@auristor.com> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Mark Vitale [Sat, 18 Jul 2015 05:12:51 +0000 (01:12 -0400)]
bozo: allow start of fs and dafs bnodes with options
fs_create() and dafs_create() issue stat() to verify
the existence of each executable specified in the bnode.
However, commit fda2bc874751ca479365dc6389c0eebb41a0bda1
inadvertently removed the code that stripped any command
arguments before the stat(). Therefore, any bnode that
specifies arguments (e.g. /usr/afs/bin/dafileserver -d 5),
causes the stat() to fail and the bnode will not start.
Rename function AppendExecutableExtension() to a less
"window-ish" name: PathToExecutable().
Modify the Windows version of PathToExecutable()
to properly strip arguments.
Reimplement the Unix macro as function PathToExecutable()
that properly strips arguments.
Change-Id: I04f7ce2afb8211bd12b9063db1335738bff1cc1e
Reviewed-on: http://gerrit.openafs.org/11934 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Mark Vitale <mvitale@sinenomine.net> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Tested-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Michael Meffie [Mon, 8 Feb 2016 15:10:32 +0000 (10:10 -0500)]
test: skip buserror test when SIGBUS is not defined in perl POSIX module
Older versions of the perl POSIX module do not define the SIGBUS symbol, which
causes the opr/softsig-t perl test to fail to compile. Instead of trying to
defined SIGBUS, which may be platform dependent, skip the buserror unit test on
these older platforms.
Michael Meffie [Fri, 30 Jan 2015 17:20:10 +0000 (12:20 -0500)]
volser: detect eof in dump stream while reading acl
Detect an EOF condition while reading the ACL in a dump stream
and return a restore error, instead of filling the ACL with
0xFF and then failing the restore due to an invalid tag.
Benjamin Kaduk [Sun, 22 Nov 2015 20:23:49 +0000 (14:23 -0600)]
cellconfig: check for invalid dotted quads
IP addresses entered into the CellServDB with components larger
than 255 would silently be trucated down to 8-bit unsigned integer
representations. This could cause confusing behavior with
occasional hangs.
FIXES 131794
Change-Id: I44834cb4662e178fdb4be2eeb03ad58d2fa7c556
Reviewed-on: http://gerrit.openafs.org/12109 Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Andrew Deason [Sun, 12 Apr 2015 01:51:09 +0000 (20:51 -0500)]
afs: Log abnormally large chunk files
Any chunk in our cache for a regular file should be smaller than or
equal to our configured chunksize. If someone sets a chunk to be
larger than that, it is very strange and may cause other confusing
issues. Specifically, afs_DoPartialWrite determines if our cache is
"too full" by counting the number of dirty chunks. If we have a dirty
chunk that is much larger than the chunksize, it can throw off the
afs_DoPartialWrite calculation.
This is only true for dcaches backing regular files, though. For
directories, we fetch the entire directory into a single chunk file,
and the size of a directory blob can easily exceed the chunksize
without issues. The aforementioned issue with afs_DoPartialWrite does
not apply, since directory chunks cannot be dirty (we only locally
modify the chunk if we modify the dir on the server, and the DVs
match).
Anyway, it should not be possible to get a chunk for a regular file
larger than the chunksize. Log a message if it does occur, to help
assist anyone in tracking down issues when this does occur.
[mmeffie@sinenomine.net remove unnecessary casts in afs_warn args.]
Change-Id: I5cf58e3659dc04255c62fa56b044d5bc1c7ce877
Reviewed-on: http://gerrit.openafs.org/11831 Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Chas Williams [Sat, 25 Apr 2015 20:38:12 +0000 (16:38 -0400)]
opr: Disable some warnings during opr assertions
Detect _Pragma(), a C99 extension for inline #pragma's, and use it to
disable to certain warnings during the use of opr_Verify() and
opr_Assert().
Because some versions of clang support _Pragma, do not have support
for -Wtautological-pointer-compare, and do set -Werror and -Wunknown-pragmas,
we must explicitly check for pragma support for -Wtautological-pointer-compare
as well.
Change-Id: Id3d5ee347f320a366a0571572b58414aa7044bf7
Reviewed-on: http://gerrit.openafs.org/11852 Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Andrew Deason [Fri, 10 Apr 2015 02:26:25 +0000 (21:26 -0500)]
afs: Log weird 'size' fetchdata errors
There are a couple of situations that should never happen when issuing
a fetchdata, but cause errors when they do:
- The fileserver responds with more than 2^32 bytes of data
- The fileserver responds with more data than requested (but still
smaller than 2^32)
While these should normally never be encountered, it can be very
confusing when they do, since they cause file fetches to fail. To give
the user or investigating developer some hope of figuring out what is
going on, at least log a warning in these situations, to at least
indicate this is the area in which something is breaking.
Only log these once, in case something causes these conditions to be
hit, e.g., every fetch. Once is at least enough to say this is
happening.
[mmeffie@sinenomine.net remove unneeded casts in afs_warn args and
explicit static initializers.]
Andrew Deason [Wed, 8 Apr 2015 03:10:53 +0000 (22:10 -0500)]
afs: Fix fetchInit for negative/large lengths
Currently, the 'length64' variable in rxfs_fetchInit is almost
completely unused (it just goes into an icl logging function). For the
length that we actually use ('*alength'), we just take the lower 32
bits of the length that the fileserver told us. This method is
incorrect in at least the following cases:
- If the fileserver returns a length that is larger than 2^32-1,
we'll just take the lower 32 bits of the 64-bit length the
fileserver told us about. The client currently never requests a
fetch larger than 2^32-1, so this would be an error, but if this
occurred, we would not detect it until much later in the fetch.
- If the fileserver returns a length that is larger than 2^31-1, but
smaller than 2^32, we'll interpret the length as negative (which we
assume is just 0, due to bugs in older fileservers). This is also
incorrect.
- If the fileserver returns a negative length smaller than -2^31+1,
we may interpret the give length as a positive value instead of a
negative one. Older fileservers can do this if we fetch data beyond
the file's EOF (this was fixed in the fileserver in commit 529d487d65d8561f5d0a43a4dc71f72b86efd975). This positive length
will cause an error (usually), instead of proceeding without error
(which is what would happen if we correctly interpreted the length
as negative).
On Solaris, this can manifest as a failed write, when writing to a
location far beyond the file's EOF from the fileserver's point of
view, because Solaris writes can trigger a fetch for the same area.
Seeking to a location far beyond the file's EOF and writing can
trigger this, as can a normal copy into AFS, if the file is large
enough and the cache is large enough. To explain in more detail:
When copying a file into AFS, the cache manager will buffer the dirty
data in the disk cache until the file is synced/closed, or we run out
of cache space. While this data is buffering, the application will
write into an offset, say, 3GiB into the file. On Solaris, this can
trigger a read for the same region, which will trigger a fetch from
the fileserver at the offset 3GiB into the file. If the fileserver
does not contain the fix in commit 529d487d65d8561f5d0a43a4dc71f72b86efd975, it will respond with a large
negative number, which we interpret as a large positive number; much
larger than the requested length. This will cause the fetch to fail,
which then causes the whole write() call to fail. Specifically this
will fail with EINVAL on Solaris, since that is the error code we
return from afs_GetOnePage when we fail to acquire a dcache. If the
cache is small enough, this will not happen, since we will flush data
to the fileserver before we have a large amount of dirty data,
e.g., 3GiB. (The actual error occurs closer to 2GiB, but this is just
for illustrative purposes.)
To fix this, detect the various ranges of values mentioned above, and
handle them specially. Lengths that are too large will yield an error,
since we cannot handle values over 2^31-1 in the rxfs_* framework
currently.
For lengths that are negative, just act as if we received a length of
0. Do this for both the 64-bit codepath and the non-64-bit codepath,
just so they remain identical.
[mmeffie@sinenomine.net: directly use 64 bit comparisons, don't mask
end call error code, commit nits.]
Change-Id: I7e8f2132d52747b7f0ce4a6a5ba81f6641a298a8
Reviewed-on: http://gerrit.openafs.org/11829 Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Most of the time, this is fine. However, if 'position' is more than
2GiB greater than file_length, 'size' will calculated to be smaller
than -2GiB. Since 'size' in this code is a signed 32-bit integer, this
can cause 'size' to underflow, and result in a value closer to
(positive) 2GiB.
This has two potential effects:
The afs_AdjustSize call in afs_GetDCache will cause the underlying
cache file for this dcache to be very large (if our offset is around
2GiB larger than the file size). This can confuse other parts of the
client, since our cache usage reporting will be incorrect (and can be
even way larger than the max configured cache size).
This will also cause a read request to the fileserver that is larger
than necessary. Although 'size' will be capped at our chunksize, it
should be 0 in this situation, since we know there is no data to
fetch. At worst, this currently can just result in worse performance
in rare situations, but it can also just be very confusing.
Note that an afs_GetDCache request beyond EOF can currently happen in
non-race conditions on at least Solaris when performing a file write.
For example, with a chunksize of 256KiB, something like this will
trigger the overflow in 'size' in most cases:
Michael Meffie [Thu, 21 Jan 2016 22:55:37 +0000 (17:55 -0500)]
doc: afsd -settime and -nosettime are obsolete
Update the afsd man page -settime and -nosettime options, which are obsolete
and no longer have any effect. Use the same wording as the other obsolete
options in the afsd man page. Keep the recommendations to use the time keeping
daemons provided by the operating system to maintain the system time.
Change-Id: I08a1bd5ae0b2d6618b3e212ebcbb98f470e33820
Reviewed-on: http://gerrit.openafs.org/12175 Reviewed-by: Michael Laß <lass@mail.uni-paderborn.de> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Benjamin Kaduk [Mon, 23 Nov 2015 00:22:58 +0000 (18:22 -0600)]
Fix optimized IRIX kernel module builds
Commit 9f94892f8d996a522e7801ef6088a13769bee7c2 (from 2006)
introduced per-file CFLAGS, using $(CFLAGS-$@); this construct
is not parsed well by IRIX make, which ends up attempting to
expand '$@)' and finding mismatched parentheses.
Commit 5987e2923a2670a27a801461dc9668ec88ed7d2a (from 2007) followed,
fixing the IRIX build but only for the NOOPT case. This left the
problematic expression in CFLAGS_OPT until 2013, when another RT
ticket was filed reporting the continued breakage. That ticket
was then ignored until 2015 (now) with no particular cries of
outrage on the mailing lists. Perhaps this gives some indication
of the size and/or mindset of the IRIX userbase. (There have
been successful IRIX installations during this time period, so
presumably it was discovered that disabling optimizations helped
the build along.)
FIXES 131621
Change-Id: Id5298103221b016239723aa08ebe0dc54bdadc5e
Reviewed-on: http://gerrit.openafs.org/12111 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Chas Williams [Thu, 24 Dec 2015 22:58:32 +0000 (17:58 -0500)]
LINUX: don't cache negative entries for dynroot
The dynroot volume lacks any callbacks that would invalidate the directory
or change the data version. Further, the data version for the dynroot
is only updated for when a new cell is found or added (a positive lookup).
Change-Id: If0b022933de7335d3d94aafc77c50b85b99f4116
Reviewed-on: http://gerrit.openafs.org/12140 Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Marcio Barbosa [Tue, 29 Dec 2015 13:31:43 +0000 (10:31 -0300)]
afs: do not allow two shutdown sequences in parallel
Often, ‘afsd -shutdown’ is called right after ‘umount’.
Both commands hold the glock before calling ‘afs_shutdown’.
However, one of the functions called by 'afs_shutdown', namely,
‘afs_FlushVCBs’, might drop the glock when the global
'afs_shuttingdown' is still equal to 0. As a result, a scenario
with two shutdown sequences proceeding in parallel is possible.
To fix the problem, the global ‘afs_shuttingdown’ is used as an
enumerated type to make sure that the second thread will not run
‘afs_shutdown’ while the first one is stuck inside ‘afs_FlushVCBs’.
Change-Id: Iffa89d82278b0df5fb90fc35608af66d8e8db29e
Reviewed-on: http://gerrit.openafs.org/12016 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Brian Torbich [Thu, 21 Jan 2016 15:08:27 +0000 (10:08 -0500)]
redhat: Correct permissions on systemd unit files
Change the systemd unit file permissions created via
openafs.spec to be 0644 instead of 0755. Having the
systemd unit files be executable will trigger a systemd
warning.
FIXES 132662
Change-Id: I9f5111c855941528193aaabeb42bf1b732246a7e
Reviewed-on: http://gerrit.openafs.org/12174 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>