install-man is a config.status-generated script, so Autoconf will
substitute in the path to our install-sh script, but Autoconf prefers
relative paths that are only valid in the directory in which
install-man is generated. We therefore must avoid changing directories
before calling install-man.
Instead of cd, use relative paths including the directory and adjust
the installation path accordingly.
Andrew Deason [Wed, 21 Jul 2010 16:34:39 +0000 (11:34 -0500)]
libafs: fix IOPEN for amd64 solaris
Solaris afs_syscall_iopen was returning the fd in r_val2 for 64-bit
architectures (for 5.7 and beyond). If we are little-endian, though,
we want the return value in r_val1; otherwise we just always return fd
0. So, put the fd in r_val1 if we are little-endian.
Andrew Deason [Tue, 20 Jul 2010 17:46:00 +0000 (12:46 -0500)]
ubik: Make ugen_ClientInit honor noAuthFlag
ugen_ClientInit was still trying to use tokens to make an
authenticated connection, even if noAuthFlag was set. Make it so we do
not attempt authenticated connections with noAuthFlag, and suppress
the "Could not get afs tokens" message if noAuthFlag was set.
Andrew Deason [Tue, 20 Jul 2010 17:32:10 +0000 (12:32 -0500)]
bos: Do not assume DAFS just if DAFS bnode exists
For salvaging purposes, we were assuming that if a DAFS bnode existed,
we should perform a DAFS salvage. Since it is possible to have a
disabled DAFS bnode alongside an enabled non-DAFS fs bnode, we should
perform a regular non-DAFS salvage if the DAFS bnode is disabled. Do
that.
Andrew Deason [Tue, 20 Jul 2010 17:06:57 +0000 (12:06 -0500)]
bozo: Clean up bnode parms for each bnode
bosserver was remembering the parms for past bnodes, and just
overwriting parms for new bnodes. This is a problem if we have a
'dafs' bnode followed by an 'fs' bnode, since the 'fs' bnode will get
the 'dasalvager' parm, and bosserver will think it is its scanner
program.
So instead keep track of a separate array of the parms that we
actually pass to bnode_Create, so we only pass parms that we saw for
this specific bnode.
Andrew Deason [Tue, 6 Jul 2010 17:42:40 +0000 (12:42 -0500)]
vos status: report human-readable last*Time
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.
Andrew Deason [Tue, 6 Jul 2010 17:36:27 +0000 (12:36 -0500)]
vos status: actually show created time
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.
Simon Wilkinson [Sat, 17 Jul 2010 17:23:30 +0000 (18:23 +0100)]
dir: Add printf format checks to log
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.
Simon Wilkinson [Fri, 16 Jul 2010 22:20:27 +0000 (23:20 +0100)]
vol: Fix logging functions
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.
Simon Wilkinson [Fri, 16 Jul 2010 20:58:33 +0000 (21:58 +0100)]
Linux: Load exportfs first
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.
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.
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.
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.
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.
Marc Dionne [Thu, 15 Jul 2010 02:43:01 +0000 (22:43 -0400)]
afspag version of rx_knet.o
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.
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.
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.
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.
Andrew Deason [Thu, 8 Jul 2010 20:59:58 +0000 (15:59 -0500)]
RX: ignore all local 127/8 IFF_LOOPBACK interfaces
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.
Andrew Deason [Thu, 8 Jul 2010 15:56:28 +0000 (10:56 -0500)]
Treat all 127.0/16 addresses as loopback
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.
Rewrite FUSE macro to skip FUSE if not found unless --enabled
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.
Marc Dionne [Wed, 14 Jul 2010 13:52:03 +0000 (09:52 -0400)]
Linux: use an int pointer for the size argument to getsockopt
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.
Don't overflow a buffer on the server's stack at startup
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.
Andrew Deason [Fri, 25 Jun 2010 22:02:54 +0000 (17:02 -0500)]
Add -unsafe-nosalvage fileserver option
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.
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.
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.
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.
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.
DAFS: variable declarations in C must be a top of block
Two instances of variable declarations not being present
at the top of a code block in src/vol/volume.c when building
with AFS_DEMAND_ATTACH_FS. Fix them.
Add a "check" rule to each of the docbook directories
that uses xmllint.exe (from Cygwin) to validate the
docbook source against the DTD. Validation failures
will halt the build.
Michael Meffie [Mon, 19 Apr 2010 14:00:52 +0000 (10:00 -0400)]
viced: host hash address collisions
Attempt to resolve collisions when adding a host to the
address hash table and another host with the same address:port
is already present in the hash table. Retrieve the uuid for
the host at that address and if the uuid matches the new host
and not the old, remove the address from the old host and
install the new host into the address hash.
Change-Id: Id182f907f63be556c61ffb91777edd35f0aa950d
Reviewed-on: http://gerrit.openafs.org/1786 Reviewed-by: Andrew Deason <adeason@sinenomine.net> Tested-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
Andrew Deason [Thu, 8 Jul 2010 21:40:07 +0000 (16:40 -0500)]
GetInodeSummary: free inode info
In the salvager, GetInodeSummary stores some information about the
relevant inodes into a file. Free the memory for that information
after it's been written out, since we don't reference that memory
again.
Matt Benjamin [Thu, 24 Jun 2010 13:07:36 +0000 (09:07 -0400)]
An RPC test dispatch library for vice
A library framework for remote testing against file servers,
with the ability to establish multiple call/callback channel
pairs within a single test process and dispatch requests
arbitrarily on each. Thanks to Derrick for design and debugging
help. Additional callback processing intelligence will follow
in a future changeset. This version builds on Windows NT (but
might need further adjustment).
Simon Wilkinson [Sat, 10 Jul 2010 19:30:31 +0000 (20:30 +0100)]
Linux: Actually use freezer compatibility func
We were calling try_to_sleep, rather than afs_try_to_sleep. Whilst
try_to_sleep is present in all modern Linux kernels, on some older
systems we need to fall back to our own implementation, which is
what the afs_try_to_sleep function should do, but it can only do so
if we call it.
Simon Wilkinson [Sat, 10 Jul 2010 19:17:56 +0000 (20:17 +0100)]
Linux: Use freezer compatibility macros in RX
Commit eef18466d920985c37ed8d22a6557b609c6225a6 introduced some
compatibility macros for the refridgerator functionality. Use these
in the Linux kernel RX code, rather than rolling our own.
Autoconf apparently doesn't care because it runs it explicitly under
a shell, but it's sometimes useful to run it manually to check
something. Plus, executable shell scripts should be executable on
general principles.
Andrew Deason [Wed, 7 Jul 2010 20:43:26 +0000 (15:43 -0500)]
Use afs_sfsize_t for *_SIZE results
Callers of FDH_SIZE and OS_SIZE should be storing the results in an
afs_sfsize_t. Some were using regular 'int's and other things, which
can screw up if the file is sufficiently large.
Ben Kaduk [Fri, 9 Jul 2010 04:38:16 +0000 (00:38 -0400)]
Remove incorrect critical section use in dnlc_lookup
Critical sections may not be used with (non-spin) locks. As such,
this code was wrong, and led to a panic.
We don't see why there what synchronization they may have been
providing, so just remove them and do not replace them.
Michael Meffie [Thu, 8 Jul 2010 18:45:22 +0000 (14:45 -0400)]
build fix on older linux
The commit d0abe56aa47d4561ba57527d53a2b0db2ea613c2 added
a duplicate inclusion of freezer.h. Older versions
of linux (circa 2.6.20) are missing include guards
on freezer.h.
Andrew Deason [Fri, 2 Jul 2010 19:28:29 +0000 (14:28 -0500)]
Fix VPrintDiskStats_r logging
VPrintDiskStats_r tried to log some information using separate Log()
statements on the same line. This looks very odd when logged, since we
add a timestamp to every Log() call these days. Fix it to print the
line as one call to Log().
Ben Kaduk [Thu, 8 Jul 2010 02:10:44 +0000 (22:10 -0400)]
Fix build
Previous commit to this file was not as tested as we thought.
This one actually builds (well, except for the part where flex
doesn't like et_lex.lex.l at the moment).
Ben Kaduk [Thu, 8 Jul 2010 00:47:55 +0000 (20:47 -0400)]
FBSD: sync with NFS for *pages vnops
We've had per-cpu counter variables for a while, use the proper
macros to adjust them.
FBSD90 has had the page queue locks pushed down a level, so we
don't need to lock them and should lock individual pages instead.
This fixes mmap() on FreeBSD HEAD.
Andrew Deason [Wed, 7 Jul 2010 17:52:10 +0000 (12:52 -0500)]
klog: refactor klog_prompter
The ifdefs in klog_prompter were getting a bit confusing. Split out
some logic into a separate "is this prompt a password prompt"
function. As a result, we can build without KRB5_PROMPT_TYPE_PASSWORD
defined, which happens to be the case on hp_ux11i.
Change-Id: I1d5f794bfc33017f699478e367cde91a3e77d33c
Reviewed-on: http://gerrit.openafs.org/2353 Tested-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
kernel InitPeerParams has bogus branching and dup code
several of the mtu configuration cases for the kernel version
of InitPeerParams were bogus. clean up the function.
(a forthcoming change reworks this anyway, but..)