When compiling src/bubasics/bumon.ss.c a warning would be produced
due to an rx_call* being passed into BC_Print which in its client
form requires an rx_connection*. The server implementation and client
stub each were called BC_Print because there was no server prefix
specified in bumon.xg. Add prefix 'S' and update bucoord/server.c
to match.
Reviewed-on: http://gerrit.openafs.org/686
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
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>
The FetchStore refactoring was causing the result from rx_EndCall to
be discarded. This change will cause that to be returned to the caller
if rx_Error() returns 0
Reviewed-on: http://gerrit.openafs.org/687
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Writepage has a return path which returns an error with a locked
page. However, all returns that are not AOP_WRITEPAGE_ACTIVATE must
unlock their pages - using this codepath would leave a stray page lock,
which would eventually hang the machine.
The logic behind the -EIO return was also incorrect. In the Linux page
cache model, truncates simply reduce the size recorded in the inode. If
there are pages pending writeback then they may still have writepage() called
upon them - it's up to the writepage routine to discard the write
request (rather than returning an error)
Reviewed-on: http://gerrit.openafs.org/685
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
There are a couple more unlink() calls in vol-salvage.c that were using
relative paths. Fix them to use absolute paths and to log a warning if
the unlink() fails.
Reviewed-on: http://gerrit.openafs.org/684
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The Network Identity Manager plug-in for OpenAFS replaces
afscreds.exe for token management. However, unlike afscreds.exe,
the plug-in did not indicate the status of AFS tokens using an
icon in the notification area.
This patch adds a token status icon to the plug-in so that while
the plug-in is used, a familiar padlock icon in the notification
area will indicate the status of tokens as well as the OpenAFS
service.
There are four possible states indicated by the icons:
- No tokens: indicated by a padlock with a bright red 'X' beside
it.
- At least one valid token: indicated by a normal padlock.
- Service is not running: indicated by a grayed out padlock with
a black square beside it.
- Service error: indicated by a padlock broken in half.
The 'Service error' state means that the OpenAFS client service
is technically running (as reported by Windows), but is not
responding to requests.
In addition to the icon, hovering the mouse cursor over the icon
will show details about the current state (such as the list of
cells for which valid tokens exist) and the version of OpenAFS
running on the machine.
Reviewed-on: http://gerrit.openafs.org/683
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Resolved the bug that prevented to show the link description after it was added.
Now the table is refreshed at any operation(add/remove).
Reviewed-on: http://gerrit.openafs.org/682
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Now the OpenAFS preference pane is compiled with 32 and 64 bit snowleopard support, so the preference
windows is no more restarted in 32 bit mode.
The tab for symbolic link creation has been implemented. Now the user can create and delete link.
For create a link both name and destination path must be set. AFSBackgrounder has been updated to
manager in a separate thread the link creation and destroy operation, according to the vaule of
checkbox "Enable Symbolic Link" in "Mounts" tab.
Reviewed-on: http://gerrit.openafs.org/677
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Prototype encode_krb5_enc_tkt_part in aklog_main.c, since it is a
private interface so we don't get a prototype from the krb5 headers.
Reviewed-on: http://gerrit.openafs.org/680
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
state_analyzer.c assumes subtracting two char*s will result in an
unsigned int, which can cause warnings. Lacking a portable format
specifier, just use %ld and cast to long.
Reviewed-on: http://gerrit.openafs.org/681
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
fsprobe/fsprobe.c and kauth/ka-forwarder.c were trying to print size_t's
without using AFS_SIZET_FMT. Fix that.
Reviewed-on: http://gerrit.openafs.org/678
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Prototype ka_log in kauth/kalog.h to prevent warnings. While we're at
it, only prototype kalog_log and kalog_Init when they actually get
implemented.
Reviewed-on: http://gerrit.openafs.org/679
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Currently, in various places in src/volser/, we log/print an error
message when some disk i/o error occurs, but we don't log what error was
returned. Log that little bit more info to make debugging easier in some
cases.
Reviewed-on: http://gerrit.openafs.org/671
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Resolve more minor warnings from the kauth directory.
*) kaux_read takes an unsigned for the number of failures
*) The COUNT_REQ macro generates an unused variable (this_op)
*) kas is missing some headers
*) Add some more prototypes to kauth_internal.h
*) Add the standard boilerplate to kauth_internal.h
*) recvfrom takes a socklen_t * as its 6th argument
This make kaprocs.c, kaauxdb.c, kas.c, klog.c, and ka-forwarder.c
warning clean. Mark them as such.
Reviewed-on: http://gerrit.openafs.org/673
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This change tidies up after the recent slew of warning reduction. It
updates README.WARNINGS to reflect the current state of the tree,
disables warnings for a couple of files that are now warning clean,
and ensures that the libuafs and libafsrpc Makefiles match the state
of the rest of the tree in terms of which warnings are enabled.
Reviewed-on: http://gerrit.openafs.org/672
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Building with --enable-demand-attach-fs requires that ranlib -c be
used on Leopard (it is already the default for Tiger)
Reviewed-on: http://gerrit.openafs.org/676
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
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>
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>
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>
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>
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>
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>
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>
Commit db949b7fad 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This reverts commit 6133d25397.
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>
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>
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>
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>
Commit 906403c6d7 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>