Commit Graph

9455 Commits

Author SHA1 Message Date
Garrett Wollman
90ea68979c afsd: look in the right place for -splitcache argument
The argument to -splitcache is in as->parms[34], not [30].

Change-Id: I4d7be16a1ad99a03025c80f9782c4f678da868ae
Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5169
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-07 11:50:27 -07:00
Garrett Wollman
8776f19417 afs_pioctl: don't use cell uninitialized in PGetTokens2
An unlikely error condition could lead to the variable cell in
PGetTokens2 being passed uninitialized to afs_PutCell.  Initialize
it to NULL beforehand to avoid this.

Change-Id: Ia8ded86df9d8af2f08c02d39749252d98a6c9ffe
Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5168
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-07 11:50:19 -07:00
Garrett Wollman
43834bff1a butc: avoid freeing uninitialized pointer in writeDbDump()
In error conditions, charList could be freed before it is initialized.
Move the initialization up to before the error checks.

Change-Id: I678f40552590e238f494507f7410233cdbb949ac
Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5167
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-07 11:50:08 -07:00
Derrick Brashear
1fc4c9dbe2 pam: stop building it wrong
in the new lwp/pthread/shared universe, well, we have the
opportunity to be correct. and we chose to do it entirely wrong.
we're building a shared object. use the right rules. we need
to add some CFLAGS for PAM. do that using MODULE_CFLAGS instead
of just building a whole new CCRULE

Change-Id: Ie3e3c5ba902e5364cfa99d4dbd1b5b7fd4451127
Reviewed-on: http://gerrit.openafs.org/5153
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-08-07 11:49:42 -07:00
Derrick Brashear
3d84c065fb pam: clean up unused variables and prototyping
don't define variables on platforms we won't use them on
do prototype functions we call. basically, we compile with warnings
enabled now, so, fix everything so we *can*.

Change-Id: I749f27c227ac70c58ccc68f1548f8274f10e3587
Reviewed-on: http://gerrit.openafs.org/5154
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-07 11:49:20 -07:00
Derrick Brashear
496fb87372 rx: avoid nat ping until connection is attached
drop nat pings on connections we haven't talked on yet

Change-Id: Ie333d50a090f1f086c958440cc37849413442dea
Reviewed-on: http://gerrit.openafs.org/5130
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-07 11:49:00 -07:00
Garrett Wollman
c92f04af60 butc: avoid testing stack garbage; remove dead initializer
"code" is unconditionally set early in saveDbToTape() so there's
no need to initialize it.  On the other hand, dumpEntry.id is used
before dumpEntry is initialized, so set it to what appears to be
the expected value before any non-local exits could cause it to be
inspected.

Change-Id: I133f8e84e46d0faedf3c9683330d92158bcd8935
Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5166
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-07 08:56:09 -07:00
Garrett Wollman
34cc26a1b1 butc: initialize startTime before it is used
In some unusual error situations, startTime may be used uninitialized.
Move the initialization up above the first such error condition.
(None of the intervening code can take measurably long to execute
so this should not make any difference in the non-error case.)

Change-Id: I25bf7a5e149540593febec79f9f5111434807514
Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5165
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-07 08:55:37 -07:00
Garrett Wollman
619b420903 vos: don't free stack garbage on error
If wantExtendedInfo is true, then pntr is used uninitialized.
In the other case, UV_ListVolumes will have set it to NULL
before doing anything (even if it returns an error), so this
free() is dead anyway.

Change-Id: I6979a69d33ecbbdb906eb9a075bbf13180e36646
Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5164
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-07 08:55:05 -07:00
Simon Wilkinson
55beacdc38 libafsauthent: Add volser and vldb
Add the volser and vldb families of functions to libafsauthent. This
allows applications such as per-AFS which are building pthreaded clients
to use a single library, rather than trying to mix LWP and pthreaded
code within the same process.

Change-Id: I3682876e91ca03311a798ac71e3a7a28f3205d42
Reviewed-on: http://gerrit.openafs.org/5157
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-07 08:54:38 -07:00
Simon Wilkinson
400c72561e volser doesn't depend on tviced, but on vlserver
Nothing within the volser/ directory depends on tviced, so remove the
unecessary dependency. Add an explicit dependency on vlserver, so that
libvldb is available to us.

This is required to get rid of some potential circular loops when we
start including volser objects in libafsauthent

Change-Id: Ibb6b8fb87dfe6e9eb4fa6d1dde195fd5261a8959
Reviewed-on: http://gerrit.openafs.org/5156
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-07 08:54:27 -07:00
Jeffrey Altman
0246f6e968 Windows: symlink make should translate \\afs target
If the target is a UNC path beginning with the AFS netbios name,
convert the path to use Unix /afs mountpoint notation.

Change-Id: I01e01b70938f8eb383fd3e7458a140d9e89dd237
Reviewed-on: http://gerrit.openafs.org/5162
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-08-05 06:22:35 -07:00
Jeffrey Altman
c512683859 Windows: adjust scache LRU postion upon deletion
If the object represented by a scache object is deleted,
update the LRU position of the scache object to make it
the first object in the LRU queue to be recycled.  This
preserves the cached objects for those that might prove
useful in the future.

Change-Id: I0e862b1270e10c31f20ecde06d208f4b8c405c3a
Reviewed-on: http://gerrit.openafs.org/5161
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-08-04 19:03:07 -07:00
Jeffrey Altman
4e42d6fd18 Windows: fix condition calls to osi_Log
The osi_Log macro is if(foo) osi_AddLog()

If osi_Log macros will be conditionally called, the conditonal
needs to have bracing.

Change-Id: I59de78a5b7b35cc822a648a51cd63a14037c1ca5
Reviewed-on: http://gerrit.openafs.org/5160
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-08-04 19:00:45 -07:00
Jeffrey Altman
17e50a4b98 Windows: LockOrderValidation memory usage optimization
Instead of using malloc() and free() to allocation lock reference
structures, cache allocated objects in a free list.  This reduces
memory fragmentation.

Change-Id: Idffe82282c77202d0fc3a9be9123c3b7384ecd63
Reviewed-on: http://gerrit.openafs.org/5159
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-08-04 19:00:26 -07:00
Jeffrey Altman
2bce3b50ef Windows: after dir enum adjust dir scache LRU
During a directory enumeration the directory scache object
is reference counted so it can't be recycled.  However, if
there are more directory entries than the maximum number
of cached scache objects the directory scache object will
end up being the next object to be recycled after the refcount
is dropped.  Since the directory is clearly a hot object, before
dropping the reference, adjust the scache LRU position so that
it is the last object to be recycled.

Fix the variable name for the directory scache to be 'dscp'
for consistency.

Change-Id: Ia2089fb9b47dab77abc0911ab009e5aed75ed848
Reviewed-on: http://gerrit.openafs.org/5158
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-08-04 19:00:03 -07:00
Jeffrey Altman
4111ee2374 Windows: use %p to print cm_scache_t pointers
Change-Id: Iee13204820b3adc4359e42d46d9f9050ab07bcb2
Reviewed-on: http://gerrit.openafs.org/5152
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-08-04 18:59:42 -07:00
Simon Wilkinson
88725587e9 tbudb depends on tubik ...
... so say so in the Makefile

Change-Id: I84f0ac3c06953eff98e0194ad375c32b3656af58
Reviewed-on: http://gerrit.openafs.org/5155
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-03 12:58:35 -07:00
Jeffrey Altman
fec4e6bc59 Windows: add missing dafs man pages to wix installer
dafileserver.html
dasalvager.html
davolserver.html

Change-Id: I87a70b2a30701f184f7a70fbcf6ee50a4bb1d973
Reviewed-on: http://gerrit.openafs.org/5149
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-08-02 23:19:00 -07:00
Jeffrey Altman
f631a11f5e Windows: conditionalize mappings of error values
Visual Studio 10 adds a large number of additional POSIX C99
error values to errno.h.  Wrap each mapping with #ifndef to ensure
that we do not redefine the C runtime errno.h definition.

Change-Id: Ia6929d9ff84358059efcc4a53dcc91ee2612fc5a
Reviewed-on: http://gerrit.openafs.org/5129
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-08-01 10:42:55 -07:00
Jeffrey Altman
71e64b6f21 Windows: unified afs errors must use nt mapping
On Windows, error.h does not provide a complete list of POSIX
C99 error values.  OpenAFS fills in the gaps with a private
error mapping table afs/errmap_nt.h (src/util/errmap_nt.h).
If errmap_nt.h is not included prior to processing unified_afs.h,
values such as ELOOP will be mapped to EIO instead of the unique
value defined by errmap_nt.h.

Change-Id: I3d25fafb15f1b0060ad1047178cbadd5ce22edb2
Reviewed-on: http://gerrit.openafs.org/5128
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-08-01 10:42:39 -07:00
Derrick Brashear
d54c9b05d0 vos: spell "vldb" correctly
i'm not even going to ask.

Change-Id: I5f59177ef58d9728a516176a14e0504130f7c584
Reviewed-on: http://gerrit.openafs.org/5125
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-08-01 08:03:42 -07:00
Derrick Brashear
5ebef72c02 macos: fix vnode finalization
erroneously pushed a bad version of this. fix it now.

Change-Id: Ic5db50473a97bd7ffb3ba34ac052da2ae8f2875b
Reviewed-on: http://gerrit.openafs.org/5124
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-08-01 07:47:40 -07:00
Andrew Deason
b621a29860 SOLARIS: Do not release NULL root vp on unmount
When we unmount, and afs_globalVp is NULL (e.g. because root.afs was
unavailable when the client was started), we will panic the machine if
we try to release it. So, if afs_globalVp is NULL when we hit our
unmount handler, don't touch it.

Reported by Andy Cobaugh.

Change-Id: I4e5869237e24da320afc2b7edaf8edca0ab3e4e9
Reviewed-on: http://gerrit.openafs.org/5117
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-08-01 05:08:35 -07:00
Will Maier
6b83ba621b RedHat: Return status values from client init
The init script provided with OpenAFS always returns 0 when the status
subcommand is called, even if the service is not running.

For example:

$ sudo service afs status; echo $?
afsd is stopped
0

This change makes sure the init script exits with the value returned
by the status function from /etc/init.d/functions. With this patch,
the afs init script behaves as expected when used, for example, in a
Chef service resource:

$ sudo service afs status; echo $?
afsd is stopped
3

Change-Id: If3d317fc406746f357e29e0d8d82c7ccf3c192d7
Reviewed-on: http://gerrit.openafs.org/5123
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-08-01 05:03:18 -07:00
Jeffrey Altman
afc3ded567 Windows: Do not execute tasks on deleted files
If a cm_BkgDaemon thread finds a queued request whose cm_scache_t
has the CM_SCACHEFLAG_DELETED flag set, do not execute the request
and fail it immediately with CM_ERROR_BADFD.  Any attempt to execute
the request will fail with VNOVNODE from the file server.

Change-Id: Ib74300568ac083e39506b0d106a5984e8fe5e464
Reviewed-on: http://gerrit.openafs.org/5120
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-31 10:21:38 -07:00
Jeffrey Altman
7e3615208d Windows: cm_BkgDaemon should not do cm_SyncOp's job
cm_SyncOp is designed to synchronize operations among multiple
threads.  The background daemon threads should not filter requests
based upon cm_SyncOp states.  Doing so is racy and does not produce
better performance.

Change-Id: Ifeafd55da6e02807ed4cc3c3f2b6f1de4df2a87f
Reviewed-on: http://gerrit.openafs.org/5119
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-31 10:21:23 -07:00
Jeffrey Altman
fa11f71f04 Windows: Do not release locks on deleted files
If the cm_scache_t flags include CM_SCACHEFLAG_DELETED, do not
bother releasing an outstanding file lock to the file server.
The lock went away when the file was deleted.  Any attempt to
release will fail with VNOVNODE which is translated locally into
CM_ERROR_BADFD.

If a RXAFS_ReleaseLock RPC fails with VNOVNODE, treat it as
success.

Change-Id: I15860920a224bd032256e08c9983fa31f7f1c9ee
Reviewed-on: http://gerrit.openafs.org/5118
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-31 10:21:06 -07:00
Jeffrey Altman
357e9f928f man: more changes for man.3 pod files
generate-html requires a HEADER description for pod3

The Windows makefile needs to process pod.in files.

Change-Id: I5ac964cc8c1af73510d17b3a31bf1a9a5df3a58f
Reviewed-on: http://gerrit.openafs.org/5116
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-31 10:20:44 -07:00
Jeffrey Altman
4138a778fe Windows: permit perl command to be explicitly set
Add PERL variable to the build system.  If not specified
externally the variable will be set to 'perl'.  However,
ActiveState Perl should be used and not Cygwin Perl.  The build
environment should indicate that by specifying a PERL setting.

SET PERL=c:\perl64\bin\perl.exe

or similar.

Change-Id: Iaf14a82134cc2dcf3c23b1e5a0ed65606e2487bb
Reviewed-on: http://gerrit.openafs.org/5115
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-31 10:20:19 -07:00
Jeffrey Altman
4a24a59d52 man: add missing pod files to Windows makefile
Several of the demand attach pod files were not being processed
on Windows.

Change-Id: If211f80564115bdc184181226aa0750ba1989a55
Reviewed-on: http://gerrit.openafs.org/5114
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-31 10:19:45 -07:00
Jeffrey Altman
0b6247c27f merge-pod changes for cygwin and MSWin32 perl
On Windows, the git repository is checked out as CR-LF.
Tell perl to open the pod file with cr-lf as the end of line.

On Windows, the input file names are of the form podX\foo.pod.in.
Cygwin perl cannot parse the directory for the file name unless
the path separator is converted from \ to /.

Change-Id: I7139bd2138573e938ea3e8386685f3b69e131c4d
Reviewed-on: http://gerrit.openafs.org/5113
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-31 10:19:26 -07:00
Jeffrey Altman
b61bd99bce Windows: add debugging to afskfw
More debugging output added when a debugger is present.

Change-Id: I22698ebaf3c950a5b9c9b7d6746af45603b5acf9
Reviewed-on: http://gerrit.openafs.org/5112
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-31 10:18:56 -07:00
Jeffrey Altman
7c59ec8f81 Windows: afskfw remove TRUE conditional
Simply the code by removing an if(1) conditional.

Change-Id: I2cb3f861b99686a7d14aa7f567adc5a083a08a5b
Reviewed-on: http://gerrit.openafs.org/5111
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-31 10:18:24 -07:00
Jeffrey Altman
214e9a6052 Windows: KFW_AFS_get_cred userrealm
The userrealm string in KFW_AFS_get_cred() should not include
the '@' symbol from the user principal.  Including the '@' produces
an invalid realm name.

Change-Id: I5887ffabce93666bdbe231eaac0821573162a6ba
Reviewed-on: http://gerrit.openafs.org/5110
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-31 10:17:55 -07:00
Jeffrey Altman
a063ecdc78 Windows: afslogon start service if not started
If the service is configured for auto start but has yet
to start, kick it off just in case.

Change-Id: I668961b17472a78ebac6744bf131dcb850d4e4a2
Reviewed-on: http://gerrit.openafs.org/5109
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-31 10:17:31 -07:00
Jeffrey Altman
549737f1e7 Windows: improve afskfw error message output
Add KTC and PT error messages to those that can be
translated within afskfw.lib.  This improves the error
logging for afslogon.dll, afscreds.exe, and afssrvadm.exe

Change-Id: I62aa5f1249d4d1f2d64ed068be47a5832d97f85c
Reviewed-on: http://gerrit.openafs.org/5108
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-29 19:15:07 -07:00
Michael Meffie
be152a00a7 volinfo: clean up headers
Remove unneeded includes.

Change-Id: I68514d47b1ddd4ea1d79c919635f87f6670e767f
Reviewed-on: http://gerrit.openafs.org/5098
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-29 14:17:55 -07:00
Andrew Deason
530b5ecac5 libafs: Rate-limit hard-mount waiting messages
Limit how often we log "hard-mount waiting for XXX" messages. Without
this, it is possible for a client with hard-mounts enabled to spam the
kernel log rather excessively (in extreme cases this can even panic
the machine on at least some Linux).

To keep things simple, just log approximately one message per volume
per hard-mount interval.

Change-Id: Ie82f68c5eae76519fcf1491164133c1955ed9c08
Reviewed-on: http://gerrit.openafs.org/5060
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-29 14:17:31 -07:00
Simon Wilkinson
0251eb6b37 util: Don't use FT_GetTimeOfDay for MRAFS logs
FT_GetTimeOfDay creates an LWP dependency. For the purpose that we're
using it in serverLog.c, gettimeofday performs identically. So, just
use gettimeofday and reduce our dependencies.

Change-Id: I36887d725c7e93386c80c61b3b33a7cda2bfe738
Reviewed-on: http://gerrit.openafs.org/5085
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-29 14:17:13 -07:00
Garrett Wollman
192ba0deae pthreaded servers: set thread names
In the startup function for each thread, set a thread name.  This
can safely be done unconditionally as LWP builds turn the call into
a no-op.  In general, the thread name parallels the name passed to
LWP_CreateProcess, but for Rx server threads, it additionally includes
the thread ID so that these threads can easily be distinguished.  (I'm
not sure yet whether doing so will prove to be useful or counterproductive.)

Change-Id: I30e012eebef4c7856084fa8b8eb1d88d9fcdf2c4
Reviewed-on: http://gerrit.openafs.org/5041
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-29 14:16:25 -07:00
Andrew Deason
e453f49bd4 libafs: Add afs_conn refCount imbalance safeguard
If someone is putting back too many refs, we can detect so very
easily. If we see that such a thing is happening, give a warning and
bail out, instead of risking a panic or memory corruption.

Change-Id: I36c968f9cd7cab3f569d3f6860f41678f026fba8
Reviewed-on: http://gerrit.openafs.org/5094
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-29 14:15:59 -07:00
Garrett Wollman
04e4126264 FBSD: complete the build fix for 8.1 libafs
Strangely enough, nosys() also needs a cast to sy_call_t *.

Change-Id: I7fee2278c228da3ddb2c3ccc9758681cd0abc01d
Reviewed-on: http://gerrit.openafs.org/5105
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-29 14:15:31 -07:00
Garrett Wollman
3d6f6e0043 configure: provide some necessary prerequisites in header checks
<netinet/in.h> is a prerequisite for <resolv.h> and <netinet/if_ether.h>.
<sys/socket.h> is a prerequisite for <net/if.h>.

Change-Id: I2c974ad863c6ff7eedb3702159399118af8de074
Reviewed-on: http://gerrit.openafs.org/5107
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-29 14:15:08 -07:00
Garrett Wollman
74e8bec7be configure: spell the "=" operator to test(1) correctly
Equality in the test(1) utility is represented by "=", not "==".
Some, but not all, versions of test accept the latter as an extension.

Change-Id: I25380f77e1c621965e0610318c9793874154cf15
Reviewed-on: http://gerrit.openafs.org/5106
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-29 14:14:48 -07:00
Garrett Wollman
9e29a20df7 libuafs: don't use a GNU-only feature in a common makefile
$(shell ...) is a GNU Make proprietary feature and shouldn't be used
OS-independent makefiles.  There is no need to use it here; command
substitution in the shell is good enough.

Change-Id: I511108dab0770e772005b3f4a851713d1ee5a83e
Reviewed-on: http://gerrit.openafs.org/5093
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-07-29 14:13:34 -07:00
Derrick Brashear
f8ff2591f7 macos: don't attempt finalize fixup on root vnode
because of how the root fid is created we can end up being dumb.
turns out we never want to bypass doing the full pass for root anyway
so just force fixup to not happen.

Change-Id: I2b6d8d5cc4824f0f2a9473a2e810410579e3ad48
Reviewed-on: http://gerrit.openafs.org/5095
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-25 21:58:57 -07:00
Andrew Deason
ef28bc08c1 libafs: Avoid duplicate afs_Analyze in bulk stat
In afs_DoBulkStat, we can call afs_Analyze multiple times for the same
set of connection objects. Since afs_Analyze puts its reference to the
given afs_conn and rx_connection structures, calling it more than once
can cause the reference counts on those objects to be lower than they
should be.

Instead of making another afs_Analyze call, just alter the error code
inside the normal do/while afs_Analyze loop, so the 'loop' afs_Analyze
call gets the appropriate error code from the first bulk stat'd entry.

Change-Id: Id6396f8e9d4757d54825d4915458bf8b5153984f
Reviewed-on: http://gerrit.openafs.org/5086
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-25 13:38:16 -07:00
Simon Wilkinson
461603e474 vlserver: Use libcmd for command line parsing
Modify the vlserver so that it uses the libcmd library to parse its
command line, rather than rolling its own command line parsing.

Change-Id: I7705219894de2d2268729ddc66a8af9ad9758ce7
Reviewed-on: http://gerrit.openafs.org/5074
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-25 10:45:07 -07:00
Simon Wilkinson
0b9986c875 ptserver: Use libcmd for command line parsing
Modify the ptserver so that it uses the libcmd library to parse its
command line, rather than rolling its own command line parsing.

Change-Id: I84bac2cd70bbaf85004fce2f23d9237215544edd
Reviewed-on: http://gerrit.openafs.org/5073
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-25 10:44:53 -07:00