10563 Commits

Author SHA1 Message Date
Simon Wilkinson
5563ff6674 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>
2012-09-08 20:29:02 -07:00
Simon Wilkinson
564fe1e329 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>
2012-09-08 20:28:32 -07:00
Simon Wilkinson
bdfe025b64 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>
2012-09-08 20:28:10 -07:00
Simon Wilkinson
012b878576 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>
2012-09-08 20:27:51 -07:00
Derrick Brashear
772e957b71 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>
2012-09-08 15:23:37 -07:00
Simon Wilkinson
d36be5b8be 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>
2012-09-07 11:29:14 -07:00
Simon Wilkinson
11e0ce535d 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>
2012-09-07 07:37:27 -07:00
Simon Wilkinson
d6d2f28450 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>
2012-09-07 05:27:10 -07:00
Simon Wilkinson
61d417c1a3 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>
2012-09-07 05:18:00 -07:00
Derrick Brashear
fe2641e35b 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>
2012-09-06 21:31:56 -07:00
Derrick Brashear
f230eda87f 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>
2012-09-06 21:31:44 -07:00
Derrick Brashear
ef7cc7e3f5 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>
2012-09-06 12:04:22 -07:00
Ken Dreyer
ed0624c32e 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>
2012-09-06 12:04:08 -07:00
Marc Dionne
d77a99106d 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>
2012-09-06 04:45:59 -07:00
Marc Dionne
1f55bc7f08 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>
2012-09-06 04:45:04 -07:00
Marc Dionne
0dac4de8ee 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>
2012-09-06 04:44:39 -07:00
Andrew Deason
777e03103f 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>
2012-09-06 04:43:49 -07:00
Derrick Brashear
97dfe2b73c 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>
2012-09-06 04:43:30 -07:00
Andrew Deason
35d5be2adf 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>
2012-09-06 04:42:51 -07:00
Andrew Deason
238b88624a 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>
2012-09-05 12:00:51 -07:00
Derrick Brashear
b9a10641dd 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>
2012-09-05 11:14:03 -07:00
Simon Wilkinson
d01ef1ccfb 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>
2012-09-05 09:58:22 -07:00
Mark Vitale
f258e7ddde 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>
2012-09-05 09:56:26 -07:00
Derrick Brashear
8c785b74c0 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>
2012-09-05 09:56:12 -07:00
Michael Meffie
03b87dffee 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>
2012-09-04 19:39:45 -07:00
Marc Dionne
dd48cd3c67 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>
2012-09-04 19:39:06 -07:00
Marc Dionne
50a6b04709 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>
2012-09-04 19:38:54 -07:00
Simon Wilkinson
8b84d9538c 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>
2012-09-04 13:23:14 -07:00
Mark Vitale
b650106e30 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>
2012-09-04 12:46:24 -07:00
Simon Wilkinson
69f26ece3c 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>
2012-09-04 06:55:51 -07:00
Simon Wilkinson
0b31aba6a6 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>
2012-09-04 06:54:12 -07:00
Simon Wilkinson
7b1af325f1 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>
2012-09-04 06:53:55 -07:00
Simon Wilkinson
ab977738b1 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>
2012-09-04 06:53:16 -07:00
Simon Wilkinson
04c750b2fe 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>
2012-09-04 06:53:02 -07:00
Simon Wilkinson
c2d724dc5b 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>
2012-09-04 06:52:52 -07:00
Simon Wilkinson
14141123da 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>
2012-09-04 06:12:26 -07:00
Simon Wilkinson
e9e9719bba 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>
2012-09-01 11:13:07 -07:00
Simon Wilkinson
1e76c59ea5 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>
2012-08-31 10:39:59 -07:00
Simon Wilkinson
6705646e8d 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>
2012-08-31 10:21:38 -07:00
Heimdal Developers
8ab7e73fe2 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>
2012-08-31 10:21:20 -07:00
Simon Wilkinson
7c26b43413 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>
2012-08-31 08:10:08 -07:00
Derrick Brashear
81c172343c 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>
2012-08-31 05:14:04 -07:00
Andrew Deason
e5ba359f64 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>
2012-08-30 09:03:09 -07:00
Michael Meffie
5daa08ea26 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>
2012-08-30 09:02:05 -07:00
Andrew Deason
74c1881dff 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>
2012-08-30 09:01:37 -07:00
Andrew Deason
f87d49cd17 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>
2012-08-30 09:01:06 -07:00
Michael Meffie
911f751d1e 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>
2012-08-30 05:08:45 -07:00
Andrew Deason
579048cb1e 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>
2012-08-30 05:04:15 -07:00
Derrick Brashear
87df877ae2 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>
2012-08-30 05:03:38 -07:00
Christof Hanke
c2b1345849 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>
2012-08-24 05:10:50 -07:00