if later callers will deem a volume offline, note it at attach time.
additionally, log the cause.
Change-Id: I4870e8f3bfd8d7e69e448d3a445be81435407f0f
Reviewed-on: http://gerrit.openafs.org/2448
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
the code refactoring missed this case. sadly, it means we
can panic under heavy vcache contention.
FIXES 127645
Change-Id: I41929df066b8e3d447ba72e77be6777a306b8bf8
Reviewed-on: http://gerrit.openafs.org/2449
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Make 'vos status' print the lastReceiveTime and lastSendTime in a
human-readable format, instead of just printing the number of seconds
since the epoch as an integer. As suggested by Jeffrey Altman.
Change-Id: I1348a45078e49ff631cb46323767f1c384a72084
Reviewed-on: http://gerrit.openafs.org/2338
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add a field in the 'vos status' output to report the last time a
transaction was touched by a volser RPC.
Change-Id: Ibfe11e16fc3d7f00134d840ec3ab9fb9263fbea1
Reviewed-on: http://gerrit.openafs.org/2337
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The 'created' field in 'vos status' output was being reported as
something else. Make 'vos status' actually report the time the
transaction was created in that field.
Change-Id: Ib890256f4b9f67cf0a37910dc3b3585eafdba4fc
Reviewed-on: http://gerrit.openafs.org/2336
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
salvage.c uses the Log() function defined by vol/common.c. At the
moment, this isn't defined in a way that we can easily grab its prototype,
so the code has an extern definition at the beginning. For now, just add
format checks to this definition.
Fix all of the fallout from this - we were casting to intptr, and
printing with %x - use AFS_PTR_FMT as nature intended.
Change-Id: I2110ebddbe207c307fcad00ab89e5818824a644d
Reviewed-on: http://gerrit.openafs.org/2446
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add format checking to the Log, LogError and LogDebug functions.
Fix the resulting type errors. One of these in particular is a
signficant bug, where we would try to print a hash table pointer
as a string.
Change-Id: I02d7bcd7ce63583d24dda4da40288af51a516583
Reviewed-on: http://gerrit.openafs.org/2445
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Fix the Log, Abort and Quit functions used by the vol package so
that they are all defined in a common header file, rather than
prototyped in each file which uses them.
Use the appropriate macros to flag those functions which never
return, and mark them all as taking printf style input.
Fix all of the callers which had mismatched format strings and
arguments.
Change-Id: I78194f623360e13f055f8f37b3558c08a70acd1f
Reviewed-on: http://gerrit.openafs.org/2444
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The changes to use the exportfs interface to access cache files
require that the exportfs module is loaded before our module.
In 'normal' operation depmod, and modprobe, would take care of
this for us, however our legacy installation format where we
ship the kernel module outside of /lib/modules stops modprobe from
working, and our init script uses insmod. So, explicitly load
exportfs first.
Note: I'm aware of just how much this sucks, and the fact that we
really should just tidy up all of the packaging and init scripts
around our kernel module - but this close to 1.6 branch is probably
not the time for those kinds of changes.
Change-Id: Icdc11482f4eb05419a806a2cd55852eaa5999638
Reviewed-on: http://gerrit.openafs.org/2443
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Rename configure.in and configure-libafs.in to use the *.ac extension
instead, which is preferred by current Autoconf versions for input
files to Autoconf. *.in can then be more consistently used for files
that are input into config.status.
Change-Id: I4d352560200e4dbb1a2dda3d5ab7c7c9a38b565f
Reviewed-on: http://gerrit.openafs.org/2437
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Russ Allbery <rra@stanford.edu>
Add a preprocessor for POD documentation that handles a custom
=include directive. Demonstrate how to use the preprocessor by
factoring out all the standard PTS options into a separate POD
fragment and including that fragment in all the PTS commands that
take the standard options instead of including that documentation
in each separate file.
Change-Id: If5255efc6d3fc670b38a9898b3d7d3c60af04fcf
Reviewed-on: http://gerrit.openafs.org/2440
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Remove obsolete configure options and document all remaining options
other than some provided by Autoconf and some that are currently not
very interesting.
Document that, on modern Linux systems, configure can find the kernel
build system and headers by itself and doesn't need the flag.
Include some more information in README about changing the default
installation paths, and mention that the da* versions of the file server
and volserver also aren't stripped.
Remove the generic GNU installation instructions, which aren't useful
for OpenAFS.
Change-Id: I56d0003ff0173749e9a5e04f1d0ed4d004787dfd
Reviewed-on: http://gerrit.openafs.org/2438
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The first argument to the git-version script should be the root
directory of the tree, not the .version file in that directory.
Change-Id: I145d360dc79132fc1474e94893c999b35774d874
Reviewed-on: http://gerrit.openafs.org/2433
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Now that we have a build-tools directory, move the various support
files used by Autoconf and Automake into it as well to reduce clutter
at the top level.
Change-Id: Ieae317524d5354e3a6168507c569378f7913b05f
Reviewed-on: http://gerrit.openafs.org/2432
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
in order to correctly generate KBUILD_MODNAME, each object
file needs to be built only once. in this case it matters because the
pr_debug macro, called as a result of including errqueue.h, needs it
and things which depend on it, and when it's built into 2 .kos,
the wrong thing happens.
Change-Id: I85be7a3322fd179ef75fe14a90c9e7592e542ed1
Reviewed-on: http://gerrit.openafs.org/2435
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This will need more comprehensive packaging work later, but in the
meantime, install the binaries so that make dpkg will complete
successfully.
Change-Id: Ic82feb92c05a3638365593c4e321ef5e45916ee2
Reviewed-on: http://gerrit.openafs.org/2429
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Debian packaging can deal with the full version number that we
generate using git-version, so base the version we put into
src/packaging/Debian/changelog on that version instead of the
LINUX_PKGVER that we use for other packaging.
Change-Id: Ibf50854748b2b588c2f971d6bdadd4f66f648c5b
Reviewed-on: http://gerrit.openafs.org/2428
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The source package we would get by running dpkg-buildpackage in the
source tree without further preparation is basically useless, since
it's a native source package for a non-native package and will contain
any random dirty cruft in the current source tree. Since the purpose
of make dpkg is to provide quick Debian packages for testing purposes,
only build the *.deb files and don't bother to build the source
package.
Change-Id: Ia2643c7e8936b15e3447df589ed0236438b8341e
Reviewed-on: http://gerrit.openafs.org/2427
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Fixes the duplicate run of make install during the package build
process and updates the changelog to the current Debian packages.
Change-Id: I20fa4cc24e17c3944de2b08e265e277ff5d5564f
Reviewed-on: http://gerrit.openafs.org/2426
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
0xffffffff is a bad representation for -1 when the size of the data
type may vary. Rather than forcing everything to 32 bits and losing
later on platforms with 64-bit time_t, change the table to use time_t
and try to add a cast that will do the right thing.
Change-Id: Id532c9b7a1fc215dc9fd532592fecb2ea45597a0
Reviewed-on: http://gerrit.openafs.org/2420
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Currently RX lists all non-127.0.0.1 interfaces in the interface list,
even those that are specified as IFF_LOOPBACK, to accomodate certain
special cases where IFF_LOOPBACK interfaces should be advertised.
However, this makes us advertise e.g. a 127.0.0.2 lo interface. So
instead, skip all interfaces that are both in 127/8 and claim they are
IFF_LOOPBACK, as this will skip a stray 127.0.0.2, but should not
confuse the special cases.
Change-Id: I60a4ed5330252078e2f58894195f9b68ec70dcfa
Reviewed-on: http://gerrit.openafs.org/2376
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Many places treat loopback addresses specially; they are skipped over
when traversing local interface lists, and they are sometimes replaced
with the public IP of the local hostname when interpreting user
arguments.
However, we only treated 127.0.0.1 as 'loopback'. Many systems can
have more than one loopback interface, such as having an interface
with the address 127.0.0.2. So, to catch these, treat everything in
127.0/16 as a loopback address or otherwise 'invalid' address. We
still do not treat the rest of 127/8 like this, to still allow some
127.* addresses to not be treated as loopback if someone really wants
to.
Change-Id: I64724cc1ee366e5ef80a8d6e3008e30a7077a4b2
Reviewed-on: http://gerrit.openafs.org/2367
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
If no configure flags are given, build the FUSE afsd iff FUSE is
found. If --enable-fuse-client is explicitly given, always try to
build the FUSE client and abort if FUSE libraries could not be found.
Change-Id: Icc0d5bbb03239470ad856d87bca600304f030591
Reviewed-on: http://gerrit.openafs.org/2419
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
getsockopt expects an int pointer as the size parameter, both in
the kernel version and our replacement compat inline function, which
causes warnings because we give it a size_t pointer.
Use an int variable instead.
Change-Id: Ide77ac01610c2f32f87d833c0d130c79007a1a33
Reviewed-on: http://gerrit.openafs.org/2417
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The servers like to log the command line it was invoked with.
It does this by concatenating its arguments, separated by spaces,
into a 150-character buffer on the stack of main(). That's just
wrong. Use a dynamically-allocated buffer instead.
Change-Id: Ibe398e5f449eec176f11f301090a1b68ef13e94b
Reviewed-on: http://gerrit.openafs.org/2275
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
There's an unused variable in the pmtu code in rx_user.c.
Remove the "offender".
Change-Id: I869b317d7e31b0f70b71f3e9ea2a0e0209709fcb
Reviewed-on: http://gerrit.openafs.org/2415
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Provide a runtime flag to the DAFS fileserver to allow for
fast-restart-like behavior for DAFS. Call the flag -unsafe-nosalvage, and
document it, warning against its use.
Change-Id: I342c58745b7e2e1d1a2066b4fb08941b02c660f9
Reviewed-on: http://gerrit.openafs.org/2277
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Check to see if we need to explicitly include a library in order
to get the crypt() function
Change-Id: I9bd1d70e420d4d1656bd86cd3215525102fa6259
Reviewed-on: http://gerrit.openafs.org/2404
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This update now builds shared library packages for the libafsauthent
and libafsrpc shared libraries. It should also fix problems with
make dpkg due to debian/changelog being deleted on make distclean.
Change-Id: I14ce0633edc1f0cc9e081eb7383b2f1e7bfc729f
Reviewed-on: http://gerrit.openafs.org/2405
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
if we can get a socket error to let us get pmtu discovery info,
use it.
Change-Id: I7756c1a00e6cb018146a5b0545bed828446e5483
Reviewed-on: http://gerrit.openafs.org/2400
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
old enough sunpro c won't be c99, and doesn't define
a macro when it is c99. since there's no way to tell, be safe.
Change-Id: Ib60ead7b702fe3ab203de83456d0f126afecc1ec
Reviewed-on: http://gerrit.openafs.org/2411
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
old enough sunpro c won't be c99, and doesn't define
a macro when it is c99. since there's no way to tell, be safe.
Change-Id: I1709827872b03c5365d9bb26b0ce9d86f038d882
Reviewed-on: http://gerrit.openafs.org/2410
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
It's pointless to have make dpkg build the tree before running the
Debian build rules, since the Debian build rules are just going to
build the tree again.
Change-Id: I2481b20a5ca23f8cb067ba609d4d3acd58738cc4
Reviewed-on: http://gerrit.openafs.org/2406
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
if we're flex, we may need to be lex-compatible. engage
it if we're flex
Change-Id: If9a39ca0bce3f4a68b742d1e8f0c679d3f79896e
Change-Id: I7f245d579bcc46fdd0aa7202bbd45f3f9f647ebc
Reviewed-on: http://gerrit.openafs.org/2399
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
libafsauthent includes auth/cellconfig.c, which uses res_search, so it
requires -lresolv even if it isn't needed for gethostbyname. Add
LIB_AFSDB to the link line for libafsauthent.
Change-Id: Id83ceb8b261b8c7fb176e24cc138276282608513
Reviewed-on: http://gerrit.openafs.org/2408
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
libafsauthent includes auth/cellconfig.c, which uses res_search, so it
requires -lresolv even if it isn't needed for gethostbyname. Add
LIB_AFSDB to the link line for libafsauthent.
Change-Id: I4dafdf83db9a00e4e30bff7c59357c13bf7af961
Reviewed-on: http://gerrit.openafs.org/2402
Tested-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jason Edgecombe <jason@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
supporting disconnected in ukernel uncovered this
warning from lack of a prototype
Change-Id: I81d287a8e4466270906fe67f8a1f2f6406fec430
Reviewed-on: http://gerrit.openafs.org/2401
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
can't eject the ifdef yet as this is not fully portable now.
however, just enable it always.
Change-Id: Ia7a49a10377f308740ebd42027ac9748b073016e
Reviewed-on: http://gerrit.openafs.org/2396
Tested-by: Jason Edgecombe <jason@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>