openafs.git
14 years agoafs_Conn must be called within the analyze loop
Simon Wilkinson [Sat, 17 Oct 2009 07:49:03 +0000]
afs_Conn must be called within the analyze loop

afs_Analyze calls afs_PutConn, so each pass through the
afs_Analyze loop must call afs_Conn to get a new connection handle.

afs_CacheStoreVCache (part of the fetchstore refactoring) wasn't doing
this, and so producing garbage data upon retries.

Reviewed-on: http://gerrit.openafs.org/674
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: Always compute time remaining in cm_Analyze
Jeffrey Altman [Fri, 16 Oct 2009 19:28:04 +0000]
Windows: Always compute time remaining in cm_Analyze

In cm_Analyze, the time remaining for processing the request
is used to determine if a retry should requested upon return.
If the request's CM_REQ_NORETRY flag is set, cm_Analyze can
still permit a retry if a new rx connection is to be forced.
This cannot happen if the time remaining is not calculated
when the CM_REQ_NORETRY flag is set.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/670
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: mark volume status online during cm_MergeStatus
Jeffrey Altman [Fri, 16 Oct 2009 19:31:02 +0000]
Windows: mark volume status online during cm_MergeStatus

During cm_MergeStatus, if the volume status is not vl_online
mark it vl_online.  The volume must be online because an
AFSFetchStatus was just processed.  This change reduces the
amount of work that must be performed by the daemon thread's
volume status check.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/669
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoLinux: kmem_cache_create fix and cleanup
Marc Dionne [Fri, 9 Oct 2009 01:53:03 +0000]
Linux: kmem_cache_create fix and cleanup

Fix the kmem_cache constructor function to match the current
expected prototype, and cleanup related code.  This has been wrong
for a while, but since we were just passing extra parameters the
only effect was to generate a warning.

- Add a new configure test to detect the new constructor function
signature
- Define the older versions of the constructor in osi_compat.h,
making them call the current version
- Move a few compatibility #defines to osi_compat.h

Reviewed-on: http://gerrit.openafs.org/657
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix rxgen-generated warnings
Andrew Deason [Thu, 15 Oct 2009 17:48:08 +0000]
Fix rxgen-generated warnings

Prevent rxgen from generating code that produces warnings at compile
time.

 * Add print_ifarg_with_cast().  Used within print_ifstat() to generate
   a member in an argument list complete with a type cast.  The type
   cast may be a pointer to the type or the type depending on the value
   of the 'ptr_to' parameter.

 * When print_ifstat() generates the output for an opaque vector, cast
   the object to 'caddr_t' as xdr_opaque() accepts an argument of type
   'caddr_t'.

 * When print_ifstat() generates the output for an opaque array, cast
   the object to 'char **' because xdr_bytes() accepts an argument of
   type 'char **'.

 * When print_ifstat() generates the output for any array that is not
   opaque or string, cast the object to 'caddr_t' because all of the
   xdr_XXX() functions other than xdr_opaque and xdr_bytes accept an
   argument of type 'caddr_t'.

 * When print_ifstat() generates the output for an alias, cast the
   output to a pointer to the specified type because xdr_<type> accepts
   an argument of type '<type> *'.

This addresses warnings generated when compiling fsint/Kvice.xdr.c and
fsint/afsint.xdr.c.

Reviewed-on: http://gerrit.openafs.org/664
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoexit less
Derrick Brashear [Fri, 16 Oct 2009 14:44:58 +0000]
exit less

start cleanup of calls to exit scatter into library code. ugen_ callers handle
error returns correctly; rmtsys already deals with errors; and rx_pthread can
already deal with errors in the case that's fixed

Reviewed-on: http://gerrit.openafs.org/667
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agosnowleopard 64 bit warning death
Derrick Brashear [Thu, 15 Oct 2009 23:21:54 +0000]
snowleopard 64 bit warning death

make all errors from warnings when compiling on snowleopard die

as a note, the ukernel pid, and pthread self as id changes, probably
should be revisited, but for now i have changed nothing. it should
be a separate change.

Reviewed-on: http://gerrit.openafs.org/666
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 agoDetect and use %zu for size_t when available
Andrew Deason [Mon, 12 Oct 2009 02:55:05 +0000]
Detect and use %zu for size_t when available

Commit db949b7fade69d7eb1e38ad85d5b822c443306cb was incorrect and
generated warnings on many platforms; we cannot determine the correct
format string for a size_t at compile-time. Instead use the %z length
modifier when we can detect that it is safe to use. Otherwise, fall back
to just %lu on Unix, since it is reasonable to assume
sizeof(size_t) == sizeof(unsigned long) on Unix.

Reviewed-on: http://gerrit.openafs.org/647
Reviewed-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 agoFix unitialized variable warning in cfghost.c
Andrew Deason [Thu, 15 Oct 2009 03:43:27 +0000]
Fix unitialized variable warning in cfghost.c

Initialize cellentry. It does not appear to be possible to actually hit
code that references an uninitialized cellentry, but the compiler can
still complain.

Reviewed-on: http://gerrit.openafs.org/665
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: AFSVolSync creationDate based readonly volume versioning
Jeffrey Altman [Wed, 14 Oct 2009 03:36:26 +0000]
Windows: AFSVolSync creationDate based readonly volume versioning

Implement readonly volume versioning based upon the .readonly
volume creation date as reported in the AFSVolSync output
parameter of every RXAFS RPC.

Whenever a new callback is obtained for an object stored within
a .readonly volume, the volume creation date is recorded in the
cm_volume object along with the callback expiration time and
a reference to the server that issued it.  These values are
used to determine if a callback is present when the cm_scache
object's volume creation date matches the cm_volume object's
volume creation date.  If there is no match, the cm_scache
object's individual callback information is used to determine
whether a callback has been registered.

This mechansism ensures that the whole-volume callback issued
in response to a RXAFS_FetchStatus request against a .readonly
volume can be applied to all objects that are cached from the
same version of the .readonly volume instance.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/654
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows does not provide sys/wait.h
Jeffrey Altman [Thu, 15 Oct 2009 02:33:11 +0000]
Windows does not provide sys/wait.h

sys/wait.h was added to butm/file_tm.c by
patch set 789580d13591ff1aa53cfbf5fef4d46b0b65c805
(gerrit 635)

Reviewed-on: http://gerrit.openafs.org/662
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix checked builds with gcc4.2
Simon Wilkinson [Fri, 9 Oct 2009 23:30:01 +0000]
Fix checked builds with gcc4.2

Recent change sets removed the 'ignore-all-warnings' mode from a
number of files, in favour of using the implicit-function-declaration
pragma. Sadly, that pragma isn't available in gcc 4.2. Revert the
Makefile changes such that ignore all warnings is turned back on
for the affected files, and note this in README.WARNINGS

Reviewed-on: http://gerrit.openafs.org/639
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoadd SRV record lookups to unix afsconf support suite also
Derrick Brashear [Wed, 7 Oct 2009 13:21:53 +0000]
add SRV record lookups to unix afsconf support suite also

create new api call afsconf_LookupServer
make afsconf_GetAfsdbInfo call it
include T_SRV support

Reviewed-on: http://gerrit.openafs.org/594
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>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoAdd fsint dependency to audit builds
Simon Wilkinson [Wed, 14 Oct 2009 21:27:34 +0000]
Add fsint dependency to audit builds

The 'audit' target requires that fsint is built first. Express this as a make
dependency.

Reviewed-on: http://gerrit.openafs.org/660
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: refactor afs status cloning and clone when fs fetchdata bug detected
Jeffrey Altman [Tue, 13 Oct 2009 01:57:52 +0000]
Windows: refactor afs status cloning and clone when fs fetchdata bug detected

When the file server fetchdata invalid length bug is detected the
cache manager must fake the AFS Status info for the file as well
as the AFSVolSync info.   Otherwise, the merge status is incorrect.

LICENSE MIT

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

14 years agoRevert "Windows: Readonly Volume Versioning for Windows Cache Manager"
Jeffrey Altman [Wed, 14 Oct 2009 13:26:27 +0000]
Revert "Windows: Readonly Volume Versioning for Windows Cache Manager"

This reverts commit bb6e38a45b8b5061cd4c9613262fa015957fb8d8.

Reviewed-on: http://gerrit.openafs.org/659
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: fix build due to broken src/volser/NTMakefile
Jeffrey Altman [Wed, 14 Oct 2009 02:35:55 +0000]
Windows: fix build due to broken src/volser/NTMakefile

Commit 82aa5b4e09ac8a550525efd0e357783a3b3aed88 incorrectly
updated the src/volser/NTMakefile resulting in a broken
build system.

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

14 years agoLinux: Remove declaration of unused variable filp
Marc Dionne [Wed, 14 Oct 2009 01:52:47 +0000]
Linux: Remove declaration of unused variable filp

filp is unused after the recent rework of osi_file.c

Reviewed-on: http://gerrit.openafs.org/656
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix warnings in butc, tbutc, and butm
Andrew Deason [Fri, 9 Oct 2009 15:17:43 +0000]
Fix warnings in butc, tbutc, and butm

tbutc:
 - Ignore warnings for dump.c

butc/dump.c:
 - butm_WriteFileData takes a char*, no need to cast buffer

 - volumeHeader_hton takes a struct volumeHeader*, though, need to cast
   buffer there

 - Ignore strict prototypes

butc/recoverDb.c:
 - scanVolData takes a uint*, not an int*

 - Initialize nbytes to 0

 - Remove warning inhibition

butc/tcmain.c:
 - atocl takes an int*, not a uint*

 - Ignore implicit function declaration warnings

butc/tcudbprocs.c:
 - Ignore implicit function declaration warnings (ubik stuff)

butm/file_tm.c:
 - Include sys/wait.h for the waitpid() prototype

Reviewed-on: http://gerrit.openafs.org/635
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: If SecurityLevel is configured use it for vos.exe and pts.exe
Jeffrey Altman [Mon, 12 Oct 2009 18:20:00 +0000]
Windows: If SecurityLevel is configured use it for vos.exe and pts.exe

If the SecurityLevel registry value indicates that crypt should be
the default, then always set -encrypt for vos.exe and pts.exe.

Reviewed-on: http://gerrit.openafs.org/648
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoUse f_bsize for ZFS afs_fsfragsize
Andrew Deason [Thu, 24 Sep 2009 17:02:55 +0000]
Use f_bsize for ZFS afs_fsfragsize

On ZFS, the disk space files can use up can be rounded up to the next
recordsize boundary if they've been truncated. This can cause the Unix CM
to mis-estimate cache usage, since it truncates files fairly often, and
assumes the disk space used is the file length rounded up to the next
f_frsize.

Since the ZFS recordsize is available via the statvfs f_bsize, just
round up to that instead. There is still some additional file metadata
that takes up some additional space on disk, but according to ZFS people
I've spoken to about this, it cannot be known in advance. In practice,
the additional metadata storage doesn't appear to exceed about 10% of
the data storage, which should be acceptable.

FIXES 125365

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

14 years agoAdd public protoypes for volser
Simon Wilkinson [Fri, 9 Oct 2009 20:17:16 +0000]
Add public protoypes for volser

Add a new public header file volser_prototypes.h, which contains
prototypes for those volser functions that are used by the rest of the
tree, and link it into the Unix and Windows build systems.

Rename the current volser_prototypes.h volser_internal.h, and update
references to it.

Make those places that should use the new public header use it, and
re-enable warnings-as-errors as appropriate.

Remove the warning free files from the list in README.WARNINGS

Add butm_prototypes.h to butc/lwps.c, so we can enable warnings for that,
too.

Reviewed-on: http://gerrit.openafs.org/636
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoFormatting typos in pts.pod
Andrew Deason [Mon, 12 Oct 2009 18:26:57 +0000]
Formatting typos in pts.pod

Fix a couple of B<...> sequences pod2man yells at us about.

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

14 years agoAdd afsio to gitignore
Simon Wilkinson [Fri, 9 Oct 2009 20:21:23 +0000]
Add afsio to gitignore

Add the new afsio binary to the appropriate .gitignore file

Reviewed-on: http://gerrit.openafs.org/637
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Readonly Volume Versioning for Windows Cache Manager
Jeffrey Altman [Mon, 5 Oct 2009 18:00:50 +0000]
Windows: Readonly Volume Versioning for Windows Cache Manager

When the HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters
"ReadOnlyVolumeVersioning" DWORD registry value is non-zero, the volserver
will be queried for each .readonly volume to obtain the lastUpdateTime.
The lastUpdateTime will be used as a volume version identifier for each
cm_scache_t object stored in the volume.  With a known volume version,
whenever a current status is obtained for any object within the .readonly volume,
all the cached objects within that volume that have the same volume version
can share the resulting callback registration.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/579
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows Explorer Shell Extension: Remove OutputDebugString calls
Jeffrey Altman [Sun, 11 Oct 2009 22:06:25 +0000]
Windows Explorer Shell Extension: Remove OutputDebugString calls

Remove all OutputDebugString calls from the explorer shell extension.
OutputDebugString() requires acquiring system global locks.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/643
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Correct lock error codes and log file server lockCount
Jeffrey Altman [Mon, 12 Oct 2009 12:28:54 +0000]
Windows: Correct lock error codes and log file server lockCount

The error codes that should be returned when a lock request
fails are:

  STATUS_LOCK_NOT_GRANTED for an explicit lock request
  STATUS_SHARING_VIOLATION when a CreateFile fails due to a previous lock

Correct the service to ensure that these values are in fact returned.

Also, add 'fsLockCount' field to cm_scache_t and dump its value
as part of the "fs memdump" output.  This permits some ability to
identify what the file server thinks the lock count is.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/646
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoImprove accuracy of Rx RTT calculation by skipping retransmitted packets
Jeffrey Altman [Mon, 5 Oct 2009 18:34:59 +0000]
Improve accuracy of Rx RTT calculation by skipping retransmitted packets

Rx RTT calculations are based on Van Jacobson's work using
constants that make computations fast but are not necessarily
the best for modeling Rx protocol exchanges.  This patch does
not alter the constants but does improve the comments to show
that the math is correct.

Phil Karn in 1987 demonstrated that Van Jacobson's algorithms
produced inaccurate results when the RTT computed from an
acknowledgement of a retransmitted packet were included.  The
resulting RTT would either be too small causing the system to
retransmit too many packets or too long resulting in too few
being sent.

This patch follows Phil Karn's advice which was also adopted
as mandatory for TCP in RFC2988.  Retransmitted packets and
delayed acks are skipped and the retransmit time is backed off
(up to a maximum of 3 seconds) until a successful acknowlegement
is received for an initially transmitted packet.

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/580
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoUse AFS_PROC consistently
matt@linuxbox.com [Sat, 10 Oct 2009 13:09:53 +0000]
Use AFS_PROC consistently

Make consistent use of AFS_PROC in portable and mixed files, adding the define
for platforms which lacked it.  This completes a change that has been ongoing
for several years.

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/642
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 agoRevert "Linux: kmem_cache_create fix and cleanup"
Simon Wilkinson [Fri, 9 Oct 2009 23:46:08 +0000]
Revert "Linux: kmem_cache_create fix and cleanup"

This reverts commit 6133d25397b8365d450c99b8bc147972f8600074.

This patch breaks builds on RHEL5.3 - revert it until we can come up
with a fix.

Reviewed-on: http://gerrit.openafs.org/640
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: use port when finding server by address
Jeffrey Altman [Thu, 8 Oct 2009 12:59:15 +0000]
Windows: use port when finding server by address

Modify cm_FindServerByIP to search by port as well.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/607
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Prevent fs fetchdata offset bug error from propagating to caller
Jeffrey Altman [Fri, 9 Oct 2009 10:23:10 +0000]
Windows: Prevent fs fetchdata offset bug error from propagating to caller

When the file server fetchdata offset bug is triggered and detected,
not only do we have to behave as if 'length_found' is zero, but we
also must ignore the RXGEN_CC_UNMARSHAL error that will be returned
from rx_EndCall() due to the parsing error that occurred during the
rx_Read32() call.

LICENSE MIT

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

14 years agoLinux: kmem_cache_create fix and cleanup
Marc Dionne [Fri, 9 Oct 2009 01:53:03 +0000]
Linux: kmem_cache_create fix and cleanup

Fix the kmem_cache constructor function to match the current
expected prototype, and cleanup related code.  This has been wrong
for a while, but since we were just passing extra parameters the
only effect was to generate a warning.

- Add a new configure test to detect the new constructor function
signature
- Define the older versions of the constructor in osi_compat.h,
making them call the current version
- Move a few compatibility #defines to osi_compat.h
- Clean up the call to kmem_cache_create by introducing an inline
afs_kmem_cache_create in osi_compat.h

Reviewed-on: http://gerrit.openafs.org/621
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix warning in vol/namei_ops.c
Andrew Deason [Thu, 8 Oct 2009 22:50:06 +0000]
Fix warning in vol/namei_ops.c

Commit 906403c6d770026fd9da606ea468e47ee911f896 introduced a warning by
making 'error' unused anywhere. Remove the declaration, as well.

Reviewed-on: http://gerrit.openafs.org/620
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoUpdate README with solved/pending docs tasks
Davor Ocelic [Thu, 8 Oct 2009 21:03:06 +0000]
Update README with solved/pending docs tasks

Reviewed-on: http://gerrit.openafs.org/618
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoUpdate backup suite manpages
Davor Ocelic [Thu, 8 Oct 2009 21:01:39 +0000]
Update backup suite manpages

 -- Add missing POD links (L<>)

 -- Verify all subcommands and options

 -- Format > 80 columns synopsis lines

Reviewed-on: http://gerrit.openafs.org/617
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoUpdate fstrace suite manpages
Davor Ocelic [Thu, 8 Oct 2009 20:58:31 +0000]
Update fstrace suite manpages

 -- Add missing POD links (L<>)

 -- Verify all subcommands and options

 -- Format > 80 columns synopsis lines

Reviewed-on: http://gerrit.openafs.org/616
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoMinimal left docs updates for vos suite
Davor Ocelic [Thu, 8 Oct 2009 20:57:03 +0000]
Minimal left docs updates for vos suite

Reviewed-on: http://gerrit.openafs.org/615
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoTypo in vos_remsite.pod
Andrew Deason [Thu, 8 Oct 2009 18:15:00 +0000]
Typo in vos_remsite.pod

A typo in c717fcd32cabbc9651b81ef3d0cea11d3a6ecd57 removed the = before
the first head1 in vos_remsite.pod. Put it back.

Reviewed-on: http://gerrit.openafs.org/612
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdd POD links (L<>) in pts.pod and symlink.pod
Davor Ocelic [Thu, 8 Oct 2009 17:32:36 +0000]
Add POD links (L<>) in pts.pod and symlink.pod

Reviewed-on: http://gerrit.openafs.org/610
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoUpdate vos suite manpages
Davor Ocelic [Thu, 8 Oct 2009 17:31:00 +0000]
Update vos suite manpages

Larger collection of all vos suite commands, including but
not limited to:

 -- documented all commands / options, verified against both 1.4 and 1.5 tree
    (including the common -encrypt/-noresolve options)

 -- correct order, POD formatting and synopsis for all commands' options

 -- shorthand synopsis provided for all commands that missed it, with proper
    non-ambiguous command abbreviations of all options

 -- POD synopsis formatted to 80-columns in commands where it was running over

 -- for newer options, documented which OpenAFS version they became available

 -- proper manpage links using L<> in vos.pod

Reviewed-on: http://gerrit.openafs.org/609
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoAllow check-pod to work on specific files or dirs
Davor Ocelic [Thu, 8 Oct 2009 17:20:33 +0000]
Allow check-pod to work on specific files or dirs

Reviewed-on: http://gerrit.openafs.org/608
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoUpdate readme with solved and pending tasks
Davor Ocelic [Thu, 8 Oct 2009 17:33:26 +0000]
Update readme with solved and pending tasks

Reviewed-on: http://gerrit.openafs.org/611
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoReduce warnings in vos.c
Andrew Deason [Wed, 7 Oct 2009 20:57:04 +0000]
Reduce warnings in vos.c

Squash a few miscellaneous that appear when building vos.c:

 -- CreateVolume should use util_GetUInt32 to parse vol ids, since they
    are now unsigned

 -- The m_uuid argument of print_addrs is altered, so do not declare it
    const

 -- Declare the confDir argument of ugen/vsu_ClientInit to be const,
    since it does not change, and vos.c passes a const confDir in
    MyBeforeProc

 -- Ignore implicit function declaration warnings and remove
    CFLAGS_NOERROR from the vos.c build, since the only remaining
    warning is an implicit function declaration

Reviewed-on: http://gerrit.openafs.org/602
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix warnings in rxkad
Andrew Deason [Wed, 7 Oct 2009 22:33:02 +0000]
Fix warnings in rxkad

Some miscellaneous warnings throughout rxkad:

rxkad/ticket5.c:
 - Explicitly cast ticket blob to unsigned char*, as some functions take
   a ticket as a char*, and some take it as an unsigned char*

 - in tkt_DecodeTicket5, make 'start' and 'end' be unsigned, since that
   is what their callers think they are

 - Ignore implicit function declaration warnings (for CRC functons)

 - Remove general warning inhibition

rxkad/ticket.c:
 - in tkt_DecodeTicket, make 'start' and 'end' be unsigned, since that
   is what their callers think they are

 - Remove general warning inhibition

rxkad/v5der.c:
 - In decode_enumerated, use der_get_unsigned instead of der_get_int,
   since we're decoding an unsigned integer.

rxkad/rxkad_server.c:
 - The last two arguments to rxkad_DeriveXORInfo are char*s, so
   explicitly cast them to be so

 - Remove general warning inhibition

rxkad/rxkad_common.c:
 - rxkad_stats_t has had a couple of spares transform into
   clientObjects/serverObjects; account for them and don't overrun the
   spares array

Reviewed-on: http://gerrit.openafs.org/600
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoRemove warnings related to type-punning
Andrew Deason [Wed, 7 Oct 2009 21:42:42 +0000]
Remove warnings related to type-punning

cmd/cmd.c:
 - Just make dummy be a struct cmd_item instead of casting

rxdebug/rxdebug.c:
 - Access the stats packet through a union instead of casting and
   dereferencing

util/uuid.c:
 - Access the seed through a union and an array instead of that
   incrementing-pointer approach

Reviewed-on: http://gerrit.openafs.org/599
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: use xdr_alloc to allocate memory for Callback data structs
Jeffrey Altman [Thu, 8 Oct 2009 12:35:09 +0000]
Windows: use xdr_alloc to allocate memory for Callback data structs

xdr_alloc must be used instead of malloc in SRXAFSCB_GetLocalCell
and SRXAFSCB_GetCacheConfig

LICENSE MIT

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

14 years agoauthclient.c: fix 64-bit specific warnings
Marc Dionne [Thu, 8 Oct 2009 12:12:28 +0000]
authclient.c: fix 64-bit specific warnings

Commit 36be36e034141ded8fff5ff2edab3223b23c9fcf introduced some casts
from an integer type to void *.  This generates warnings on a 64-bit
platform.
Use uintptr_t casts to make the compiler happy.

Reviewed-on: http://gerrit.openafs.org/605
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdd missing variable to afsio
Jeffrey Altman [Thu, 8 Oct 2009 11:25:24 +0000]
Add missing variable to afsio

Callback variable missing in WriteFile

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/604
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Hartmut Reuter <reuter@rzg.mpg.de>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoPermit DNS SRV record lookups to be used by the Windows afsconf_GetAfsdbInfo
Jeffrey Altman [Tue, 6 Oct 2009 18:46:09 +0000]
Permit DNS SRV record lookups to be used by the Windows afsconf_GetAfsdbInfo

Permit DNS SRV record lookups to be used by the Windows afsconf_GetAfsdbInfo

As per the published DNS SRV internet draft for the AFS3 protocol,
DNS SRV records are to replace AFSDB records as the primary method
of looking up AFS3 service location information.

In order to make that happen for Windows:

1. afsconf_GetAfsdbInfo must be able to translate from internal service
names to IANA assigned service names.

2. The Windows getAFSServer() API must accept IANA service and protocol
parameters as well as the port number to use if AFSDB record fallback is
required.

3. The Windows cache manager must pay attention to the port number
stored within the sockaddr_in structure instead of using hard coded
values based upon the server type.
For afsconf_GetAfsdbInfo, in addition to searching for the requested
IANA service, if that service is prserver or kaserver fallback to
the vlserver record (if any).

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/593
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoxdrproc_t functions take a caddr_t, not caddr_t*
Andrew Deason [Wed, 7 Oct 2009 22:14:08 +0000]
xdrproc_t functions take a caddr_t, not caddr_t*

Callers of xdrproc_t functions give the function a foo* as the second
argument, not a foo**, and the xdrproc_t functions themselves expect
this. Make the xdrproc_t typedef accurately reflect that, thereby
ridding us of some warnings.

Reviewed-on: http://gerrit.openafs.org/603
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoIgnore libafsrpc warnings for shlibafsrpc also
Andrew Deason [Wed, 7 Oct 2009 21:39:18 +0000]
Ignore libafsrpc warnings for shlibafsrpc also

Some warnings were ignored in libafsrpc, but not in shlibafsrpc. Ignore
them in both places.

Reviewed-on: http://gerrit.openafs.org/601
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix warnings in lwp/process.c
Andrew Deason [Wed, 7 Oct 2009 22:07:52 +0000]
Fix warnings in lwp/process.c

 -- The EP/ep function does not return anything; declare the function pointer
    accordingly

 -- Explicitly cast &stackvar to char* to avoid a warning

Reviewed-on: http://gerrit.openafs.org/598
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix warnings in kauth/authclient.c
Andrew Deason [Wed, 7 Oct 2009 22:48:52 +0000]
Fix warnings in kauth/authclient.c

 -- In ka_Authenticate, explicitly cast 'start' and 'end' to void*,
    since kawrap_ubik_Call takes all arguments as void*s

 -- Fix kawrap_ubik_Call to not be an old-style declaration

 -- Only ignore strict prototypes and implicit function declaration
    warnings

Reviewed-on: http://gerrit.openafs.org/597
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoRemove a pointer->integer warning in fstrace.c
Andrew Deason [Wed, 7 Oct 2009 22:16:30 +0000]
Remove a pointer->integer warning in fstrace.c

Explicitly cast eparm to a long in afs_syscall when calling
proc_afs_syscall, to avoid a warning.

Reviewed-on: http://gerrit.openafs.org/596
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoPrototype strcasestr in afsmonitor.c
Andrew Deason [Wed, 7 Oct 2009 22:19:22 +0000]
Prototype strcasestr in afsmonitor.c

If we HAVE_STRCASESTR, we lack the prototype for strcasestr in
afsmonitor.c unless we def _GNU_SOURCE before including string.h on GNU
systems. To avoid side-effects or pulling in extra stuff, just prototype
strcasestr ourselves for the time being (if we have it) instead of
def'ing _GNU_SOURCE.

Reviewed-on: http://gerrit.openafs.org/595
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoCorrect and use AFS_SIZET_FMT
Andrew Deason [Wed, 7 Oct 2009 19:52:02 +0000]
Correct and use AFS_SIZET_FMT

On *nix, a size_t needs either %lu or %u to be interpolated in a string,
depending on if we're on an ILP32 arch or not. Define AFS_SIZET_FMT
accordingly, and actually use AFS_SIZET_FMT when we try to print a
size_t.

This removes numerous -Wformat warnings, at least when building on
i386_linux26.

Reviewed-on: http://gerrit.openafs.org/592
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoAllow gnu-style long options
Michael Meffie [Sat, 25 Jul 2009 19:28:07 +0000]
Allow gnu-style long options

New users are surprised when OpenAFS command options
cannot be prefixed with two dashes, as is common
with most modern tools.  Permit an extra dash for
common commands when more than one character is
given. For example vos listvol --server foo.bar.com is
equivalent to vos listvol -server foo.bar.com, but
vos listvol --s foo.bar.com is an error.

Reviewed-on: http://gerrit.openafs.org/216
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agopioctl with VIOC_FS_CMD removed
Hartmut Reuter [Wed, 7 Oct 2009 13:26:42 +0000]
pioctl with VIOC_FS_CMD removed

This should ease the ingtegration for Windows.
Instead RXAFS_FetchStatus is called.

Reviewed-on: http://gerrit.openafs.org/590
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoBuild afsio on Windows; remove many warnings
Jeffrey Altman [Tue, 6 Oct 2009 15:03:27 +0000]
Build afsio on Windows; remove many warnings

With this commit afsio builds on Windows.   It will not work
until the VIOC_FS_CMD OSD extension is implemented in the
Windows Cache Manager.

Required changes:

  * Export ugen_ClientInit from libafsauthent.dll

  * Fix util_GetInt64 and util_GetUInt64 to return afs_int32
    instead of afs_int64 since it is just returning success
    or error

  * Define VIOC_FS_CMD for Windows even though it isn't implemented

LICENSE BSD

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

14 years agoMake namei convertROtoRW'd volumes usable
Andrew Deason [Wed, 7 Oct 2009 17:14:11 +0000]
Make namei convertROtoRW'd volumes usable

Right now, if you convertROtoRW a volume on namei, the converted volume
appears to need a salvage before it is usable, and the header of the old
(now empty) RO volume is kept around. Fix this:

 -- Set inUse = 0 on the converted volume, so the fileserver will be
    able to attach the volume when we give it back

 -- Unlink the RO header file, instead of trying to unlink the
    VI_VOLINFO file twice

 -- Log the actual error code (errno) in the error message for the last
    unlink

Reviewed-on: http://gerrit.openafs.org/591
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoUse page_offset() on Linux
Simon Wilkinson [Fri, 2 Oct 2009 22:15:26 +0000]
Use page_offset() on Linux

Since time began, Linux has provided page_offset() to turn a
page index into an offset into the corresponding file. Make us use
this everywhere we calculate a page offset, rather than doing our
own maths.

Reviewed-on: http://gerrit.openafs.org/581
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: fs listacl -cmd
Jeffrey Altman [Tue, 6 Oct 2009 13:33:45 +0000]
Windows: fs listacl -cmd

Add the new functionality from the Unix fs command to Windows.

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/585
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Hartmut Reuter <reuter@rzg.mpg.de>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agodocumentation for "fs listacl -cmd"
Jeffrey Altman [Tue, 6 Oct 2009 13:48:57 +0000]
documentation for "fs listacl -cmd"

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/586
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Hartmut Reuter <reuter@rzg.mpg.de>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoafs_FindService should handle iana portnames
Derrick Brashear [Mon, 5 Oct 2009 16:45:26 +0000]
afs_FindService should handle iana portnames

right now we compare against /etc/services, and a hardcoded array.
but since there's no guarantee /etc/services will be useful, this
can mean inconsistent behavior. hardcode the iana names in the table,
and take the internal structure used private at the same time.

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/577
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 agoNew option '-cmd' for 'fs listacl'
Hartmut Reuter [Tue, 6 Oct 2009 07:10:45 +0000]
New option '-cmd' for 'fs listacl'

prints 'fs setacl' commands necessary to create the current
ACLs. This is useful for backup scripts using TSM (or others)
to save the ACLs into a file to allow for later restore.

Reviewed-on: http://gerrit.openafs.org/556
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoUse standard Linux paths for all headers
Simon Wilkinson [Fri, 2 Oct 2009 22:43:46 +0000]
Use standard Linux paths for all headers

As we're being built by the standard Linux module build system, we
can use the normal #include <linux/blah.h> convention from including
kernel headers.

Reviewed-on: http://gerrit.openafs.org/582
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoOSX Launchd Startup Manage with Preference Pane
Claudio Bisegni [Mon, 5 Oct 2009 11:42:27 +0000]
OSX Launchd Startup Manage  with Preference Pane

OpenAFS preference pane has been updated to manage the new launchd startup mode. Has been delete the custom startup and shutdown file now is user the /Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.rc

OpenAFS.postinstall has been modified to remove the old existing /Library/StartupItems/OpenAFS directory
OpenAFS.pre_upgrade has been modified to shutdown daemon, if it is runnig, and remove the old preference pane to permit the one to be installed

Reviewed-on: http://gerrit.openafs.org/578
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoafsio is a command to pipe data into or out of afs files
Hartmut Reuter [Wed, 30 Sep 2009 08:06:14 +0000]
afsio is a command to pipe data into or out of afs files

afsio bypasses the cache manager to achieve higher throughput.
However, it uses the cache manager to stat or create files over the
AFS path.

Besides 'apropos' and 'help' there are 3 subcommands:

'write' pipes data into a new or empty AFS file

'append' pipes data at the end of an existing AFS file

'read' pipes data out of an AFS file

for 'write' there is an option '-md5' which calculates on the fly
the md5 chscksum and prints it to stdout. (Useful when you create
long time archives to keep it separately for later ...)

for 'write' there is also an option '-synthesize <size>' to do just
performance tests. It creates a file which contains at the
begin of each 4 KB block the offset printed in ascii.

for all subcommands exists a '-verbose' option which writes to
stderr data rate and timing information.

All three subcommands may also be used prefixed with 'fid' accepting
then a Fid instead of an AFS path. With the 'fid' prefix also a '-cell'
option is allowed.

Reviewed-on: http://gerrit.openafs.org/555
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoLinux: 2.6.32 - Adapt to writeback changes
Marc Dionne [Thu, 17 Sep 2009 20:57:52 +0000]
Linux: 2.6.32 - Adapt to writeback changes

Adapt to the writeback changes in kernel 2.6.32
- Since we define our own backing_dev, it needs to be registered with
the writeback code and attached to the super_block.  Otherwise it
might get ignored when writeback is needed.
- Each backing_dev now gets its own kernel thread.  The name of the
thread is based on the registered name - the openafs one will appear
as "flush-afs".

Reviewed-on: http://gerrit.openafs.org/574
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agorxfs_storePadd: return 0 on success
Marc Dionne [Sun, 4 Oct 2009 17:40:10 +0000]
rxfs_storePadd: return 0 on success

On success, storePadd should return 0, not the number of bytes
written by the last rx_Write call.  In some cases this return
value would leak all the way out to the close() system call,
causing it to fail.

Reviewed-on: http://gerrit.openafs.org/573
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoRefactor linux readpage support
Simon Wilkinson [Fri, 2 Oct 2009 13:34:50 +0000]
Refactor linux readpage support

The readpage call on Linux was becoming horribly complex.

This patch refactors it into three main components - a function which
fills a locked page (without unlocking it), a function which triggers
a cache bypass operation on a page, and a function which does
conditional prefetch, based on the properties of the page that was just
read.

In addition, we abstract out the cache bypass code further, and provide
static inline variants which are simply stubbed out when cache bypass is
disabled.

Reviewed-on: http://gerrit.openafs.org/569
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoRationalise some #ifdefs in the LINUX osi layer
Simon Wilkinson [Fri, 2 Oct 2009 12:43:01 +0000]
Rationalise some #ifdefs in the LINUX osi layer

Introduce osi_compat.h, a place to hide compatibility #ifdefs. Make
a start on using this by purging #ifdefs from osi_vnodeops, and pushing
changes into inline compatibility functions.

The general idea here is to create a single location where we can do our
multiple version compatibility magic, and by doing so reduce the
complexity of the rest of the code. The approach is that where the
kernel introduces a new interface, we should switch to using it in the
rest of the code, and add a compatibility function (in osi_compat.h)
which implements the new interface in terms of the old one, suitably
protected by #ifdefs.

Where an interface changes signature, but not name, we should implement
an afs_<blah> version of the function which has the signature of the
newest version, and within that call out to the real kernel versions,
mapping between the different parameters as appropriate.

Reviewed-on: http://gerrit.openafs.org/568
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoRemove pre-Linux 2.6 support
Simon Wilkinson [Fri, 2 Oct 2009 10:51:52 +0000]
Remove pre-Linux 2.6 support

This change removes support for kernels before Linux 2.6.0 from
src/afs/LINUX. Older kernels should be supported by the src/afs/LINUX24
code.

Reviewed-on: http://gerrit.openafs.org/567
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agocreate LINUX24 directory
Derrick Brashear [Thu, 1 Oct 2009 20:09:17 +0000]
create LINUX24 directory

shadow src/afs/LINUX into .../LINUX24, removing 2.6 code from it
same for rx/LINUX

cheat and simply modify MKAFS_OSTYPE in MakefileProto.LINUX.in

Reviewed-on: http://gerrit.openafs.org/565
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoThere can be only one ... MD5
Simon Wilkinson [Fri, 2 Oct 2009 17:36:24 +0000]
There can be only one ... MD5

The cache manager has two implementations of md5 - one in afs_md5.c
(used by afs_NewCell) and one in afs_util.c - used by Linux's MD5-inode
code.

Remove the one in afs_util.c in favour of using the common
implementation in afs_md5.c

Reviewed-on: http://gerrit.openafs.org/572
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agolaunchdaemon support for MacOS
Derrick Brashear [Thu, 1 Oct 2009 08:34:09 +0000]
launchdaemon support for MacOS

the changes needed to switch from a StartupItem to a LaunchDaemon for
the MacOS OpenAFS client

Reviewed-on: http://gerrit.openafs.org/564
Tested-by: Claudio Bisegni <Claudio.Bisegni@lnf.infn.it>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Claudio Bisegni <Claudio.Bisegni@lnf.infn.it>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoRemove page past end of file optimisations
Simon Wilkinson [Thu, 1 Oct 2009 20:27:11 +0000]
Remove page past end of file optimisations

The kernel checks itself for read() calls which attempt to fetch
pages past the current file extents. Remove ours.

Reviewed-on: http://gerrit.openafs.org/566
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoDAFS: Wait until preattach to service FSSYNC reqs
Andrew Deason [Wed, 30 Sep 2009 21:50:07 +0000]
DAFS: Wait until preattach to service FSSYNC reqs

Make FSYNC_sync wait until VInit == 2 before serving FSSYNC requests.
This follows the existing similar behavior of waiting until after volume
preattachment is completed before serving RPC requests in DAFS. This
prevents FSSYNC clients from being denied requests simply due to a
volume not having been preattached yet, at the small cost of delaying
how soon we can serve FSSYNC requests.

This does not alter the behavior of non-DAFS, which still only waits
until VInit == 1, since volume attachment takes significantly longer
than preattachment.

Reviewed-on: http://gerrit.openafs.org/563
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoDAFS: Avoid volserver segfault in GetVolInfo
Andrew Deason [Wed, 30 Sep 2009 21:42:46 +0000]
DAFS: Avoid volserver segfault in GetVolInfo

It is possible for GetVolObject to return success, but result in a NULL
fs_tv. In particular, when the fileserver responds with FSYNC_WRONG_PART
or FSYNC_UNKNOWN_VOLID. It is possible, though difficult, for the
fileserver to respond with FSYNC_UNKNOWN_VOLID if the requested volume
hasn't been preattached on the fileserver yet.

So, in GetVolInfo, also check fs_tv, so we don't try to dereference it
later.

Reviewed-on: http://gerrit.openafs.org/562
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows version 1.5.65 openafs-devel-1_5_65
Jeffrey Altman [Wed, 30 Sep 2009 19:43:45 +0000]
Windows version 1.5.65

Reviewed-on: http://gerrit.openafs.org/560
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoopenafs 1.5.65
Derrick Brashear [Wed, 30 Sep 2009 21:28:36 +0000]
openafs 1.5.65

make openafs 1.5.65 for unix

Reviewed-on: http://gerrit.openafs.org/561
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: change log for 1.5.65
Jeffrey Altman [Wed, 30 Sep 2009 19:42:16 +0000]
Windows: change log for 1.5.65

LICENSE: MIT
Reviewed-on: http://gerrit.openafs.org/559
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdd configure test for pagevec_lru_add_file
Simon Wilkinson [Wed, 30 Sep 2009 09:44:51 +0000]
Add configure test for pagevec_lru_add_file

pagevec_lru_add_file isn't available on all Linux kernels.
Fallback to using pagevec_lru_add where necessary.

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

14 years agomake VOL_STATE_VLRU_ADD exclusive
Tom Keiser [Tue, 29 Sep 2009 14:25:55 +0000]
make VOL_STATE_VLRU_ADD exclusive

VLRU_Add_r() places a volume into VOL_STATE_VLRU_ADD before
calling VLRU_Wait_r(), which drops VOL_LOCK while waiting
for the required VLRU queue to quiesce.  Thus, it is essential
that state VOL_STATE_VLRU_ADD be marked exclusive so that
another thread cannot mutate state until the VLRU generation
add transaction completes.

Reviewed-on: http://gerrit.openafs.org/554
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: short circuit background volume checks for shutdown
Jeffrey Altman [Tue, 29 Sep 2009 12:29:55 +0000]
Windows: short circuit background volume checks for shutdown

If the service is shutting down or the machine is entering
a suspend state, short circuit the background volume checks
to permit faster shutdown.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/552
Reviewed-by: Derrick Brashear <shadow@dementia.org>
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 agoAdd support for background page copies
Simon Wilkinson [Tue, 14 Jul 2009 23:02:31 +0000]
Add support for background page copies

LICENSE BSD

This patch adds support for backgrounding the page copies which are
caused by a call to readpages() In theory, this should improve the
throughput of the AFS kernel module as it permits processes to start
work whilst data is still being read into the page cache for later
pages.

Reviewed-on: http://gerrit.openafs.org/537
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdd support for blocking readahead
Simon Wilkinson [Tue, 14 Jul 2009 22:55:18 +0000]
Add support for blocking readahead

This patchset adds support for the readpages() system call, and enables
readahead on Linux. At the moment each page read causes readpages to
block, so the client won't see much benefit from readahead, beyond the
reduction in call overhead.

Reviewed-on: http://gerrit.openafs.org/536
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoDemand attach warning fixes
Simon Wilkinson [Tue, 29 Sep 2009 10:26:55 +0000]
Demand attach warning fixes

Fix a whole host of warnings in the demand attach code.

Make a broken tvolser build stop the build, rather than carrying on
regardless.

Reviewed-on: http://gerrit.openafs.org/551
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoDon't use volatile when it makes no sense
Simon Wilkinson [Tue, 29 Sep 2009 08:25:53 +0000]
Don't use volatile when it makes no sense

The demand attach code defines volume pointers as volatile in
a number of places, despite the fact that the values in question
aren't being shared between multiple threads. It then also passes
these volatile pointers into functions which don't treat them as
volatile (and even to some which assign them to registers).

This patch simply removes the use of volatile in this situation.

Reviewed-on: http://gerrit.openafs.org/550
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agointptr fallout
Derrick Brashear [Tue, 29 Sep 2009 14:26:23 +0000]
intptr fallout

some kernels don't have e.g. uintptr_t; revert this hunk for now.
also, autoconf as recent as what's in rhel5 has no macros. provide
some.

Reviewed-on: http://gerrit.openafs.org/553
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoUse readpage, not read for fastpath access
Simon Wilkinson [Tue, 14 Jul 2009 22:39:44 +0000]
Use readpage, not read for fastpath access

Modify the fast path case so that it uses readpage(), rather than read()
to access data in the cache. This removes a lot of the hidden, uncessary
work that the kernel was doing behind the scenes, and takes advantage of
the fact that we know a page read will always result in a page read
against the backing cache.

Reviewed-on: http://gerrit.openafs.org/535
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoirix compile fixes
Derrick Brashear [Tue, 29 Sep 2009 09:25:46 +0000]
irix compile fixes

fix compilation for irix (and warning for solaris) for icreate
as well as more stdint.h fixes

Reviewed-on: http://gerrit.openafs.org/548
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: Trace log smb_FindFID errors
Jeffrey Altman [Mon, 28 Sep 2009 14:58:25 +0000]
Windows: Trace log smb_FindFID errors

To assist with debugging, add consistent trace log messages for
smb operations that generate an error because smb_FindFID failed.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/545
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoOS Preference pane clean for final version
Claudio Bisegni [Tue, 29 Sep 2009 07:57:52 +0000]
OS Preference pane clean for final version

Has been removed from license file the reference to menucracker for hack NSMenuExtra, that is no more needed.

Reviewed-on: http://gerrit.openafs.org/547
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: cm_GetBuffer does not need to contact file server when extended a file
Jeffrey Altman [Mon, 28 Sep 2009 14:22:31 +0000]
Windows: cm_GetBuffer does not need to contact file server when extended a file

If cm_GetBuffer is being called in order to obtain a buffer to store
data beyond the end of the existing file as known to the file server
there is no reason to contact the file server.  Instead use the cached
status info in order to allocate a new buffer zero initialized.

This logic avoids triggering the FetchData bug in all file servers
older than 1.4.12 and 1.5.65 in which the file server returns a
large negative number (filesize - requested_offset) when a FetchData
is received where the requested_offset is larger than the filesize.
It also avoids unnecessary work.

LICENSE MIT

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

14 years agoWindows: Directories do not have a default stream
Jeffrey Altman [Mon, 28 Sep 2009 14:52:45 +0000]
Windows: Directories do not have a default stream

When enumerating streams for objects, do not offer a default stream
for directory objects (including mount points).

LICENSE MIT

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

14 years agoFormatting typo in vos_setfields manpage
Andrew Deason [Mon, 28 Sep 2009 15:14:23 +0000]
Formatting typo in vos_setfields manpage

The POD formatting code for bold is B, not b.

Reviewed-on: http://gerrit.openafs.org/546
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoDon't try to print the thread ID
Simon Wilkinson [Mon, 28 Sep 2009 14:21:21 +0000]
Don't try to print the thread ID

pthread_t is defined as being opaque - there's no way to portably
print it on a way that makes sense on all platforms. Remove this output.

Reviewed-on: http://gerrit.openafs.org/541
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix warnings in new dumptag code
Simon Wilkinson [Mon, 28 Sep 2009 14:50:20 +0000]
Fix warnings in new dumptag code

3f2dd80697959f5922032f4d4a7c9ef0cfadf35c contained a number of
new warnings. This patch fixes them.

It also adds the AFS_UNUSED_FUNCTION macro which can be used to
portably mark functions as unused.

Reviewed-on: http://gerrit.openafs.org/543
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>