openafs.git
13 years agomacos launchd be more patient
Derrick Brashear [Fri, 23 Apr 2010 15:02:32 +0000]
macos launchd be more patient

right now we would wait 20 seconds for shutdown (the default),
get impatient and be useless.

be less useless.

Change-Id: I8c6bc9b7546352cfa73d461b7cdddd2b5b5d7889
Reviewed-on: http://gerrit.openafs.org/1813
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoUnix: Modify disk cache versioning
Simon Wilkinson [Thu, 22 Apr 2010 21:24:11 +0000]
Unix: Modify disk cache versioning

This change increments the disk cache version number, and adds a
structure size record to the disk cache header. All old disk caches
will be replaced when the client is started.

With the various changes made to unify our file handles, and to
support large file handles on Linux, the size of the 'fcache'
structure was modified earlier in the 1.5 series. However, fcache
is also the building block of the CacheItems file, so these changes
inadvertently broke users upgrading from 1.4. In addition, as the
disk cache inode is now a union of many different structures, the
structure size is now potentially volatile across both kernel, and
OpenAFS revisions.

Up the version number so old disk caches are invalidated and won't
crash users who are upgrading. Also take the opportunity to add an
item to the header which stores the size of struct fcache used
by the disk cache. If the size on disk doesn't match that expected
by the kernel module, truncate the cache and start again.

Change-Id: I2ee8863d0bfaaaba34272c9e139638e17669a53e
Reviewed-on: http://gerrit.openafs.org/1811
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoWarning fix: cast to expected type
Marc Dionne [Thu, 22 Apr 2010 23:39:21 +0000]
Warning fix: cast to expected type

Cast argument to match the expected type from the format string.

Change-Id: Iddec912ff8a27f46d872fc3101677913adfb537a
Reviewed-on: http://gerrit.openafs.org/1812
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoUpdate nextVnodeUnique before checking inUse
Andrew Deason [Thu, 22 Apr 2010 16:54:06 +0000]
Update nextVnodeUnique before checking inUse

When attaching a volume, update the nextVnodeUnique field for the
volume, before we do any checks on the volume; for example, checking
inUse, which may result in a demand-salvage if we are running DAFS.

If we do not do this, we can schedule a demand-salvage without setting
nextVnodeUnique, and VUpdateVolume_r will update the volume header
uniquifier to nextVnodeUnique+200, when nextVnodeUnique is not set.
So, we will always set the uniquifier to 200. Fortunately, the salvage
should usually fix the uniquifer anyway.

So, set nextVnodeUnique before doing any of those checks, to avoid
screwing up the uniquifier when taking the volume offline.

Change-Id: Ib211bbf5e93efbebcb679259944e7abf211aa6e1
Reviewed-on: http://gerrit.openafs.org/1809
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoPrefer EndCall errors in StoreMini
Andrew Deason [Thu, 22 Apr 2010 18:21:52 +0000]
Prefer EndCall errors in StoreMini

Partially revert b1eb6a7a3f80500f0187cc6a1dd2013e1a5e154a, so we do
not mask the rx_EndCall error with a EndRXAFS_StoreData error (for
example, if EndRXAFS_StoreData returns RXGEN_CC_UNMARSHAL, and
rx_EndCall returns VBUSY). We need to agree on how to do this
throughout the tree, but for now, just fix StoreMini.

Change-Id: I4913946089fd0857506d9186f85c5c8115a5b95d
Reviewed-on: http://gerrit.openafs.org/1808
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoLinux: Tidy up packaging
Simon Wilkinson [Thu, 22 Apr 2010 17:02:08 +0000]
Linux: Tidy up packaging

Remove the fuzz setting - we're no longer patching the build, so
we don't need it.

Change-Id: Ic56b4d9efed40aedb425d9852018907736ef957f
Reviewed-on: http://gerrit.openafs.org/1807
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoLinux: RedHat packaging updates for RHEL6
Simon Wilkinson [Thu, 22 Apr 2010 16:56:25 +0000]
Linux: RedHat packaging updates for RHEL6

Update our bundled spec file and related tools so they can be used
to build OpenAFS on the RHEL6 beta.

- Make kmodtool recognise el6 as having "modern" kernel naming
  conventions
- Replace %{PACKAGE_VERSION} (which seems to have disappeared)
  with the standard %{version} macro

Thanks to billings and phalenor on IRC for their testing efforts.

Change-Id: I6538af56f365952b98c2dcbafb1c043435449e63
Reviewed-on: http://gerrit.openafs.org/1806
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoResolve symlinks for 'fs rmmount'
Andrew Deason [Thu, 22 Apr 2010 14:59:30 +0000]
Resolve symlinks for 'fs rmmount'

'fs rmmount' is the only 'fs' command that does not resolve symlinks
for its pioctls for some reason. Make it resolve symlinks.

Thanks to Arne Wiebalck.

Change-Id: Ifb6bdf0b381abd2e157d93d7eea4d853e1b3a689
Reviewed-on: http://gerrit.openafs.org/1805
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agobyte-range lock warning should include pid
Derrick Brashear [Wed, 17 Feb 2010 05:48:03 +0000]
byte-range lock warning should include pid

is is the same pid cmdebug would print. just include it in the logged
byte-range lock warning.

FIXES 126438

Change-Id: Idd83a4c4a56edf43ab257b3a7f08e1bbb774f04a
Reviewed-on: http://gerrit.openafs.org/1333
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdding osi_procname macro to different platforms
sanket [Sat, 17 Apr 2010 14:14:25 +0000]
Adding osi_procname macro to different platforms

osi_procname(procname, size) is added to different platforms to obtain
the processname in the string procname( preallocated ) with size size

Change-Id: Iab8fed3e99839cee7c07a2de6144af9b09af3a57
Change-Id: Ib4e45564ae942e74c331444969a462427f5e7cf3
Reviewed-on: http://gerrit.openafs.org/1771
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agomacos bulkstat again
Derrick Brashear [Wed, 21 Apr 2010 22:45:33 +0000]
macos bulkstat again

revamp this to avoid various issues with vnode references,
and to avoid potentially finding CVInit vcaches but not reclaiming

Change-Id: I6cb8d73b66c449a104799082259c97ede7e32e9b
Reviewed-on: http://gerrit.openafs.org/1802
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix UCONTEXT detection on ppc_linux26 via include order
Russ Allbery [Tue, 20 Apr 2010 05:01:27 +0000]
Fix UCONTEXT detection on ppc_linux26 via include order

param.linux26.h defines USE_UCONTEXT for all Linux platforms for
glibc 2.4 and higher, but it does this by testing __GLIBC__ and
__GLIBC_MINOR__.  These are defined by features.h, which is included
by any system header.  At least one system header must be included
before those are defined.  lwp/process.c was including <afsconfig.h>
and <afs/param.h> before any other headers, leading to those macros
being undefined.  Most of the Linux architectures either have their
own implementation or were explicitly defining USE_UCONTEXT in the
per-architecture param file, but ppc_linux26 was relying on the
default.

Fix this by reordering the includes to include the various system
headers before <afs/param.h> and add a comment explaining why.

This previously worked in earlier versions because the old
param.ppc_linux26.h file included <afs/afs_sysnames.h>, which
included "stds.h", which included a system header prior to the check
for ucontext.  The new generic param file reverses that order.

Change-Id: I214e54f684afdef07e6e2dec5b6e6e4d255ab4ec
Reviewed-on: http://gerrit.openafs.org/1791
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoRecover from afs_GetVolSlot errors
Andrew Deason [Wed, 21 Apr 2010 17:41:21 +0000]
Recover from afs_GetVolSlot errors

afs_GetVolSlot can panic in a few different ways, such as failing to
read from or write to VolumeInfo. Instead of panic'ing, return an
error to the application. Adjust callers to deal with getting a NULL
volume returned.

Based on a patch by Mike Meffie.

Change-Id: Ibb301fed795ee9ee5906b8e7973945a06218b8f1
Reviewed-on: http://gerrit.openafs.org/1801
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdd RFC 5864 to the protocol documentation directory
Russ Allbery [Wed, 21 Apr 2010 03:46:32 +0000]
Add RFC 5864 to the protocol documentation directory

Add a copy of RFC 5864 (DNS SRV Resource Records for AFS) to the
protocol documentation directory for reference.  As permitted by
the IETF Trust License Policy section 3(e), I release this document
under the MIT/X Consortium license included in this copy of the
document.

LICENSE MIT

Change-Id: I8e22aac07b4cedbe18b8375213a7866cf98a1386
Reviewed-on: http://gerrit.openafs.org/1799
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoInstall afsd.fuse and man page if built
Russ Allbery [Tue, 20 Apr 2010 04:18:57 +0000]
Install afsd.fuse and man page if built

If --enable-fuse-client is passed to configure and afsd.fuse is built,
install it into the same directory as afsd and install afsd.fuse.8 as a
symlink to the afsd.8 man page.  Add documentation of afsd.fuse to the
afsd man page.

Change-Id: I7d0cd3992a8466e626af2191c713e5623cc40d84
Reviewed-on: http://gerrit.openafs.org/1792
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdd src/afsd/afsd.fuse and src/libuafs/afsd to .gitignore
Anders Kaseorg [Wed, 21 Apr 2010 08:09:03 +0000]
Add src/afsd/afsd.fuse and src/libuafs/afsd to .gitignore

Change-Id: I4b7e5261d92944ed871a1113b0f4a651357f9fcf
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/1800
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdd documentation for fs callback xstats
Andrew Deason [Sun, 18 Apr 2010 23:49:18 +0000]
Add documentation for fs callback xstats

Change I572ff682de4cc7ef27bb46dd028d3d797b873841 added the fileserver
callback xstats collection to afsmonitor. Provide some documentation
for these fields, along with the other fields displayed by afsmonitor.

Change-Id: I21618047519fbb28f6707ff9ba95a17fe27e0f3c
Reviewed-on: http://gerrit.openafs.org/1783
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agokauth admin tools ubik prototyping
Derrick Brashear [Tue, 20 Apr 2010 23:59:53 +0000]
kauth admin tools ubik prototyping

kill off ubik_Call (but not CallIter, yet)

Change-Id: I7af515b4e1c55c493c304a8ffd5c74cb96cd3b97
Reviewed-on: http://gerrit.openafs.org/1793
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoUpdated dkms.conf to remove MPS=$SMP from make
Jonathan Billings [Tue, 20 Apr 2010 19:53:21 +0000]
Updated dkms.conf to remove MPS=$SMP from make

* Removed the logic to set $SMP based on CONFIG_SMP from
  /boot/config-$kernelver
* When using --with-linux-kernel-packaging in the configure line, dkms
  no longer needs MPS=$SMP in the make line.

Change-Id: Ib65782050cae9f439ad5fed5c7bbbc403e556b4f
Reviewed-on: http://gerrit.openafs.org/1798
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdded explanatory comments for restorevol move
Jonathan Billings [Tue, 20 Apr 2010 16:13:11 +0000]
Added explanatory comments for restorevol move

Since restorevol is placed in %{_prefix}/afs/bin by make dest, we
need to fix it so it ends up in %{_bindir} to be used in the base
package.

Change-Id: I31f2602868230416525a84a9d716230f08cb34ab
Reviewed-on: http://gerrit.openafs.org/1796
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoFixed more locations to reflect recent changes
Jonathan Billings [Tue, 20 Apr 2010 16:00:21 +0000]
Fixed more locations to reflect recent changes

Moved restorevol man page to base package
Moved state_analyzer man page to server package

Change-Id: I714dd6eca86def48fefc0206c93038ae71415cc9
Reviewed-on: http://gerrit.openafs.org/1795
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoFixed RedHat SPEC file to reflect updates in code
Jonathan Billings [Tue, 20 Apr 2010 15:50:59 +0000]
Fixed RedHat SPEC file to reflect updates in code

Moved the restorevol binary from /usr/afs/bin to /usr/bin
Added the new state_analyzer.8.gz man page

Change-Id: Ibf4133034b1945d58843162cb45bdd485e8c34a1
Reviewed-on: http://gerrit.openafs.org/1794
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoRemove special-case call sequence for KAM_SetPassword on s390
Russ Allbery [Tue, 20 Apr 2010 04:36:09 +0000]
Remove special-case call sequence for KAM_SetPassword on s390

For Linux s390 (but not s390x), an additional argument was passed
to KAM_SetPassword between the kvno and the encryption key.  This
doesn't seem to match the rest of the code and is now, with stricter
prototyping, preventing the code from compiling.  Remove it and use
the same call sequence on s390 as everywhere else.

Change-Id: I750f64212e80d4bed4500e316ad7d354608866d7
Reviewed-on: http://gerrit.openafs.org/1790
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoUse AC_PREREQ
Andrew Deason [Mon, 19 Apr 2010 19:48:14 +0000]
Use AC_PREREQ

We use AC_USE_SYSTEM_EXTENSIONS, which was introduced in autoconf
2.60. To allow for less confusion and perhaps a more clear error
message, specify that we require using at least that version.

Change-Id: I42a3f4e889ad443d8d8cd3ba0c085c67606b8be3
Reviewed-on: http://gerrit.openafs.org/1784
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

14 years agoFixes and clarifications to vos setaddrs man page
Russ Allbery [Mon, 19 Apr 2010 21:00:31 +0000]
Fixes and clarifications to vos setaddrs man page

Add a caution explaining how the file server addresses are registered
and pointing users at NetInfo and NetRestrict plus restarting the file
server for the normal case.

Mention what version of OpenAFS introduced this command.  Drop the note
about the version of OpenAFS that added the -encrypt flag, since the
whole command is newer than that.

Reference vos listaddrs -printuuid specifically to get the UUID.

General formatting and wording cleanup: use terminology more consistently,
continue a long example line, wrap long lines, fix a spelling error, and
add cross-references to NetInfo and NetRestrict.

Change-Id: Idd6175339dc0feb1b777963bbb09731e42b83522
Reviewed-on: http://gerrit.openafs.org/1787
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoUpdate Debian packaging for 1.5.74
Russ Allbery [Mon, 19 Apr 2010 21:55:16 +0000]
Update Debian packaging for 1.5.74

Include the Debian changelog entry for 1.5.74-1 and install the new
vos setaddrs man page.

Change-Id: I4cc9e0590cb47d0ae885d7116f5bafd469f43cae
Reviewed-on: http://gerrit.openafs.org/1788
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agomacos disable bulkstat openafs-devel-1_5_74
Derrick Brashear [Mon, 19 Apr 2010 18:02:14 +0000]
macos disable bulkstat

there's still a bug

Change-Id: I23e02f9a05e001f0082b757c4a1dd78186fe6977
Reviewed-on: http://gerrit.openafs.org/1782
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agomacos bulkstat don't double reget refs
Derrick Brashear [Sun, 18 Apr 2010 17:45:51 +0000]
macos bulkstat don't double reget refs

if another code path already got back the refs from finalizevnode,
don't do it again

Change-Id: I7e06ceeb2c7e71b1be94fd0fccb6e28c37457b24
Reviewed-on: http://gerrit.openafs.org/1776
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agobulkstat restore bulkfetching state for reused vcaches
Derrick Brashear [Sun, 18 Apr 2010 17:35:09 +0000]
bulkstat restore bulkfetching state for reused vcaches

when i introduced NewBulkVCache I elided this case. Set it here.

Change-Id: Id88425b0ee662ecc23dd43cf7fa253ab61b02945
Reviewed-on: http://gerrit.openafs.org/1775
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: Preserve volume location info in case of comm fail
Jeffrey Altman [Sun, 18 Apr 2010 17:34:18 +0000]
Windows: Preserve volume location info in case of comm fail

The cache manager refreshes volume location information every
two hours. If during a refresh the communication with the
vldb server fails, the previously known volume location information
should continue to be used.

The previous behavior in which the volume location information
is discarded first and then the update is performed can result
in unnecessary client failures when a temporary disruption in
communication with the vldb server occurs.  Instead, wait until
we have a successful response from the vldb server before the
previous server list is discarded.

LICENSE MIT

Change-Id: I7c63c4f673a7a1360a74611c356329f31f9ceec3
Reviewed-on: http://gerrit.openafs.org/1769
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: correct locking in cm_FreeServerList
Jeffrey Altman [Sun, 18 Apr 2010 17:20:52 +0000]
Windows: correct locking in cm_FreeServerList

The cm_serverLock must be held when checking the state
of the list head.

LICENSE MIT

Change-Id: I1134a6617d4c1e38b95512b1fdc41c5f5857ea7a
Reviewed-on: http://gerrit.openafs.org/1774
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: prevent infinite idle error response
Jeffrey Altman [Sun, 18 Apr 2010 11:38:27 +0000]
Windows: prevent infinite idle error response

The idle error value (if any) is stored in the cm_req_t object.
Since the value is never cleared, the same value can be returned
for all requests that make use of the same cm_req_t object.

Change the behavior to only return an idle error once and then
clear it.

LICENSE MIT

Change-Id: Iac9ff8e56e856c2f0e440a34ac39ccd68de37c77
Reviewed-on: http://gerrit.openafs.org/1773
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Increase the memory map version
Jeffrey Altman [Sat, 17 Apr 2010 19:21:32 +0000]
Windows: Increase the memory map version

Since the cm_buf_t data structure changed, update
the memory map version number so that the cache will
not be reused.

LICENSE MIT

Change-Id: If01997ebd90c8f004d7cf4ba92f46fe4b9f570bf
Reviewed-on: http://gerrit.openafs.org/1772
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoopenafs 1.5.74
Derrick Brashear [Sat, 17 Apr 2010 14:14:50 +0000]
openafs 1.5.74

make 1.5.74 versions

Change-Id: I320cdbab2961dcf2a17bb71e8d4283aaf38941ce
Reviewed-on: http://gerrit.openafs.org/1768
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: 1.5.74 change log
Jeffrey Altman [Sat, 17 Apr 2010 15:13:21 +0000]
Windows: 1.5.74 change log

Important changes affecting the Windows distribution for 1.5.74

Change-Id: I980a66a2ab4a90c580249641fc22e3c7a91097dc
Reviewed-on: http://gerrit.openafs.org/1770
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoRx: make conn_call_lock and conn_data_lock usage consistent
Jeffrey Altman [Sat, 17 Apr 2010 02:42:34 +0000]
Rx: make conn_call_lock and conn_data_lock usage consistent

The rx_connection.flags field is protected by the conn_data_lock
but the conn_data_lock is not held everywhere the conn flags
field is altered.  This produces a race that can result in a
deadlock when waiter flags are inadvertently prevented from being
cleared.

The conn_call_lock usage in rx_EndCall which was removed in
Change e169708681eb1bbbb31951b95f68e861a4b01c7e must be restored.
If rx_EndCall never obtains the conn_call_lock it can't ensure
that the thread in rx_NewCall actively checking the calls will
not end up blocking when there is now a call channel that can
be reused.  This usage of conn_call_lock can be removed only
if a true producer/consumer model is implemented.

Change-Id: Id093fd6c4a42afb833c775411be0cd406abf4ef7
Reviewed-on: http://gerrit.openafs.org/1766
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: cm_UpdateCell must hold cell lock across server random
Jeffrey Altman [Sat, 17 Apr 2010 02:52:20 +0000]
Windows: cm_UpdateCell must hold cell lock across server random

cm_UpdateCell fails to hold the cell lock across the server
randomization.  As a result the vlserver list can be destroyed
while randomization is taking place.

LICENSE MIT

Change-Id: I7753e7e9f8a7d536ce0e2082aaca7b62ab745504
Reviewed-on: http://gerrit.openafs.org/1767
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: CM_SCACHESYNC_STOREDATA for non-files have no buffers
Jeffrey Altman [Fri, 16 Apr 2010 01:43:44 +0000]
Windows: CM_SCACHESYNC_STOREDATA for non-files have no buffers

Do not add QData objects with null cm_buf_t pointers to the
cm_scache_t bufWritep queue when synchronizing directory changes.
If a callback is required while the directory change is being
pushed it can result in a deadlock.

LICENSE MIT

Change-Id: Id66c52ed794ceec44011167659e41a0b61898625
Reviewed-on: http://gerrit.openafs.org/1761
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: define new event log messages for cm_Analyze VBUSY, VRESTARTING, etc.
Jeffrey Altman [Fri, 16 Apr 2010 04:31:58 +0000]
Windows: define new event log messages for cm_Analyze VBUSY, VRESTARTING, etc.

Add MSG_SERVER_REPORTS_VBUSY, MSG_SERVER_REPORTS_VRESTARTING,
MSG_ALL_SERVERS_BUSY, MSG_ALL_SERVERS_OFFLINE,
and MSG_ALL_SERVERS_DOWN.

Add event message throttling.  Only permit one copy of a message
to be generated every five seconds if the message will duplicate
the prior message.  This often occurs when a server or volume becomes
inaccessible and there were a large number of requests queued on it.

Integrate these new messages into cm_Analyze processing for VBUSY,
VRESTARTING, ALLDOWN, ALLOFFLINE, and ALLBUSY errors.

LICENSE MIT

Change-Id: Ib30595ded23724810e294133fa75873e20ffbf0b
Reviewed-on: http://gerrit.openafs.org/1762
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: wait for I/O on buffers to complete in cm_SetupStoreBIOD
Jeffrey Altman [Fri, 16 Apr 2010 04:09:25 +0000]
Windows: wait for I/O on buffers to complete in cm_SetupStoreBIOD

cm_SetupStoreBIOD constructs a list of dirty buffers for a file
that are to be written to the file server.  When constructing
the list, if when determining the first dirty buffer we come across
a buffer that is already actively involved in an I/O operation,
call buf_WaitIO() to wait until the buffer is no longer busy before
continuing.  This reduces lock contention and synchronization
conflicts.

LICENSE MIT

Change-Id: Icd79b9578b7411b138f14257bcb885249960eab0
Reviewed-on: http://gerrit.openafs.org/1760
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: split cm_buf_t.flags field to ensure proper locking
Jeffrey Altman [Fri, 16 Apr 2010 03:58:21 +0000]
Windows: split cm_buf_t.flags field to ensure proper locking

It turns out that for all these years the locks protecting
the cm_buf_t flags field have been racy.  Some of the flags
were protected by the cm_buf_t mutex and others by the
buf_globalLock.  This patchset splits the flags field so that
the appropriate lock will be used exclusively to protect a
common set of flags.

LICENSE MIT

Change-Id: I85c98c85244c987df30a811d405f7d897e407ba2
Reviewed-on: http://gerrit.openafs.org/1759
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoRemove unused variable in vos.c
Marc Dionne [Fri, 16 Apr 2010 23:34:35 +0000]
Remove unused variable in vos.c

Remove an unused variable introduced by a recent commit.

Change-Id: I04432d87a27b656807430f041f84d6ada2632434
Reviewed-on: http://gerrit.openafs.org/1765
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agowork around finder setting modes on symlinks
Derrick Brashear [Fri, 16 Apr 2010 15:49:43 +0000]
work around finder setting modes on symlinks

we could mask the mode setting on symlinks, however, it would be nice
to change the fileserver to allow mode setting on symlinks in some
(safe) cases. preserve our ability to do so.

Change-Id: Iba69965c607530bcf2210b508c7aa37403c47477
Reviewed-on: http://gerrit.openafs.org/1764
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdd vos setaddrs command and man page
Harald Barth [Fri, 16 Apr 2010 05:45:35 +0000]
Add vos setaddrs command and man page

The vos setaddrs command sets the IP addresses for a server entry
in the Volume Location Database (VLDB). Specify one or serveral hosts.
All existing hosts in the VLDB entry are replaced with the new entries
on the command line.

Change-Id: I3c26e49c4a6e2aebae363017d074329ac265132a
Reviewed-on: http://gerrit.openafs.org/1744
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoConvert param.rs_aix61.h EOF from CR-LF to LF
Jeffrey Altman [Fri, 16 Apr 2010 13:32:42 +0000]
Convert param.rs_aix61.h EOF from CR-LF to LF

The src/config/param.rs_aix61.h source file was stored
in the repo with CR-LF end of line.  This is causing
problems for Windows Git which converts CR-LF to LF
for storage in the repo.

Change-Id: I8937322ac368ac275d3dbc6bcccf2808d3db061f
Reviewed-on: http://gerrit.openafs.org/1763
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoTidy up UKERNEL includes
Simon Wilkinson [Thu, 15 Apr 2010 19:52:11 +0000]
Tidy up UKERNEL includes

UKERNEL is just another userspace build - there's no need to
maintain completely separate header file lists in each object file
for "userspace" and "ukernel". Tidy this up to improve the
readability of these sections of code.

Change-Id: I69f476a0b8aae1204cd4207c7c656ec7e07184df
Reviewed-on: http://gerrit.openafs.org/1758
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoRx: restore thread safety to rx_NewCall
Jeffrey Altman [Thu, 15 Apr 2010 03:21:37 +0000]
Rx: restore thread safety to rx_NewCall

Thread safety in rx_NewCall requires that only one thread be
actively allocating or recycling a call at a time.  Since we are
no longer holding the conn_call_lock across the entire transaction
we need to have another synchronization mechanism.  Add a new
rx_connection flag, RX_CONN_MAKECALL_ACTIVE, which when set indicates
that a thread is actively obtaining a call.  If any other threads
see this flag set, they will wait until being signalled that the
thread has completed its activity.

In addition, because the call->lock may be dropped when processing
rxi_ResetCall(), we must hold a reference to the call once we
begin using it.  Otherwise, the call may be garbage collected
behind our back.

Change-Id: Ie97757f812d7043203ffcaf399400789cda39da1
Reviewed-on: http://gerrit.openafs.org/1755
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agomacos and bsd readdir type guessing fix
Derrick Brashear [Wed, 14 Apr 2010 16:10:31 +0000]
macos and bsd readdir type guessing fix

right now we never return a link hint. we know here it's a link. say so.

Change-Id: Iab81b83fc8de714ad52c99c86153159aa6f641f3
Reviewed-on: http://gerrit.openafs.org/1753
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agodarwin bulk race needs an iocount
Derrick Brashear [Thu, 15 Apr 2010 04:13:43 +0000]
darwin bulk race needs an iocount

if another user raced with us, we need an iocount back since finalize
will have dropped one.

Change-Id: I93b2bb5b6004b39436684e78c4620f4d7d9d0c8e
Reviewed-on: http://gerrit.openafs.org/1756
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agosnowleopard fuse fallout
Derrick Brashear [Thu, 15 Apr 2010 05:29:31 +0000]
snowleopard fuse fallout

didn't notice in testing that 64 bit version of afsd got slaughtered.

put it back.

Change-Id: I3a6588df36a31ab014d79faf4ed5646339f6f84b
Reviewed-on: http://gerrit.openafs.org/1757
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoReplace unsafe use of gets()
Marc Dionne [Tue, 13 Apr 2010 23:35:39 +0000]
Replace unsafe use of gets()

Build tools compain that this is dangerous - replace gets() with a
bounded fgets().

Change-Id: I3bd1854a1dc4a11c801cabb987ab680fa978bd20
Reviewed-on: http://gerrit.openafs.org/1750
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agodrop afs_xserver lock during GetCapabilities
Derrick Brashear [Wed, 14 Apr 2010 22:33:47 +0000]
drop afs_xserver lock during GetCapabilities

new contact to a fileserver can trigger an InitCallBackStateN RPC
to us, which our agent will need afs_xserver to handle. don't hold it;
we only need it to fill in capabilities. racing here is ok.

Change-Id: Ie0aaea3ab462e421bd31ba3b703d8cd0cb0d61df
Reviewed-on: http://gerrit.openafs.org/1754
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoAutogenerate a Debian changelog for correct package versioning
Russ Allbery [Tue, 13 Apr 2010 23:32:49 +0000]
Autogenerate a Debian changelog for correct package versioning

The Debian packaging infrastructure takes the package version from the
most recent entry in the changelog file.  Change the changelog file to
a template and add an entry to the top that will be set to the current
version of OpenAFS, with a Debian revision that will sort before any
official package.

Change-Id: Ic7fb1d30be10210b7d032cdc49a963410997db82
Reviewed-on: http://gerrit.openafs.org/1749
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdd a FUSE implementation for afsd
Andrew Deason [Thu, 8 Apr 2010 19:50:18 +0000]
Add a FUSE implementation for afsd

This adds afsd.fuse, which allows for mounting AFS via FUSE (via
libuafs), instead of via the OpenAFS kernel module.

Change-Id: Iaafe4a5f3034fed943e2e73f79ac95580946f9a8
Reviewed-on: http://gerrit.openafs.org/1725
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoUse afsd code in libuafs
Andrew Deason [Tue, 6 Apr 2010 22:07:33 +0000]
Use afsd code in libuafs

Share the same CM code for the kernel client as in libuafs, so we
don't duplicate code for initializing the cache and other things. In
order to do this:

 - Remove some libuafs global variables that share name and
   functionality with those in afsd, and declare some static

 - Remove uafs_Init(), and move the ukernel-specific code in it to
   osi_Init(); replace with uafs_Setup(), uafs_ParseArgs(), and
   uafs_Run(), which just call into afsd functions

 - Remove libuafs' cache initialization code (CreateCacheFile,
   SweepAFSCache, etc); instead just use afsd's

 - Add uafs_mount(), to perform the 'mount'ing step that takes place
   in the normal kernel CM

 - Add afsd_uafs.c for the glue between afsd and libuafs

Note that this now requires libcmd for libuafs.

Change-Id: I62306a18ad255680031494caf1720b29e22856d2
Reviewed-on: http://gerrit.openafs.org/1724
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoRename uvldbentry spare1 to matchindex
Jeffrey Altman [Mon, 12 Apr 2010 18:45:14 +0000]
Rename uvldbentry spare1 to matchindex

In the nvldbentry structure 'spare1' was renamed to 'matchindex'.
Do the same for uvldbentry as that is what the field is used for.

Change-Id: I2d1200b1044f6ae9b4523eb603a21b0484b046c7
Reviewed-on: http://gerrit.openafs.org/1741
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix new UKERNEL warnings on 64-bit
Marc Dionne [Tue, 13 Apr 2010 22:58:11 +0000]
Fix new UKERNEL warnings on 64-bit

Commit 830cb48c enabled new warnings when building UKERNEL, which
causes builds with --enable-checking to fail.  These are 64-bit
specific warnings from int to pointer conversions and one printf
warning.

Changes:
- cast printf argument to (int) in afs_usrops.c
- use (iparmtype)(uintptrsz) to convert 32-bit integers to
pointers
- move the definition of uintptrsz to src/afs/afs.h so its
available to other source files, and remove the original definition
in afs_syscall.c

Change-Id: Id0a5fd762cf10a741f89e3a2ed0a85556137df49
Reviewed-on: http://gerrit.openafs.org/1748
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdd support for pkg-config m4 macros
Andrew Deason [Tue, 13 Apr 2010 18:53:13 +0000]
Add support for pkg-config m4 macros

Include pkg.m4, so we can use pkg-config macros in autoconf even if
pkg-config is not installed.

Change-Id: Ie81307beb84499297e251f0f90781d544044a235
Reviewed-on: http://gerrit.openafs.org/1747
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoSquash afs_GenericStoreProc warning
Andrew Deason [Tue, 13 Apr 2010 17:59:30 +0000]
Squash afs_GenericStoreProc warning

code is potentially unitialized. Initialize it.

Change-Id: I9c8a787d9f7f05ea88752063f1b31e0be61e28ba
Reviewed-on: http://gerrit.openafs.org/1746
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agolibuafs: Add $(XCFLAGS) to CFLAGS on all platforms
Andrew Deason [Tue, 13 Apr 2010 17:41:31 +0000]
libuafs: Add $(XCFLAGS) to CFLAGS on all platforms

Only darwin had $(XCFLAGS) in the libuafs build for some reason. Add
it to all platforms, so they get e.g. -Wall if so configured.

Change-Id: Ifab39af3abf087932feb1b9085ccb26baaec3164
Reviewed-on: http://gerrit.openafs.org/1745
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoDAFS: avoid volume lock contention during initialization
Michael Meffie [Tue, 12 Jan 2010 02:16:06 +0000]
DAFS: avoid volume lock contention during initialization

Avoid the excessive volume lock contention during startup to
improve the time to pre-attach a very large number of volumes.
The parallel attach worker threads avoid the volume lock
while scanning the partitions for volumes and send batches of
volume ids to the main thread to be preattached under the
volume lock.

FIXES 124489

Change-Id: Ieb33a3bdd5b06349abd9c3dd994c620021cd6194
Reviewed-on: http://gerrit.openafs.org/1092
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoFileserver capabilities support for the UNIX client
Felix Frank [Thu, 4 Mar 2010 03:41:15 +0000]
Fileserver capabilities support for the UNIX client

The attached patch has the client perform a GetCapabilities RPC
on fileservers it encounters.
It uses an additional server flag bit to keep track of the servers that
have been queried already.

In the case of afs_CeckServers(), GetTime RPCs are largely replaced by
GetCapabilities. GetTime is performed on a server if and only if
afs_setTime is nonzero and either
(a) no setTimeHost has yet been determined or
(b) the server in question has been designated as setTimeHost
The GetServers() function could thus be simplified even further wrt. the
setTime mechanism, but doing so would imply more rewriting (violating
the KISS principle; a followup patch should deal with that).

When a client is asked to reset callback states, it also resets the
"capabilites known" bit.

Thanks go to Simon Wilkinson, Jeffrey Altman and Jeffrey Hutzelman for
input regarding logic and implementation details.

FIXES 124972

Change-Id: I4e22db3c5ca71f00e8c77f337e38daa0fa5b9124
Reviewed-on: http://gerrit.openafs.org/1640
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoRx: avoid out of order lock acquisition in rx_NewCall
Jeffrey Altman [Mon, 12 Apr 2010 12:58:20 +0000]
Rx: avoid out of order lock acquisition in rx_NewCall

Sha-1 33010ef25e716f2ec2df17cc113f4ef8f67e3a74 broke the lock order
conventions between the conn->conn_call_lock and the call-lock.
This patchset corrects the ordering and handles the synchronization
issues that might occur when the call->lock is dropped within
rx_NewCall.

Change-Id: Ic05837e2491a1e738e7585cf2ee6cda20775229b
Reviewed-on: http://gerrit.openafs.org/1740
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoDo not turn off AFS_HAVE_STATVFS for UKERNEL
Andrew Deason [Mon, 12 Apr 2010 17:39:00 +0000]
Do not turn off AFS_HAVE_STATVFS for UKERNEL

Many param files turn off AFS_HAVE_STATVFS for UKERNEL. We obviously
still have statvfs() available whether we are running with UKERNEL or
not, so modify param files to enable it for UKERNEL if it was enabled
for non-UKERNEL.

The only places using this define are afsd and vol/partition.c, the
latter of which will not be affected.

Change-Id: I1f276c88cbe0ca401580a564be664a7fc6739fde
Reviewed-on: http://gerrit.openafs.org/1743
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoSplit afsd into afsd.c and afsd_kernel.c
Andrew Deason [Thu, 8 Apr 2010 21:37:51 +0000]
Split afsd into afsd.c and afsd_kernel.c

Move the parts of afsd.c that depend on using the kernel module into
afsd_kernel.c. Keep in afsd.c code that can be used with libuafs
drivers.

Change-Id: I22c4dd698e8c12c42dabd85ea38226ffd8746d11
Reviewed-on: http://gerrit.openafs.org/1723
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix problems from afs_osi_gcpags reorganization
Matt Smith [Sat, 10 Apr 2010 06:36:59 +0000]
Fix problems from afs_osi_gcpags reorganization

Corrections to mistakes made during the reorganization
of afs_osi_gcpags.c to per-OS directories. Includes fixes to
LINUX24 and whitespace corrections.

Change-Id: Ie9d1637b00dacc0f58e90df0e4fb2505a571bc1b
Reviewed-on: http://gerrit.openafs.org/1737
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoafsmonitor: fix segv on exit
Michael Meffie [Sat, 10 Apr 2010 02:31:24 +0000]
afsmonitor: fix segv on exit

Fix crash during afsmonitor shutdown when monitoring
multiple fileserver or clients.

Change-Id: I5fa5cb7d89dbdfcc5f97541a0e0c6b0836d558b1
Reviewed-on: http://gerrit.openafs.org/1735
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoafsmonitor: show busy counts
Michael Meffie [Sat, 10 Apr 2010 01:03:09 +0000]
afsmonitor: show busy counts

Update afsmonitor to display rx_nBusies, fs_nBusies,
sysname_ID, and fs_GetCapabilities, which where claimed from
spare fields long ago. Add a new group name called
Busies_group to show just the busy fields.

Change-Id: Id096c8bd8ba148def425a75e06250f7d5319672b
Reviewed-on: http://gerrit.openafs.org/1734
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix UKERNEL build error - include afs/afs_osi.h
Marc Dionne [Sat, 10 Apr 2010 00:19:19 +0000]
Fix UKERNEL build error - include afs/afs_osi.h

Commit d0f2ffca breaks the build on my system because
afs/afs_osi.h no longer gets included for the UKERNEL + !KERNEL
case.  This causes many errors as a result of missing definitions
such as afs_kmutex_t.
Pull out this include into a separate ifdef based only on "KERNEL".

Change-Id: Idafa7702550eb8cb2c7693f4173e482b15702d7e
Reviewed-on: http://gerrit.openafs.org/1733
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoMove contents of afs_osi_gcpags to per-OS files
Matt Smith [Fri, 9 Apr 2010 18:32:46 +0000]
Move contents of afs_osi_gcpags to per-OS files

Moved the relevant chunks from src/afs/afs_osi_gcpags.c
to osi_gcpags.c located in each of the OS subdirectories.
Also updated libafs and libuafs to reflect these changes.

Change-Id: I537d92952718ef3b3bb0583daf7993288716652c
Reviewed-on: http://gerrit.openafs.org/1727
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoCorrect incorrect type-punning fixes
Andrew Deason [Thu, 1 Apr 2010 18:55:51 +0000]
Correct incorrect type-punning fixes

Commit 549002c906795f978eebf81c706995116a04a8ff attempted to resolve a
few type-punning-related warnings, but did so using unions. Unions are
not guaranteed to work correctly with type-punning on non-gcc, so
partially revert and reimplement.

Change-Id: I6a49184284809c929bc45b5de5b32b8323467505
Reviewed-on: http://gerrit.openafs.org/1679
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoafsmonitor: add fs callback xstats collection
Michael Meffie [Thu, 8 Apr 2010 17:27:36 +0000]
afsmonitor: add fs callback xstats collection

Adds the capability to afsmonitor to display and process
thresholds for fileserver callback xstats collections. The
callback counters are placed to the right of the full perf
data.  When afsmonitor is started without a configuration
file, the callback xstats data is retrieved and displayed,
since by default afsmonitor will show every field.  When a
configuration file is given, poll the fileserver only for the
collections needed to display information requested by the
'show fs' commands.

Change-Id: I572ff682de4cc7ef27bb46dd028d3d797b873841
Reviewed-on: http://gerrit.openafs.org/1731
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoafsmonitor: avoid showing full perf stats garbage
Michael Meffie [Fri, 9 Apr 2010 15:46:10 +0000]
afsmonitor: avoid showing full perf stats garbage

Unfortunately, the full perf stats contain timeval structures which
do not have the same size everywhere. Avoid displaying gargbage,
but at least try to show the overall stats.

Change-Id: I9245b333ac15212194490e1a3f11b7c98dfaadda
Reviewed-on: http://gerrit.openafs.org/1730
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoukernel osi prototypes header
Derrick Brashear [Fri, 9 Apr 2010 19:21:08 +0000]
ukernel osi prototypes header

and add statvfs to it so we stop getting a warning

Change-Id: I585f559f083203214d298062862434f9f381808b
Reviewed-on: http://gerrit.openafs.org/1729
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoUKERNEL: allow creation of non-detached threads
Andrew Deason [Thu, 8 Apr 2010 20:35:12 +0000]
UKERNEL: allow creation of non-detached threads

Make usr_thread_create create a non-detached thread by default, and
just have callers call usr_thread_detach if they want it detached. The
only current caller of usr_thread_create already calls
usr_thread_detach.

Also add usr_thread_join to make it possible to join a created thread.

Change-Id: Iad581c45d36dc43e94c950a5ca6a41dea8dc4b2f
Reviewed-on: http://gerrit.openafs.org/1722
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoUse AFS_CACHE_VNODE_PATH for UKERNEL
Andrew Deason [Tue, 6 Apr 2010 21:57:27 +0000]
Use AFS_CACHE_VNODE_PATH for UKERNEL

Use the AFS_CACHE_VNODE_PATH cache mechanism for UKERNEL, to be
compatible with new kernel caching code, and simplify the cache code a
little bit.

Change-Id: Ifc44790db08a336cca0032a1d05eedf70d2b24b8
Reviewed-on: http://gerrit.openafs.org/1721
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoMake osi_GetTime work on 64-bit libuafs
Andrew Deason [Fri, 14 Aug 2009 21:17:11 +0000]
Make osi_GetTime work on 64-bit libuafs

libuafs was previously using an implementation of osi_GetTime (and
thus clock_GetTime) that required 32-bit time_t's to work properly.
Instead, just use the non-kernel osi_GetTime for UKERNEL, since we're
just in userspace either way.

Change-Id: I4f2d060f7e2aaeaaa3fe164aca6bee5333de4583
Reviewed-on: http://gerrit.openafs.org/1714
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoafsd: squash inode format warning
Andrew Deason [Thu, 8 Apr 2010 22:22:35 +0000]
afsd: squash inode format warning

Coerce the inode into an int, so we can predictably print it when we
print debug info.

Change-Id: I81533b66b632eb0fed3a9e37480feaf2fa92d510
Reviewed-on: http://gerrit.openafs.org/1720
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoUKERNEL: prototype uafs_Shutdown
Andrew Deason [Thu, 8 Apr 2010 22:26:09 +0000]
UKERNEL: prototype uafs_Shutdown

Prototype uafs_Shutdown in afs_usrops.h, so users of libuafs can stop
the CM.

Change-Id: I63e0106f7bfb5fff9a3ff1936005f6e24855efec
Reviewed-on: http://gerrit.openafs.org/1719
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoUKERNEL: Use real vnode type constants
Andrew Deason [Thu, 8 Apr 2010 17:15:34 +0000]
UKERNEL: Use real vnode type constants

In UKERNEL, make VDIR be S_IFDIR, VREG be S_IFREG, etc. This makes
fakestat work correctly, since the va_mode of faked mountpoints are
OR'd with VDIR.

Change-Id: I7ac1dc7ae1d7cefade9bf92d8169db80977a5c76
Reviewed-on: http://gerrit.openafs.org/1718
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoUKERNEL: check for null afs_CurrentDir on shutdown
Andrew Deason [Tue, 6 Apr 2010 22:00:58 +0000]
UKERNEL: check for null afs_CurrentDir on shutdown

During shutdown, do not release afs_CurrentDir if we don't have one.

Change-Id: I809a23f36929a02cb63753d66627357615cbaf9e
Reviewed-on: http://gerrit.openafs.org/1717
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoUKERNEL: add uafs_statvfs
Andrew Deason [Thu, 8 Apr 2010 19:49:53 +0000]
UKERNEL: add uafs_statvfs

Change-Id: Iedd7882f4a57cd89d145f1c61c5f85181187db03
Reviewed-on: http://gerrit.openafs.org/1716
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoPrevent uafs_readdir/closedir segfault
Andrew Deason [Fri, 14 Aug 2009 21:26:16 +0000]
Prevent uafs_readdir/closedir segfault

Check for the NULL case in uafs_readdir/closedir, so we don't blindly
dereference the given pointer.

Change-Id: Iaefce9bf2e5135a60e9739f866a1f27333f06e28
Reviewed-on: http://gerrit.openafs.org/1715
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoUpdate Debian packaging files
Russ Allbery [Thu, 8 Apr 2010 21:54:23 +0000]
Update Debian packaging files

The Debian packaging files in the tree were ancient.  Update to the
packaging files from the just-uploaded 1.5.73.3-1 version, which should
build and correctly install the current development source.

The current packaging files no longer use a hard-coded version in
debian/rules, so remove the configure machinery for creating it.  The
correct way of handling the version number is to generate a new
changelog entry.  That work will come in a subsequent patch.

Change-Id: I187fe7cc3f4ca38de6165d58274841d300b6cdf1
Reviewed-on: http://gerrit.openafs.org/1713
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdd OpenAFS-debug.*.plist to .gitignore
Russ Allbery [Thu, 8 Apr 2010 20:23:11 +0000]
Add OpenAFS-debug.*.plist to .gitignore

Change-Id: I6f931cb19997c8743223ee42d4072ad632c3bad4
Reviewed-on: http://gerrit.openafs.org/1712
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agopts mem -expandgroups option
Michael Meffie [Wed, 10 Mar 2010 14:48:38 +0000]
pts mem -expandgroups option

Improve support for supergroups in the pts membership command
with a new option called -expandgroups. This option will
recursively show the complete membership of users and groups.
The expanded members of a group are all the users which are
members of all of the group's sub-groups.  The expanded groups
of a user are all the groups which are supergroups of the
users's groups.

Change-Id: I811a4e5e73632e5e205fe10f3f3a36a98464d49e
Reviewed-on: http://gerrit.openafs.org/1601
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agopts mem -supergroup option
Michael Meffie [Wed, 17 Mar 2010 23:16:50 +0000]
pts mem -supergroup option

Improve pts support for supergroups with an option to list the
supergroups of a group.

Change-Id: I4fe1cd131cd334386bc16ce733e01e29e0511d4f
Reviewed-on: http://gerrit.openafs.org/1600
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoLinux: kmap() not page_address()
Simon Wilkinson [Tue, 6 Apr 2010 23:29:44 +0000]
Linux: kmap() not page_address()

Using page_address() will return NULL if the page is in highmem. To
avoid this, we must kmap() the page we're getting the address of,
and kunmap() when we are done. If the page isn't in high memory, then
kmap() is equivalent to page_address().

Change-Id: I42abfadaf3101bf5ad41bd7e5f720ba2583c4ee5
Reviewed-on: http://gerrit.openafs.org/1705
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoExplain in CellServDB man page that server lines can be omitted
Russ Allbery [Wed, 7 Apr 2010 18:53:23 +0000]
Explain in CellServDB man page that server lines can be omitted

It's possible to use AFSDB records only to locate the VLDB servers but
still list the cell in the client CellServDB so that the client is
aware of it and populates it into dynroot.  Describe doing this in the
man page.

Change-Id: I714cd515dc4b72a6e358bbd8f9332d4ddce5a5fc
Reviewed-on: http://gerrit.openafs.org/1710
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix typo in bos_create manpage
Andrew Deason [Wed, 7 Apr 2010 15:35:53 +0000]
Fix typo in bos_create manpage

Change-Id: I1ea456e47eccc0a74f042898ef8a3bcde3aacf15
Reviewed-on: http://gerrit.openafs.org/1709
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoMake tests/afcp compile cleanly
Rod Widdowson [Wed, 7 Apr 2010 10:14:32 +0000]
Make tests/afcp compile cleanly

It didn't compile because it includes <afs/afs_const.h> changing that
to afs_consts.h makes it happy.

Change-Id: I3a21e6ab2b99d8f4ebbc55922163b0695a6187f3
Reviewed-on: http://gerrit.openafs.org/1708
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoReallocate memory in aklog for the AFS ID string
Russ Allbery [Tue, 6 Apr 2010 23:31:37 +0000]
Reallocate memory in aklog for the AFS ID string

aklog was previously writing the magic AFS ID string into previously
alloated memory with sprintf, but the variable in question was only
as long as the username, so this code could overwrite memory and lead
to heap corruption.  Free previously allocated memory and use
afs_asprintf to format the AFS ID string instead.

Change-Id: I7649864817340764c39c176606a9a543c10983c9
Reviewed-on: http://gerrit.openafs.org/1706
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoMake src/rx/rx.c not executable
Russ Allbery [Tue, 6 Apr 2010 22:27:51 +0000]
Make src/rx/rx.c not executable

Change-Id: If471b579e6f1bf4f69a37f6edcc34e9546766df2
Reviewed-on: http://gerrit.openafs.org/1704
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoImprove demand-attach fileserver bos documentation
Russ Allbery [Wed, 7 Apr 2010 00:46:13 +0000]
Improve demand-attach fileserver bos documentation

Add a caution to the fileserver man page explaining that traditional
and demand-attach require different configurations, and also mention
that there are two different server implementations.  Add an example
of a bos create command for creating a demand-attach File Server to
the fileserver man page.

Add a caution to the bos create man page that a traditional fs node
won't work with demand-attach and vice versa.  Document the necessary
arguments for the dafs type.  Clarify in EXAMPLES which bos create
commands are traditional and which are demand-attach.  Add an example
of changing from a traditional to a demand-attach configuration.

Change kaserver to ptserver in the example of a simple process.

Change-Id: I4077246b69edf6e1ddc7c0761ac8e1006d471c24
Reviewed-on: http://gerrit.openafs.org/1707
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: WinTorture Verbose mode display all logged messages
Jeffrey Altman [Mon, 5 Apr 2010 15:24:16 +0000]
Windows: WinTorture Verbose mode display all logged messages

In verbose mode, wintorture should send to stdout all logged
messages.

LICENSE MIT

Change-Id: I4e173c35fcf6b1284d31149d773308b9f9c9a773
Reviewed-on: http://gerrit.openafs.org/1696
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Support new Cygwin docbook stylesheet location
Jeffrey Altman [Tue, 6 Apr 2010 19:07:47 +0000]
Windows: Support new Cygwin docbook stylesheet location

Make the computation of the docbook stylesheet location
based upon testing for directory existence now that versions
of cygwin 1.7.2 and place the stylesheets in a new location.

Change-Id: I844ae35a34eab73ee033bba875e68f71dc54f26b
Reviewed-on: http://gerrit.openafs.org/1702
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: permit documentation to be built without binaries
Jeffrey Altman [Tue, 6 Apr 2010 19:06:55 +0000]
Windows: permit documentation to be built without binaries

Add a dependency to the documentation rule on config so that
the documentation can be built without the entire source tree

Change-Id: I81d18fa9ec32c4d7d9799db2b1eac57c1d83df75
Reviewed-on: http://gerrit.openafs.org/1701
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: tag is listitem not llstitem
Jeffrey Altman [Tue, 6 Apr 2010 18:29:26 +0000]
Windows: tag is listitem not llstitem

Latest version of docbook picked this error up.

Change-Id: I2e6248d27e56c0074b0f80124733b79d7d1b51f0
Reviewed-on: http://gerrit.openafs.org/1699
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agomake openafs 1.5.73.3 openafs-devel-1_5_73_3
Derrick Brashear [Tue, 6 Apr 2010 18:42:44 +0000]
make openafs 1.5.73.3

another point release

Change-Id: I3430d62a4088e0b6f930b0b6cd2507f96226adea
Reviewed-on: http://gerrit.openafs.org/1700
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agomacos bulkstat avoid reclaiming vnodes
Derrick Brashear [Tue, 6 Apr 2010 13:57:24 +0000]
macos bulkstat avoid reclaiming vnodes

when a vnode has gone CVInit, don't use it as a vlru pivot.

Change-Id: I0b874c141069a23a9724d360a7864b0271c36e15
Reviewed-on: http://gerrit.openafs.org/1698
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>