openafs.git
11 years agomake install fixes for libraries
Marc Dionne [Sat, 15 Sep 2012 20:02:26 +0000]
make install fixes for libraries

Don't install several libraries that have dependencies that are
not currently installed, but install static libraries.

Fix rule for libafsauthent_pic.a to get the library from .libs

Change-Id: I746b111edf8a6d94ad98fcf235e34b4dac1eb050
Reviewed-on: http://gerrit.openafs.org/8123
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agorxkad: silence unused variable warnings in v5gen.c
Marc Dionne [Sat, 15 Sep 2012 17:53:06 +0000]
rxkad: silence unused variable warnings in v5gen.c

Sprinkle AFS_UNUSED attributes where the compiler complains
about unused variables.

Note that this file is assembled from code generated by the heimdal
source.  A similar fix exists in the generator code upstream, so
when the file is re-generated in the future it should not be
necessary to re-apply this.

Change-Id: I2ef407428d90157050481d5630f6f22510d65ca3
Reviewed-on: http://gerrit.openafs.org/8122
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agotests: Convert opr tests to use libtool
Simon Wilkinson [Sun, 16 Sep 2012 18:54:48 +0000]
tests: Convert opr tests to use libtool

Avoid the problems with libopr's dependencies by just converting
the tests to use the libtool version of the opr library. While we're
at it, make the tests pthreaded too.

Change-Id: I4e570b288ea57c758c848be1d545e5ee59771ab9
Reviewed-on: http://gerrit.openafs.org/8127
Reviewed-by: Jason Edgecombe <jason@rampaginggeek.com>
Tested-by: Jason Edgecombe <jason@rampaginggeek.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoSplit up libtool support into LWP and pthread
Simon Wilkinson [Sun, 16 Sep 2012 14:39:25 +0000]
Split up libtool support into LWP and pthread

Currently, the type of library you build is determined by whether
the library is build in a pthread, or an lwp build directory. However,
this prevents building an LWP library in a directory that builds
pthreaded clients and servers.

As we want to continue to provide LWP libraries for backwards
compatibility, but move over to pthreaded binaries, this causes
some issues.

So, split up the libtool logic, so we have Makefile.libtool, which
you include if you want to build a pthreaded libtool library, and
Makefile.lwptool, for building a library which supports LWP and
pthreaded use. These only affect how .lo files are built - so the
.o files used for non-library objects are managed with the
Makefile.pthread and Makefile.lwp includes as before.

Change-Id: Ib1af48342253230abab9056eb15a3f79bd77a6de
Reviewed-on: http://gerrit.openafs.org/8126
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agotests: Fix volser Makefile
Simon Wilkinson [Sun, 16 Sep 2012 16:48:08 +0000]
tests: Fix volser Makefile

The volser Makefile had a bad path for liboafs_util, and was still
directly pulling in some objects from the fileserver build. Fix it
so that it uses proper libraries.

Change-Id: Ic36c6a0f93c299bd04d48fa4238c4da5cbc571d4
Reviewed-on: http://gerrit.openafs.org/8125
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jason Edgecombe <jason@rampaginggeek.com>
Tested-by: Jason Edgecombe <jason@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agolibafsauthent: fix parallel build
Marc Dionne [Fri, 14 Sep 2012 23:23:55 +0000]
libafsauthent: fix parallel build

Same logic as ee18ccbe - we have to avoid building libafsauthent.la
and libafsauthent_pic.la at the same time.  Add a dependency to
force make to build them in sequence.

Change-Id: I4b341d7688a249e0067c3917909259c813f26717
Reviewed-on: http://gerrit.openafs.org/8121
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoFreeBSD major version numbers are multi-character
Ben Kaduk [Thu, 13 Sep 2012 21:28:17 +0000]
FreeBSD major version numbers are multi-character

Do not assume that there is only a single character before the dot.

Change-Id: I45169a6faa5dbeafc4f9c57deaaad96bef8de613
Reviewed-on: http://gerrit.openafs.org/8106
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoopr: Libtool archive should depend on symbol file
Simon Wilkinson [Fri, 14 Sep 2012 10:42:56 +0000]
opr: Libtool archive should depend on symbol file

There should be a dependency between the libtool archive
liboafs_opr.la and the symbol map for the archive
(liboafs_opr.la.sym) so the archive is rebuilt if symbols are added
to, or removed from, the map file.

Change-Id: Ifb0cd0a8abaa4c9b476c53cf186458ec0b8f8778
Reviewed-on: http://gerrit.openafs.org/8107
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoafsd: Add missing variable for Solaris
Simon Wilkinson [Wed, 12 Sep 2012 09:59:16 +0000]
afsd: Add missing variable for Solaris

The Solaris 11 syscall code was missing a definition for the
'error' variable

Change-Id: Ia9a678435203994e1791824954d8c28c3cdefe17
Reviewed-on: http://gerrit.openafs.org/8103
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>

11 years agolibafs*: Don't re-export opr/util functions
Simon Wilkinson [Wed, 12 Sep 2012 09:20:43 +0000]
libafs*: Don't re-export opr/util functions

On Solaris, a library can't re-export functions which come from one
of its dependencies - so libafsrpc can't easily republish the 5 opr
functions that are currently in the libafsrpc map file.
Including the bits of the opr library that define these functions
causes problems with then linking libafsrpc against libopr, which
we do in a number of places.

libafsauthent has exactly the same problem, with a few symbols that
it pulls in from util.

The affected symbols were all added relatively recently, and have
limited uses outside of the OpenAFS tree, so just remove them from
the export list so we are one step closer to building on Solaris
again.

Change-Id: If0a1105320e416ebc013ff670dddd5d247b06f6b
Reviewed-on: http://gerrit.openafs.org/8102
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoStop using libafsauthent
Simon Wilkinson [Fri, 31 Aug 2012 11:18:21 +0000]
Stop using libafsauthent

Change-Id: Ieead3704e3210a1d88500ad1efa15bd2cad93bf6
Reviewed-on: http://gerrit.openafs.org/8098
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>

11 years agolibafsauthent: Build with libtool
Simon Wilkinson [Fri, 31 Aug 2012 10:13:06 +0000]
libafsauthent: Build with libtool

Construct the libafsauthent library with libtool. All libraries
contributing to libafsauthent provide a libauthent_<library>.la
convenience library, which we use libtool to combine into shared
and static versions of libafsauthent.

Change-Id: I76fa61eb027862eab730c4c86ab74a7b7e03c13b
Reviewed-on: http://gerrit.openafs.org/8097
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoopr: Add hcrypto to the library list
Simon Wilkinson [Wed, 12 Sep 2012 05:53:24 +0000]
opr: Add hcrypto to the library list

uuid needs hc_RAND_bytes, which means that liboafs_opr has a dependency
on hcrypto (and, until hcrypto is libtooled, on libroken as well). Make
this dependency explicit.

Change-Id: I748a43f7a2125c12b566502580e149ad1d9c1164
Reviewed-on: http://gerrit.openafs.org/8101
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoptserver: Fix parallel builds
Simon Wilkinson [Wed, 12 Sep 2012 05:51:08 +0000]
ptserver: Fix parallel builds

It's not safe to have libtool building a blah.lo at the same time as
gcc is building blah.o. A Makefile must exclusively use either the .lo
or the .o form.

Fix ptserver so that ptint.xdr.lo is the only one referenced, and just
explicitly pull in the LWP object for the ptserver.

Change-Id: I2e868d2d318c84e20bcccc0ffc462c87e4b7a2f2
Reviewed-on: http://gerrit.openafs.org/8100
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agokauth: Use libtool
Simon Wilkinson [Thu, 30 Aug 2012 11:41:04 +0000]
kauth: Use libtool

Modify the kauth directory so that we use libtool to build its library.
Unlike most of our other directories, kauth has few pthreaded consumers
within the tree, so the libtool library itself is currently unused. The
libtool conversion is done as a stepping point for libafsauthent, which
does include kauth objects.

At the same time, we take the opportunity to modify kaserver so that it
uses libkauth, rather than referencing the library objects directly

Change-Id: I9d261686753b30c415f767603d44c7ce6e10eed1
Reviewed-on: http://gerrit.openafs.org/8095
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agovolser: Use libtool
Simon Wilkinson [Tue, 28 Aug 2012 19:10:04 +0000]
volser: Use libtool

Change-Id: Ic70476aa7258d12aafa7b06ae380012f040c65b6
Reviewed-on: http://gerrit.openafs.org/8094
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agovlserver: Use libtool
Simon Wilkinson [Tue, 28 Aug 2012 07:18:45 +0000]
vlserver: Use libtool

Change-Id: I030ec62db64b6dab856d520e68d5d727cd7b8bb3
Reviewed-on: http://gerrit.openafs.org/8093
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoacl: Use libtool
Simon Wilkinson [Thu, 23 Aug 2012 21:58:20 +0000]
acl: Use libtool

Change-Id: I589fc4d9b12bb23a34ef9145cd699e9ea2c4f496
Reviewed-on: http://gerrit.openafs.org/8092
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoptserver: Use libtool to build a pthreaded libprot
Simon Wilkinson [Thu, 23 Aug 2012 21:18:49 +0000]
ptserver: Use libtool to build a pthreaded libprot

Use libtool to build a pthreaded version of libprot in src/ptserver.
Make the tptserver directory just build pthreaded versions of the
client and server, and link these against libprot

Change-Id: Idc43de8c548f38584e78b35f9f1ecba3eb4b74d2
Reviewed-on: http://gerrit.openafs.org/8091
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoubik: Use libtool
Simon Wilkinson [Thu, 23 Aug 2012 20:35:35 +0000]
ubik: Use libtool

Use libtool to build LWP and pthreaded versions of the ubik library.
Both versions are built in the src/ubik directory. src/tubik is modified
to only build pthreaded versions of the ubik test commands.

Replace use of libubik_pthread.a with the libtool generated library.

Change-Id: Id441fe00dbe801e38a108600bfbe06c292383872
Reviewed-on: http://gerrit.openafs.org/8090
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agolibafsrpc: avoid concurrent libtool
Marc Dionne [Tue, 11 Sep 2012 00:49:19 +0000]
libafsrpc: avoid concurrent libtool

libtool gets confused if it is running two instances in the same
directory, so make sure we build libafsrpc.la and libafsrpc_pic.la
one after the other.

Change-Id: Idfd16b1f4e1efe07822a300df798bf05e2df6bcd
Reviewed-on: http://gerrit.openafs.org/8086
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>

11 years agocmd: exit status zero from -help
Michael Meffie [Tue, 11 Sep 2012 12:59:13 +0000]
cmd: exit status zero from -help

Return of an exit status of zero when running commands with -help,
instead of returning an error. By general convention, and in
previous versions, tools do not not treat -help as an error.

The AFS::Command perl modules, use -help as an introspection
technique, and fail when commands run with the -help option returns
non-zero.

Change-Id: I6ecd95f6ccd07218a2657dbb4dbf1c13599159f4
Reviewed-on: http://gerrit.openafs.org/8087
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agoauth: Use libtool
Simon Wilkinson [Thu, 23 Aug 2012 19:48:21 +0000]
auth: Use libtool

Use libtool to build a pthreaded version of the auth library

Change-Id: I452773e7fa159c278f5a7a7d21e77b6dd44c14bd
Reviewed-on: http://gerrit.openafs.org/8089
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoaudit: Use libtool
Simon Wilkinson [Wed, 22 Aug 2012 11:59:30 +0000]
audit: Use libtool

Convert audit into a libtool library

Change-Id: Ie95539596deb2cda2959f5c5ab822d291c08acc0
Reviewed-on: http://gerrit.openafs.org/8088
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoStop using libafsrpc
Simon Wilkinson [Wed, 22 Aug 2012 12:13:15 +0000]
Stop using libafsrpc

Instead of using libafsrpc.a in the pthreaded server directories,
use the libtool library variants instead.

Change-Id: I4cdbaf5a060b3e5aa82fb0d79535cb4fdc850bcf
Reviewed-on: http://gerrit.openafs.org/8074
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoadd a simple backport policy to README.GIT
Ken Dreyer [Mon, 10 Sep 2012 17:20:26 +0000]
add a simple backport policy to README.GIT

This will clarify where patches should go, and who can do backports.

Change-Id: Ie3efa6522382ea0cabc5847dbc1d75d59b04a403
Reviewed-on: http://gerrit.openafs.org/8075
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoaix: add atomic support
Derrick Brashear [Mon, 10 Sep 2012 18:43:08 +0000]
aix: add atomic support

aix has an atomic facility. add support for it.

Change-Id: Iaf1305fbafe1c0d7f0d22f14babfbea382c0b32d
Reviewed-on: http://gerrit.openafs.org/8076
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agolibafsrpc: Assemble with libtool
Simon Wilkinson [Wed, 22 Aug 2012 08:46:24 +0000]
libafsrpc: Assemble with libtool

Use libtool to assemble the libafsrpc shared and static libraries
from objects built with libtool in each of the directories that
contribute to the library (fsint, rx, rxkad, comerr, util, rxstat,
sys and lwp).

Each source directory controls which objects are built into the shared
library by making a libafsrpc_<dir> libtool convenience directory. These
convenience directories are then merged together to produce the
libafsrpc library.

Change-Id: I330aeb8df4c237b408a298826363eea7357339ce
Reviewed-on: http://gerrit.openafs.org/8072
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoopr: build and install pic library correctly
Derrick Brashear [Mon, 10 Sep 2012 01:42:09 +0000]
opr: build and install pic library correctly

previously we installed the same library as both the normal and pic variants.
tweak to build a pic version also.

Change-Id: I6b197d43184a9aa23aa65de663f8f5f08d486912
Reviewed-on: http://gerrit.openafs.org/8073
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoDon't explicitly build and link rx_pthread.o
Simon Wilkinson [Wed, 22 Aug 2012 11:45:43 +0000]
Don't explicitly build and link rx_pthread.o

A number of pthreaded directories explicitly build, and link, with
rx_pthread.o, in order to be able to send RX 'dpf' debugging messages
to the server log, rather than to stderr.

However, this direct linking causes build failures on some platforms,
because we end up linking in a version of rx_pthread.o, twice and both
versions contain identical linker symbols.

As this functionality is only used for debugging, just get rid of the
additional object.

Change-Id: I6126891db2dcbc289f6a9f7b99c01d6af7a19089
Reviewed-on: http://gerrit.openafs.org/8071
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agofsint: Move to using libtool
Simon Wilkinson [Wed, 22 Aug 2012 08:39:59 +0000]
fsint: Move to using libtool

Move the fsint directory over to building a libtool library
(liboafs_fsint). Because libtool requires that libraries have no
unresolved dependencies, we cannot include the server side stubs in
the libtool library.

Change-Id: Ia3f009680ac510f522b806366985e557cd6e4219
Reviewed-on: http://gerrit.openafs.org/8070
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agolwp: Build a pthreaded compat library with libtool
Simon Wilkinson [Thu, 24 May 2012 21:08:45 +0000]
lwp: Build a pthreaded compat library with libtool

The majority of the LWP directory isn't used by pthreaded applications.
However, there are three files - fasttime.c, lock.c and waitkey.c which
are used within pthreaded code.

Eventually, these should live somewhere other than the LWP directory.
For now, just build a small pthreaded library to hold them, so we
can finish up with the libtool work before considering how to move
this code elsewhere.

Change-Id: I66281f7cd838c048fd982bbd0f756a16a10862d1
Reviewed-on: http://gerrit.openafs.org/8069
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agorxstat: Use libtool
Simon Wilkinson [Thu, 24 May 2012 20:57:55 +0000]
rxstat: Use libtool

Change-Id: I4fd533691cf191b37c1f80038651b45efd142133
Reviewed-on: http://gerrit.openafs.org/8068
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agorxkad: Add a libtool library
Simon Wilkinson [Thu, 24 May 2012 10:55:26 +0000]
rxkad: Add a libtool library

Add liboafs_rkxad.la, a libtool version of librxkad.a

Change-Id: I414dada02d202d8bdba4234f92d445b560dbb297
Reviewed-on: http://gerrit.openafs.org/8065
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agorxkad: Use rxi_Alloc not osi_Alloc
Simon Wilkinson [Sun, 9 Sep 2012 09:19:53 +0000]
rxkad: Use rxi_Alloc not osi_Alloc

rx exposes the rxi_Alloc function to be used for memory allocation
in security classes, not osi_Alloc which is private. Using rxi_Alloc
means that allocations are counted in the general rx statistics.

Modify rxkad so that it uses rxi_Alloc. This also restores symmetry
in the allocator - the memory that's allocated by rxkad_server is
already freed using rxi_Free in rxkad_DestroyConnection

Change-Id: I3321355f2470974d3570dd911f06ea91c21d1c9d
Reviewed-on: http://gerrit.openafs.org/8067
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agocomerr, cmd, opr: fix library install targets
Marc Dionne [Sat, 8 Sep 2012 19:43:17 +0000]
comerr, cmd, opr: fix library install targets

Fix a couple of issues in the install targets following the libtool
changes:
- don't install liboafs_comerr or liboafs_opr, they're not ready to
be exposed to the outside world
- fix the libcmd.a install target to use INSTALL_DATA and the correct
library name

Change-Id: I2bf241cfff419d51bf170fdc871248e9b0c7ab33
Reviewed-on: http://gerrit.openafs.org/8063
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoSys doesn't depend on auth
Simon Wilkinson [Thu, 24 May 2012 10:26:51 +0000]
Sys doesn't depend on auth

Nothing in sys depends on auth headers, so remove the dependency

Change-Id: Ic7d9b8e66c03f87d2de95166865d39feab8717af
Reviewed-on: http://gerrit.openafs.org/8064
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agosys: Use libtool for pthreaded library
Simon Wilkinson [Thu, 24 May 2012 10:24:47 +0000]
sys: Use libtool for pthreaded library

Create a pthreaded version of libsys.a, called liboafs_sys.a

On AIX, the sys library is special because it includes references to
two syscall stubs - lpioctl and lsetpag. This means that we can't link
the library with -no-undefined, as the references to these stubs are
only resolved at run time.

Change-Id: Iaae5923fe4eec7bc3f006e29df4e26e4ba8e5418
Reviewed-on: http://gerrit.openafs.org/8061
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agorx: Build libtool library
Simon Wilkinson [Thu, 24 May 2012 10:08:48 +0000]
rx: Build libtool library

Build a pthreaded, libtool, version of librx.a called liboafs_rx.la.
librx.a remains for LWP applications to use. With this change, all RX
objects are built in both the LWP and pthread cases, so some #ifdef
guards are required to protect code that isn't relevant in a given
build.

Currently, all of our pthreaded objects use libafsrpc to get RX
functionality, so this change is fairly minimal outside of the RX
directory.

Change-Id: I8e629e2319fb1964058e70c3c0c3ed548b09b22d
Reviewed-on: http://gerrit.openafs.org/8058
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agousd: Convert to using libtool
Simon Wilkinson [Thu, 24 May 2012 09:26:21 +0000]
usd: Convert to using libtool

Turn the libusd library into a libtool object (it has no pthread/LWP
differences, and so can just become a pthreaded library), and include
it as such in butc and the volser. liboafs_usd.la is the libtool
object, libusd.a is preserved as a static object for backwards
compatibility.

Change-Id: I25c3d0f429415527fe529c3d3e5afbad9490ea45
Reviewed-on: http://gerrit.openafs.org/8057
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoutil: Convert to using libtool
Simon Wilkinson [Thu, 24 May 2012 08:14:18 +0000]
util: Convert to using libtool

Create a pthreaded version of libafsutil, named liboafs_util.la,
and use this library in all of the pthreaded binaries that we build,
replacing both inclusion of libafsutil.a, and direct compliation of
pthreaded versions of the util source files.

libafsutil.a is provided for legacy LWP applications, and the
convenience library libafsutil_pic.a remains until we address the way
in which the user space cache manager is built and linked.

Change-Id: Ibdc3d6e2fe56ca6f5b882cf03991d1a2e32c62b2
Reviewed-on: http://gerrit.openafs.org/8056
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agouuid: hashes are positive ints
Derrick Brashear [Fri, 7 Sep 2012 20:47:43 +0000]
uuid: hashes are positive ints

switch to unsigned

Change-Id: I2a2dbde211d1de2c73bcf5fd0c9ef1704d0e0000
Reviewed-on: http://gerrit.openafs.org/8060
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agocmd: Convert to using libtool
Simon Wilkinson [Wed, 23 May 2012 20:43:57 +0000]
cmd: Convert to using libtool

Convert the libcmd and libcmd_pic libaries to being built using
libtool. Historically, these have been built as LWP code, but they
have no LWP dependencies, and no LWP-specific code within them. So,
make cmd a pthread-only library.

In addition to the libtool library liboafs_cmd.la, we build the
legacy libcmd.a and libcmd_pic.a as convenience libraries. libcmd64.a
(a 64bit variant, used solely by kdump), remains built through
"normal" means.

Update pthreaded users of libcmd to use the new liboafs_cmd.la. For
now, non-pthreaded users are left alone.

Change-Id: Id8445949754d1942f6e8752ae182b4e6f86fe94f
Reviewed-on: http://gerrit.openafs.org/8055
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agocomerr: Fix a couple of libtool problems
Simon Wilkinson [Fri, 7 Sep 2012 12:51:29 +0000]
comerr: Fix a couple of libtool problems

The comerr libtool patch was submitted before buildbot had a chance
to verify it. Fix a couple of problems that buildbot identified:

*) On AIX liboafs_comerr needs to link against roken
*) On OpenSuSe the LWP CC command has a space in it, so needs to
   be quoted before being passed in to lwptool

Change-Id: I885099f57ef670ed58d532162b1cb70316744b28
Reviewed-on: http://gerrit.openafs.org/8059
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agocomerr: Convert to using libtool
Simon Wilkinson [Tue, 22 May 2012 07:37:08 +0000]
comerr: Convert to using libtool

Convert the libafs_comerr library so that it uses libtool.

comerr uses a pthread lock to protect the error tables, so it needs
to be built as both an LWP, and a pthread library (previously, we've
just built it as LWP, which is probably broken on some platforms, as
it won't define -D_REENTRANT)

libafscom_err.a remains as the LWP variant, and all pthreaded code is
modified to use the libtool liboafs_comerr.la library.

Change-Id: Id421cc97ad8681b42af7a5eb3cb512e1e1ce9a90
Reviewed-on: http://gerrit.openafs.org/8054
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>

11 years agolwp: Fix stupid mistake in lock.h
Simon Wilkinson [Fri, 7 Sep 2012 10:43:21 +0000]
lwp: Fix stupid mistake in lock.h

My earlier change to lock.h got the sense of the opr_Verify test wrong,
so we would assert() whenever the lock call succeeded. Fix this, so
things work again.

Change-Id: I7e2fda473343c7b541d6ca120ef0977adcf35f62
Reviewed-on: http://gerrit.openafs.org/8053
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>

11 years agotests: deal with one more unsigned warning
Derrick Brashear [Thu, 6 Sep 2012 18:27:13 +0000]
tests: deal with one more unsigned warning

C90 wants this unsigned hint before it will dtrt

Change-Id: Ic60b0336df7e8c4373582ffa352f4042ebc021c1
Reviewed-on: http://gerrit.openafs.org/8050
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>

11 years agorx: initialize mutexes from globals
Derrick Brashear [Thu, 6 Sep 2012 18:28:04 +0000]
rx: initialize mutexes from globals

in order to work around stupidity from macos linker.

same fix as was needed in 0559a23d38f98280e2eb1c1e2fc91ae7a1798537

Change-Id: Idb78abd74eef45cb3c9b212647dd6722c98e0cd5
Reviewed-on: http://gerrit.openafs.org/8051
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoregen: look for glibtoolize also
Derrick Brashear [Thu, 6 Sep 2012 18:26:32 +0000]
regen: look for glibtoolize also

macos uses the g prefix to avoid conflicting with a system
tool called libtool.

Change-Id: I867f5c4aa7e7c21bf47087b05a58299e11a5b70a
Reviewed-on: http://gerrit.openafs.org/8049
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>

11 years agodoc: fix examples of direct volume access
Ken Dreyer [Thu, 6 Sep 2012 18:24:25 +0000]
doc: fix examples of direct volume access

Fix the Unix examples to use ":volume" instead of "#volume", and add
a couple more examples.

Change-Id: I2e7907b128248343d99136552ab791b9bf0246ca
Reviewed-on: http://gerrit.openafs.org/8052
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>

11 years agotests/opr: fixes for the uuid-t.c tests
Marc Dionne [Thu, 6 Sep 2012 00:45:01 +0000]
tests/opr: fixes for the uuid-t.c tests

It's always good to have a plan.

Also, use correct mask when checking for DCE bit.

Change-Id: I4ab72aeb89efbd63d2d15fdc57aea8d2c1eb13d9
Reviewed-on: http://gerrit.openafs.org/8047
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>

11 years agotests/auth: fixes for the opr libtool changes
Marc Dionne [Thu, 6 Sep 2012 00:18:09 +0000]
tests/auth: fixes for the opr libtool changes

Add a missing line continuation backslash, and use the correct
location for libafs_opr.la

Change-Id: I52e44d36d9e1a9a0b3cd81c463f952072d4cbb48
Reviewed-on: http://gerrit.openafs.org/8045
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoLinux: drop GLOCK before calling dput
Marc Dionne [Thu, 6 Sep 2012 00:25:55 +0000]
Linux: drop GLOCK before calling dput

Holding the GLOCK when calling dput can result in a deadlock when
the kernel calls back into afs_dentry_iput.  It should be safe
to drop the lock here.

Change-Id: I8966aea7336b39b4c3ec265a53d820fc6135eeaf
Reviewed-on: http://gerrit.openafs.org/8046
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>

11 years agotests depends on viced
Andrew Deason [Mon, 7 May 2012 16:15:24 +0000]
tests depends on viced

Some of the tests code (specifically, that in tests/volser) depends on
objects in src/viced being build (specifically, vldbint stuff). So,
make 'tests' depend on 'viced', so they are built before we get there.

Change-Id: I572c490cf7bd6c84beb8966783c38869b371a85e
Reviewed-on: http://gerrit.openafs.org/7367
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agotests: modernize tests to compile in warning-as-errorland
Derrick Brashear [Tue, 17 Apr 2012 04:39:37 +0000]
tests: modernize tests to compile in warning-as-errorland

the tests haven't been loved as we've been killing warnings. clean up.

Change-Id: I9c36114d3172c4a6347f5e890df6edb5caf796b4
Reviewed-on: http://gerrit.openafs.org/7232
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoafs: Do not avoid DNLC if fakestat is set
Andrew Deason [Fri, 18 May 2012 21:55:09 +0000]
afs: Do not avoid DNLC if fakestat is set

Currently in afs_lookup we avoid putting an entry in the DNLC if
'force_eval' is unset, in order to avoid populating the DNLC with
mountpoint symlinks (we want the target of the mountpoint to be in
there instead, the root dir). However, if -fakestat or -fakestat-all
are enabled, 'force_eval' is always false, since we only set it to
true under certain circumstances when evaluating mountpoints.

To fix this, populate the dnlc for non-mountpoints, even if force_eval
is unset.

Change-Id: Ia2fef1bea9a08182715d587517f81074147aa4e7
Reviewed-on: http://gerrit.openafs.org/7431
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agoLINUX: Avoid symlink-y resolution limits
Andrew Deason [Tue, 21 Aug 2012 22:03:30 +0000]
LINUX: Avoid symlink-y resolution limits

Implementing the d_automount or follow_link function pointers for our
directories means that we can hit symlink resolution limits during
lookup, since we look like a "symlink". We can hit these limits pretty
easily if there are just too many directories in the lookup path.

Our pseudo-symlink directories cannot contribute to an infinite
resolution loop, since our destination is always an actual directory,
not a symlink that will result in more redirection. So, decrement the
total_link_count counter when our d_automount or follow_link code is
reached, so we do not contribute to hitting the max resolution limit.

Note that this is not related to recursive symlink lookup (link_count)
but only to the iterative symlink limit (total_link_count). Our
lookups are not recursive here, and we are not causing more recursive
lookups like a normal text-based symlink would do.

Change-Id: Id6d2edd614388ac0890eb7591caec25d375964ce
Reviewed-on: http://gerrit.openafs.org/8009
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agoopr: export uuid packing routines in the kernel
Derrick Brashear [Wed, 5 Sep 2012 17:41:48 +0000]
opr: export uuid packing routines in the kernel

these are actually kernel-safe. allow their use

Change-Id: Id0b9e21701dcdf7e43f75a5a9b240cb7579a8d7b
Reviewed-on: http://gerrit.openafs.org/8044
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoTidy up library includes
Simon Wilkinson [Fri, 17 Aug 2012 13:52:16 +0000]
Tidy up library includes

Tidy up the way that library inclusion is performed in the tptserver,
tvlserver and tvolserver Makefiles by splitting the library list into
common, client and server, using the appropriate list for each binary,
and removing duplicate library or object includes.

Change-Id: I5bde3f8b4105372c22984ccd486b145b434ae82e
Reviewed-on: http://gerrit.openafs.org/8042
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agovos: convertROtoRW - prevent VLDB corruption
Mark Vitale [Mon, 27 Aug 2012 19:11:32 +0000]
vos: convertROtoRW - prevent VLDB corruption

vos convertROtoRW incorrectly marks the first VLDB entry as the
new RW if the converted RO is not in the VLDB.  Correct this
by creating a new valid RW site in the VLDB entry.

Change-Id: I683ac10db90c2c41717c11c0d86eadc81a935e52
Reviewed-on: http://gerrit.openafs.org/8037
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoopr: add time initializer macro
Derrick Brashear [Wed, 5 Sep 2012 13:58:12 +0000]
opr: add time initializer macro

add a macro that can be used to initialize an opr_time

Change-Id: Ib73fc03d8ba333a054fa073153edafb130b2292b
Reviewed-on: http://gerrit.openafs.org/8043
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agobozo: dont lie when binding to any address
Michael Meffie [Thu, 30 Aug 2012 15:48:34 +0000]
bozo: dont lie when binding to any address

Do not log the bosserver listening to just the loopback when it is
actaully listening on any address.  The loopback address is still
written to the bosserver.rxbind file in this case to give local
scripts an simple way to contact the bosserver.

Fixes the log message introduces in
commit 9133aa6ed3a7fe2ae55b2d3242366ae277c7f726

Change-Id: I48f3ff5a1f9a20881df11a41baf3da29e1d02576
Reviewed-on: http://gerrit.openafs.org/8022
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agocrypto: Fix assert macro
Marc Dionne [Tue, 4 Sep 2012 23:48:12 +0000]
crypto: Fix assert macro

Commit ab977738b inadvertently changed osi_Assert to opr_Assert for
kernel code, causing the kernel build to produce an unloadable
module with undefined symbols.

Change-Id: I792359974ef21db97267847dfdf6c4b17c84328a
Reviewed-on: http://gerrit.openafs.org/8039
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoviced: Make use of unused variable
Marc Dionne [Tue, 4 Sep 2012 21:09:00 +0000]
viced: Make use of unused variable

Commit c2d724dc introduced the now variable that was set but never
used.  Use it in the remainder of the function where time(NULL)
appears, which was probably the intention.

Change-Id: I9cc25caf20dcfa466865c7fbf67893b022fdcc3e
Reviewed-on: http://gerrit.openafs.org/8038
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoopr: Convert to using libtool
Simon Wilkinson [Mon, 21 May 2012 17:04:32 +0000]
opr: Convert to using libtool

Convert opr so that it uses libtool. For backwards compatibility we
still build libopr.a, but we do so as a static convenience library.

As libopr.a may, in the future, be converted to an LWP library, change
all of the pthreaded binaries so that they link against the libtool
library liboafs_opr.la

Change-Id: Icee04ff4745334f06ffba16df5bb07fc9dcc0b54
Reviewed-on: http://gerrit.openafs.org/8034
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

11 years agovos: convertROtoRW incorrect warning when RO not in VLDB
Mark Vitale [Tue, 4 Sep 2012 13:06:44 +0000]
vos: convertROtoRW incorrect warning when RO not in VLDB

vos convertROtoRW will issue an incorrect warning about a partition
mismatch if the RO to convert is not in the VLDB.  Only check the
partition if the RO is in the VLDB.

Change-Id: Ib2726bc5bf6697898ad26dc1d817143da3286ba3
Reviewed-on: http://gerrit.openafs.org/8036
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agoAdd libtool support
Simon Wilkinson [Mon, 21 May 2012 07:57:05 +0000]
Add libtool support

Add support for using libtool to the Unix build system to build
both pthreaded and lwp libraries. For purely pthread libraries,
this just provides convenience macros to invoke the standard GNU
libtool from the OpenAFS build system. For libraries that have
lwp variants, we provide an initial wrapper script - lwptool,
which handles building a non-PIC LWP object before asking libtool
to build the pthread variants.

For a given source example.c, example.o is the non-PIC pthread
object, .libs/example.o is the PIC pthread object, and
.lwp/example.o is the LWP object.

To use libtool for a particular library directory, add the line
    include @TOP_OBJDIR@/src/config/Makefile.libtool
to the file's preamble. Makefile.pthread, or Makefile.lwp should be
included as normal to indicate whether the libraries in this Makefile
are pthread only, or should be built for both pthread and LWP objects.

The variables LT_current, LT_revision and LT_age may be used to control
the version of the shared objects produced. They have the same meaning
as that documented in the Versioning section of the libtool manual.

The LT_objs variable should be set to a space separated list of the .lo
objects included in the library. Note that there should _never_ be a
dependency on the .o form of these objects in the Makefile, as this
breaks parallel builds.

LT_deps is a list of the libtool dependencies of the library, and
LT_libs is a list of the external (non-OpenAFS) library dependencies.

A file called <libraryname>.sym should be created which contains a
newline seperated list of all of the symbols exported from this
library.

LWP library names remain the same as always. To distinguish the
pthreaded static and shared libraries these

LWP libraries should be linked using
    libexample.a: $(LT_objs)
    $(LTLWP_LDLIB) $(LT_objs)

Shared libraries should be linked using
    libexample.la: $(LT_objs) $(LT_deps)

(note that the pattern rules in the included Makefile take care of the
 build rule here)

If necessary, static convenience libraries can be produced using:
    libconvenience.a: $(LT_objs)
    $(LTLWP_LDLIB_static) $(LT_objs)

PIC convenience libaries can be linked using:
    libconvenience_pic.a: $(LT_objs)
    $(LTLWP_LDLIB_pic) $(LT_objs)

Libtool libraries should be installed using the $(LT_INSTALL_DATA) macro

Binaries linking agains libtool libraries should be linked using the
$(LT_LDRULE) or $(LT_LRDULE_static) options, with library paths in the
built locations relative to the top of the tree. For example

example_test: example_test.o $(top_builddir)/src/example/libexample.la
$(LT_LDRULE) example_test.o \
     $(top_builddir)/src/example/libexample.la

Change-Id: I32b162e8443119e8115febc532c5b5a0ec8fed32
Reviewed-on: http://gerrit.openafs.org/8033
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoutil: Don't use rx-internal locking macros
Simon Wilkinson [Wed, 22 Aug 2012 08:31:03 +0000]
util: Don't use rx-internal locking macros

The MUTEX_INIT, MUTEX_ENTER, MUTEX_EXIT and MUTEX_DESTROY macros
are intended for RX internal use only (they're an abstraction
interface so that the same locking code can be used in userspace and
in the kernel). They aren't appropriate for general purpose use.

Just use pthread calls directly for the serverLog locks.

Change-Id: I8373eaa097c36f7d3a4c9b0501fc5e897372582e
Reviewed-on: http://gerrit.openafs.org/8031
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agolwp: Don't depend on RX locking macros
Simon Wilkinson [Sun, 10 Jul 2011 12:50:03 +0000]
lwp: Don't depend on RX locking macros

The lwp library should be independent of RX (in fact, bits of it are
a dependency for RX). So, LWP cannot use the MUTEX_ENTER, CV_WAIT, and
so on macros that RX defines.

Just implement these natively within the pthreaded bits of lock.c to
remove the dependency.

Change-Id: I4cdb8313e791f253e84bbc4e256087e46a4c59bd
Reviewed-on: http://gerrit.openafs.org/5396
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoFurther rationalise our usage of assert()
Simon Wilkinson [Wed, 7 Sep 2011 13:59:17 +0000]
Further rationalise our usage of assert()

This patch futher improves our usage of assert() and friends. The
intention is to bring clarity to which forms of assert are used in
which situations, and to solve the problem of assert(X), or
osi_Assert(X) being used in a situation where X has side-effects.

It introduces two new assertion macros opr_Assert() and opr_Verify(),
and clarifies the usage of osi_Assert() and assert().

*) opr_Assert is a direct equivalent of assert(), with the exception
   that its output can be redirected to a log file when used in server
   code. It is the preferred version of assert for libraries, and server
   side code. Note that whilst opr_Assert doesn't currently become a
   no-op when NDEBUG is defined, the intention is that it will do so at
   some point in the future.
*) opr_Verify(X) asserts if the value of X is false. Unlike assert()
   it will always run X, regardless of whether the value is checked or
   not. The eventual intention is that when NDEBUG is defined,
   opr_Verify(X) => X
*) osi_Assert is an assertion macro intended for use in kernel code,
   or in mixed kernel/userland code. When code is built for userspace,
   osi_Assert(X) => opr_Assert(X)
*) assert is the system's own assert macro. It should only be used
   in client code. Whilst a header (opr_assert.h) is provided to map
   assert() to opr_Assert(), its use is discouraged

Change-Id: Ie6d61305686bdc7193cc8690e6f4fbe363211faf
Reviewed-on: http://gerrit.openafs.org/5395
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agolwp: Fast time doesn't need util
Simon Wilkinson [Thu, 24 May 2012 08:12:13 +0000]
lwp: Fast time doesn't need util

With the rise of roken, the fasttime file no longer depends on util

Change-Id: I2a1391d13bb39321666889dcfc2fbf43b181c749
Reviewed-on: http://gerrit.openafs.org/8030
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoviced: Don't use fasttime
Simon Wilkinson [Thu, 24 May 2012 09:55:07 +0000]
viced: Don't use fasttime

For pthreaded builds, the FT_ routines are just wrappers around
gettimeofday() and time(). As viced is now an entirely pthreaded
directory, improve readibility, and reduce our dependencies, by
just calling the operating system routines directly.

Change-Id: I3812ac31bc5eb7d2fcbe47d037d4af3d489d3b81
Reviewed-on: http://gerrit.openafs.org/8029
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoFix aliasing problems in tptserver
Simon Wilkinson [Tue, 4 Sep 2012 11:33:02 +0000]
Fix aliasing problems in tptserver

Commit f2db78a346112f5320efc6f0b6b9fe4ae0d893d3 disabled strict
aliasing for ptutils.c and ptprocs.c when built in the ptserver
directory. Similarly disable aliasing checks for these files when
built in the tptserver directory.

This doesn't actually fix the significant problems with these files,
but doing so is going to require completely reworking the way that
supergroups is implemented, so just disable these optimisations in
the compiler for now.

Change-Id: I6857ba83238a2c98a6540c795426f1a4038b70b3
Reviewed-on: http://gerrit.openafs.org/8035
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agolog: Relocate pagsh
Simon Wilkinson [Sun, 20 May 2012 16:43:10 +0000]
log: Relocate pagsh

Move the pagsh utility out of sys, and into log. This moves it closer
to other token and PAG related utilities, and resolves a circular
dependency between sys and auth.

Change-Id: Ibbbfc0e3bebc9ecb70f05b137e10e65ff9e4aff6
Reviewed-on: http://gerrit.openafs.org/8028
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoauth: Relocate NetRestrict support functions
Simon Wilkinson [Sun, 20 May 2012 11:57:00 +0000]
auth: Relocate NetRestrict support functions

Pull the NetRestrict and NetInfo support functions out of libutil,
and into libauth. This starts to concentrate all of our configuration
file parsing functions into the same place.

It also gets rid of a circular dependency. NetRestrict parsing relies
on functions from rx, so with this in libutil, we had the dependency
chain util->rx->util

Change-Id: I250d4d8264da8db61f603a06d1b7fdab44384cd3
Reviewed-on: http://gerrit.openafs.org/8027
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoUse rk_rename from roken
Simon Wilkinson [Sat, 19 May 2012 19:36:12 +0000]
Use rk_rename from roken

Rather than using our own renamefile() implementation on Windows,
pull in rk_rename() from libroken wherever a rename which unlinks
the destination file is required.

Change-Id: Ied8ac26b90a0983283b02704328da123bdd4f4b2
Reviewed-on: http://gerrit.openafs.org/8026
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoImport of code from heimdal
Heimdal Developers [Fri, 31 Aug 2012 12:14:51 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
4a438db29d361b7e5f47b86ced1482a96cde86ea (switch-from-svn-to-git-3008-g4a438db)

New files are:
roken/rename.c

Change-Id: Ib32975e9ec7f3d6abf5557cfd37fb40f248d00f0
Reviewed-on: http://gerrit.openafs.org/8025
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoroken: Add rename.c to list of imported files
Simon Wilkinson [Sat, 19 May 2012 19:29:00 +0000]
roken: Add rename.c to list of imported files

Change-Id: I835bf47625b7f0b3e025df4388416d88f3c52506
Reviewed-on: http://gerrit.openafs.org/8024
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoupdate libafsdep to include external without being in 3rd party dirs
Derrick Brashear [Fri, 31 Aug 2012 12:09:31 +0000]
update libafsdep to include external without being in 3rd party dirs

everything below src/external is managed out of other trees,
put our libafsdep at the top

Change-Id: I5f8e37afca30934f2f7befb17d1b19f4e3d12601
Reviewed-on: http://gerrit.openafs.org/8023
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoLINUX: Detect non-vectorized aio functions
Andrew Deason [Wed, 29 Aug 2012 19:14:39 +0000]
LINUX: Detect non-vectorized aio functions

In kernels before 027445c3, the functions generic_file_aio_read and
generic_file_aio_write, as well as the fs operations aio_read and
aio_write, do not deal with iovecs but rather just use a single
buffer. Detect this, so our aio_read and aio_write implementations
have the correct signatures.

This removes several warnings on such kernels.

Change-Id: I70aa0d43bac5545d83710806b58f36d13d7f6cc8
Reviewed-on: http://gerrit.openafs.org/8020
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoLINUX: make d_automount work properly on rhel5 kernels
Michael Meffie [Fri, 17 Aug 2012 17:25:17 +0000]
LINUX: make d_automount work properly on rhel5 kernels

Recent centos/rhel 5 kernels (2.6.18-308.*) started providing the
d_automount operation, but renamed the DCACHE_NEED_AUTOMOUNT flag to
DMANAGED_AUTOMOUNT.

Change-Id: I74811f8967d52ce482316b110e9dd616a4869a7f
Reviewed-on: http://gerrit.openafs.org/8006
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoLINUX: Use struct vfs_path on RHEL5
Andrew Deason [Wed, 29 Aug 2012 16:39:01 +0000]
LINUX: Use struct vfs_path on RHEL5

Some revisions of the kernel from RHEL5 (2.6.18-308.* and possibly
others) renamed 'struct path' to 'struct vfs_path'. So, use
'struct vfs_path' when it exists.

This introduces the afs_linux_path_t typedef, which is defined as
either a struct path, or struct vfs_path.

Change-Id: I88c31125dbc1ab2998a521e3c57ed532bf2d5bb7
Reviewed-on: http://gerrit.openafs.org/8019
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoautoconf: add AC_CHECK_LINUX_TYPE macro
Andrew Deason [Thu, 30 Aug 2012 12:06:33 +0000]
autoconf: add AC_CHECK_LINUX_TYPE macro

add a macro which looks for a given type in a given linux kernel
header file

Change-Id: Id3b0bcf65241c635f0109ed370b3079da8cd5656
Reviewed-on: http://gerrit.openafs.org/8021
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agovldb_check: fix cross-linked mh entries
Michael Meffie [Wed, 15 Aug 2012 21:19:07 +0000]
vldb_check: fix cross-linked mh entries

When run with -fix, consolidate server numbers in vl entries which
point to the same multi-homed entry. Use the lowest server number
from the set of server numbers which point to the same multi-homed
entry.

Remove unreferenced address entries which are duplicate multi-homed
indexes.

Two passes of vldb_check -fix may be required; first to fix the
vl entry server numbers; then to remove the duplicate address
entries.

Change-Id: I794cec4c176e8aab98a236a9700f58b1269a99bb
Reviewed-on: http://gerrit.openafs.org/7999
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoLINUX: Indent osi_machdep.h maze
Andrew Deason [Wed, 29 Aug 2012 16:34:06 +0000]
LINUX: Indent osi_machdep.h maze

This one isn't so bad, actually, but it still benefits from some
indentation.

Change-Id: I08de26df7da79dfa506f033e0b8bc1d33cad441b
Reviewed-on: http://gerrit.openafs.org/8018
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agolibafs: actually set hasno64bit flag
Derrick Brashear [Fri, 24 Aug 2012 19:04:40 +0000]
libafs: actually set hasno64bit flag

if we're starting a 64 bit data op, we should also end it,
and vice versa.

Change-Id: I1edef140f0c96d73f87759a80318a004196f22d5
Reviewed-on: http://gerrit.openafs.org/8013
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoout-of-tree-build: extend configuration,
Christof Hanke [Fri, 24 Aug 2012 03:18:31 +0000]
out-of-tree-build: extend configuration,

namely libafsdep-files and configure-libafs.ac
so that building the kernel-module on linux in a separate
obj-directory works.

Change-Id: Ie1664aa161fade012df7d23367eb7876912448e3
Reviewed-on: http://gerrit.openafs.org/8012
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agovos: convertROtoRW susceptible to VLDB changes during override prompt
Mark Vitale [Mon, 20 Aug 2012 21:39:06 +0000]
vos: convertROtoRW susceptible to VLDB changes during override prompt

vos convertROtoRW obtains a VLDB entry, then peforms some setup logic
(including a possible user prompt) before obtaining a volume lock.
This exposes the code to possible time-of-check/time-of-use issues.
After obtaining the volume lock, get a second copy of the VLDB entry
and compare it to the first copy; if it has changed, fail the conversion
with an error message asking the user to re-issue the vos convertROtoRW
command.

Change-Id: I9c1a634cea2e22188869d54b00b7831aed12b1cd
Reviewed-on: http://gerrit.openafs.org/8008
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agofileserver: add volume number to error-messages
Christof Hanke [Wed, 22 Aug 2012 14:39:13 +0000]
fileserver: add volume number to error-messages

in physio. If things go wrong in ReallyRead() or
ReallyWrite(), the admin would like to know which
volume to salvage.

Change-Id: Ic822412fec56ac5bb68f04d80713d94cbf977e71
Reviewed-on: http://gerrit.openafs.org/8010
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoLinux: include kthread.h before afs includes
Marc Dionne [Tue, 14 Aug 2012 23:37:00 +0000]
Linux: include kthread.h before afs includes

We need to include kthread.h before the afs standard includes
to avoid clashing with the printf -> printk mapping.

Change-Id: I965916515bd14a5a08b0f280cf8e7f9935d8aa50
Reviewed-on: http://gerrit.openafs.org/7988
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoLinux 3.6: lookup inode operation API change
Marc Dionne [Tue, 14 Aug 2012 22:26:24 +0000]
Linux 3.6: lookup inode operation API change

The nameidata argument is replaced with an unsigned int flags
argument.

Change-Id: Ife07bb50ae7d747bd6256ea8238c4e19dbb5ee3f
Reviewed-on: http://gerrit.openafs.org/7987
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoLinux 3.6: revalidate dentry op API change
Marc Dionne [Tue, 14 Aug 2012 22:08:51 +0000]
Linux 3.6: revalidate dentry op API change

The nameidata argument is dropped, replaced by an unsigned flags
value.  The configure test is very specific; kernels with the
older API with a signed int flags value should fall through.

Change-Id: I5939b089b023fe81e3824ac3f920c4b6a261d39a
Reviewed-on: http://gerrit.openafs.org/7986
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoLinux 3.6: create inode operation API change
Marc Dionne [Tue, 14 Aug 2012 21:28:50 +0000]
Linux 3.6: create inode operation API change

The nameidata argument is dropped and a flag is added.

Change-Id: I33692fc506e7eb9b8935a27ff3d10b713dfa6e5e
Reviewed-on: http://gerrit.openafs.org/7985
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoLinux: fix variable used to test for the iop create API
Marc Dionne [Tue, 14 Aug 2012 21:11:08 +0000]
Linux: fix variable used to test for the iop create API

Use correct variable when testing for the create API to use.

This is just for looks - there is no effect since mkdir and create
were changed in the same kernel release.

Change-Id: I9e43cc80d3817ee8a6c339c4ae98a1a2ab0851a1
Reviewed-on: http://gerrit.openafs.org/7984
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoLinux 3.6: d_alias and i_dentry are now hlists
Marc Dionne [Tue, 14 Aug 2012 01:55:25 +0000]
Linux 3.6: d_alias and i_dentry are now hlists

The d_alias pointer is now the head of an hlist.  This means the
iterator is a different macro and has no "reverse" version since
hlists have no direct pointer to the list tail.

inode->i_dentry gets the same treatment.  Adjust where we use it.

Change-Id: Ibcdd8ab6f8a571a8f94c646949ebe0503f075574
Reviewed-on: http://gerrit.openafs.org/7983
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoLinux 3.6: dentry_open API change
Marc Dionne [Tue, 14 Aug 2012 01:36:15 +0000]
Linux 3.6: dentry_open API change

dentry_open now takes a path argument that combines the dentry and
the vfsmount pointers.
Add a configure test and a new compat inline function to keep things
cleaner in the main source file.

Change-Id: Ia29422d60d438cf4c795840566d4610649aa1f10
Reviewed-on: http://gerrit.openafs.org/7982
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoLinux 3.6: kmap_atomic API change
Marc Dionne [Tue, 14 Aug 2012 20:34:42 +0000]
Linux 3.6: kmap_atomic API change

kmap_atomic no longer requires a KM_TYPE argument.  Test for this
and adjust the affected code.

Change-Id: I3a9e0018124d40be51cc509ac00d9250a5e8e76d
Reviewed-on: http://gerrit.openafs.org/7981
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoLinux: bypass: consolidate copy_page macros into a single function
Marc Dionne [Tue, 14 Aug 2012 00:32:08 +0000]
Linux: bypass: consolidate copy_page macros into a single function

The copy_page(s) macros are very similar; combine them into a
single function that can be used for all cases.

This will make it easier to add some pre-processor logic around
the kmap_atomic calls to adapt to Linux API changes.

Change-Id: I6daf7cb8ce49b743cc1b4532da91d9625a90d0ca
Reviewed-on: http://gerrit.openafs.org/7980
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agovos: use the roken max macro
Michael Meffie [Thu, 16 Aug 2012 22:04:22 +0000]
vos: use the roken max macro

Use the max macro provided by roken. Fixes builds on
solaris.

Change-Id: Id429fe816284a1017082054e02a830a2a952c26b
Reviewed-on: http://gerrit.openafs.org/8004
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

11 years agoImport of code from heimdal
Heimdal Developers [Thu, 16 Aug 2012 21:26:07 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
4a438db29d361b7e5f47b86ced1482a96cde86ea (switch-from-svn-to-git-3008-g4a438db)

Upstream changes are:

Michael Meffie (1):
      drop __restrict some more, to please old compilers

Change-Id: Ibe62c9abd661793d11f379c13cc3b93f198a1e8d
Reviewed-on: http://gerrit.openafs.org/8003
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>