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>
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>
Partially revert b1eb6a7a3f, 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>
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>
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>
'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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>