Commit Graph

478 Commits

Author SHA1 Message Date
Antoine Verheijen
20a54b0252 OpenBSD: Add config headers for new(er) OS versions.
The OS-specific config header files have not kept up with the
newer releases of OpenBSD. This patch corrects that by adding
header files for OpenBSD versions from 4.9 to 5.3 (the newest
version currently under development).

Change-Id: I5e233cc7b96be2c1c52824653c42d3c6d77d6f50
Reviewed-on: http://gerrit.openafs.org/8927
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2013-02-05 05:49:28 -08:00
Andrew Deason
1b63689b99 SOLARIS: Use vn_renamepath as early as possible
Commit 6c509601 uses the vn_renamepath when we are building on Solaris
11. However, some recent patch level of Solaris 10 (more recent than
stock 10u10) has the same problem fixed by that commit, where
vn_setpath takes an additional argument. So instead, just test for the
existence of vn_renamepath itself, so we also use it on Solaris 10
when we can.

Thanks to Rich Sudlow for reporting this.

Change-Id: Ic1c0437d2438c6e19b8fff8278ecda9b96bd020b
Reviewed-on: http://gerrit.openafs.org/8920
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-01-23 11:33:22 -08:00
Marc Dionne
d0479bbaf4 Linux 3.8: vmtruncate removal
vmtruncate had been deprecated for a while and has now been
removed.  Do things the new way based on truncate_setsize.

Change-Id: If584329f7330f44be3909e4c8b935e4fe5e2b536
Reviewed-on: http://gerrit.openafs.org/8906
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-01-21 04:30:03 -08:00
Marc Dionne
c6d27e322a Linux 3.8: session_keyring changes
The session_keyring is now attached directly to the cred structure
and the thread_group_cred structure (cred->tgcred) no longer exists.

Adapt code that makes use of tgcred, and use the standard rcu based
mechanism to update session_keyring.

Change-Id: If4b88cbc7f9af6343353648837b28541a5088429
Reviewed-on: http://gerrit.openafs.org/8905
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-01-21 04:29:15 -08:00
Andrew Deason
81dd4878e7 SOLARIS: Look for ncurses in ncurses/ncurses.h
Solaris 11+ has ncurses.h in ncurses/ncurses.h. Look for it there.

Without this, on Solaris 11.1 we will detect libncurses automatically
(because it lives in /usr/lib), but not ncurses.h (since it is in
ncurses/ncurses.h, not ncurses.h). So, we will fall back to curses.h,
but will try to link to libncurses, which, as you might guess, fails
with various undefined symbols.

Change-Id: Ia174e2a3c97318d6db2a48a6098569aede93522c
Reviewed-on: http://gerrit.openafs.org/8874
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-01-05 06:28:22 -08:00
Ben Kaduk
5afe7a882b Add configure option to not install kauth
Per http://www.openafs.org/pages/no-more-des.html the kaserver
suite of utilities is deprecated and is not supposed to be built
anymore in this post-1.6 world.
Not building them at all requires some effort, but not installing
them is pretty easy.  Do the easy part for now, and leave the hard
parts for a follow-up commit.

Change-Id: I1c400a7398b8708e7c9dc6613cd183b9b67e7a7f
Reviewed-on: http://gerrit.openafs.org/8457
Reviewed-by: Michael Laß <lass@mail.uni-paderborn.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-12-26 13:48:44 -08:00
Michael Laß
986a854151 Update configure help msg to match actual defaults
The defaults for LINUX_KERNEL_PATH and LINUX_KERNEL_BUILD in
acinclude.m4 were changed in 2cfd611, 94ff565 and 3f9d982 without updating
the output of ./configure --help. Change the description of
linux-kernel-headers and linux-kernel-build to show the correct defaults.

Change-Id: I41331f4d48a555e291a45ca56e788bc418c064d3
Reviewed-on: http://gerrit.openafs.org/8759
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-12-18 17:32:18 -08:00
Stephan Wiesand
3f9d982ec2 Linux: Restructure kernel header detection
As of kernel 3.7, version.h has moved, and hence utsrelease.h was
no longer found. Loop over candidate directories and locations
within, and look for the files we're actually after.

FIXES 131525

Change-Id: I686212a283b9e0ce769b1351e3cb75e08f4b110c
Reviewed-on: http://gerrit.openafs.org/8761
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Laß <lass@mail.uni-paderborn.de>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-12-18 12:32:11 -08:00
Marc Dionne
aeb2763b74 Linux 3.7: key instantiate API change
Adapt to the new parameters for the instantiate key operation.

Change-Id: I25dea3489b68cad662e962a4973ee98ec7228cd3
Reviewed-on: http://gerrit.openafs.org/8470
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Hans-Werner Paulsen <hans@MPA-Garching.MPG.DE>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-11-19 04:22:11 -08:00
Marc Dionne
2bafb2f99d Linux: change test for new putname API
Replace the existing test with a more robust one that checks for
the existence of the new filename structure.  Since older kernels
are expected to fail this test, we'll get the correct result even
if there is unrelated failure, for instance a missing/different
header file.

Change-Id: Ie50abce37580eab803e9b07e636a1538f4a91a81
Reviewed-on: http://gerrit.openafs.org/8466
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-11-19 04:21:52 -08:00
Derrick Brashear
7fe30bd28e configure: check for poll()
if we have code which uses HAVE_POLL, check for poll().

Change-Id: I1baf61541b243f82b3acca112db2cbbca813182b
Reviewed-on: http://gerrit.openafs.org/8357
Reviewed-by: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-11-01 20:24:52 -07:00
Simon Wilkinson
3898f4d205 Fix mutex assertion
RX mutexes have two mechanisms for asserting ownership of a mutex:
MUTEX_ISMINE, which returns true if the caller is the owner of the
mutex in question, and osirx_AssertMutex which fires an assertion if
the calling thread doesn't own a specified mutex.

Neither of these work with pthread mutexes on all platforms, and the
kernel support for MUTEX_ISMINE is dubious in places. Because in some
implementations, MUTEX_ISMINE tries to lock the mutex in question, a
failing call to MUTEX_ISMINE can lead to the process holding an
additional, unexpected, lock.

This patch reworks all of this, and uses the new opr mutex framework
so that we can do mutex assertions in userspace, too. We remove the
unsafe MUTEX_ISMINE macro, and replace it with MUTEX_ASSERT which
simply asserts if the specified mutex is not held by the current
thread. osirx_AssertMutex is removed as it is now redundant.
MUTEX_ASSERT will always work in kernel code.

For userspace, we provide opr_mutex_assert, which is implemented using
POSIX error checking mutexes. As error checking mutexes have a runtime
overhead, this is only available when configured with
--enable-debug-locks, the rest of the time calls to opr_mutex_assert are
no-ops.

Change-Id: I285ee2b558389fa3d63b786e4bc4420fa2126c80
Reviewed-on: http://gerrit.openafs.org/8282
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-30 04:59:07 -07:00
Marc Dionne
fa3116567e Linux 3.7: putname is no longer exported
putname is unexported in kernel 3.7.  Add a compatibility inline
afs_putname function and open code it if necessary.

Change-Id: I5416067566f6332d77e5d91ce2b9cf7bc0c96dce
Reviewed-on: http://gerrit.openafs.org/8237
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-18 00:53:15 -07:00
Derrick Brashear
a28b5e645a configure: make use of native build assist tools possible
provide a way to run native rxgen, config and compile_et

Change-Id: I9d1a2b4a1d4100fdc4a042005586e8fc40f39f7b
Reviewed-on: http://gerrit.openafs.org/8199
Tested-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-03 07:38:06 -07:00
Ben Kaduk
c4c51444eb 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>
2012-09-14 04:53:33 -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
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
Marc Dionne
ec48dca871 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>
2012-08-17 11:15:41 -07:00
Marc Dionne
7413cd09a5 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>
2012-08-17 11:15:21 -07:00
Marc Dionne
020e32779c 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>
2012-08-17 11:14:54 -07:00
Marc Dionne
6bea047fb4 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>
2012-08-17 11:14:02 -07:00
Marc Dionne
8766a65e97 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>
2012-08-16 22:29:37 -07:00
Marc Dionne
049c485b4a 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>
2012-08-16 22:28:52 -07:00
Simon Wilkinson
6f6bfb31ac opr: Add UUID handling functions
Add a set of functions to the opr library to handle creating and
manipulating UUIDs.

The opr_uuid_t type is held as a 16 octet character string, which
comprises the UUID encoded into network byte order. This is the
primary form for manipulating UUIDs with this library, as it avoids
any nbo/hbo problems.

For applications which require raw access to the UUID components,
the opr_uuid_unpacked structure is provided, and
opr_uuid_pack/opr_uuid_unpack can be used to convert to and from
this format.

Finally, functions to print the UUID as a string, and parse a UUID
from a string, are provided. When printing, we use the standard UUID
format of 000000-0000-0000-0000-00000000. However, the afsUUID library
used to print UUIDs as 000000-0000-0000-00-00-00000000, so we also
accept this format.

Change-Id: I78ef79b7ab8ae15fb955c6495118722875c94f8d
Reviewed-on: http://gerrit.openafs.org/7977
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-08-14 12:53:08 -07:00
Tom Keiser
b440d8ffcb libafs: use kthread_run when available
Use the kthread_run interface on linux to create kernel
threads.  This interface allows all the cpus to schedule
afsd threads, instead of just inheriting the cpu affinity of
the main afsd thread.

Written by Tom Keiser.

Change-Id: I69eb852d168bd85e9aa7ec075013c0346207dbcf
Reviewed-on: http://gerrit.openafs.org/7915
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-08-14 06:21:00 -07:00
Andrew Deason
403f72ec76 rx: Create AFS_ADAPT_PMTU and AFS_RXERRQ_ENV
Currently we have the ADAPT_PMTU define, which turns on functionality
in Linux to detect PMTU-related ICMP errors for Rx. However, this is
really turning on two separate pieces of functionality: the PMTU
processing, and the processing for ICMP errors in general.

So split this out into two defines: AFS_ADAPT_PMTU, and
AFS_RXERRQ_ENV. The former is for processing PMTU discovery, and the
latter is for processing ICMP errors. Both of these are left disabled
due to issues in the error processing. Although PMTU discovery is the
only functionality which makes use of ICMP errors, this will change in
the future.

Change-Id: Ia334c68ce5eb3fa01c01a8a1c52a0e0a2e41b2c0
Reviewed-on: http://gerrit.openafs.org/7925
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-08-09 08:03:53 -07:00
Andrew Deason
de381aa0d3 Linux: Make dir dentry aliases act like symlinks
Currently, we try to invalidate other dentries that exist for a
particular dir inode when we look up a dentry. This is so we try to
avoid duplicate dentries for a directory, which Linux does not like
(you cannot have hardlinks to a dir).

If we cannot invalidate the other aliases (because they are being
used), right now we just return the alias. This can make it very easy
to panic the client, due to the sanity checks Linux performs when dong
things like 'rmdir'. If we do something like this:

mkdir dir1
fs mkm dir1/mtpt vol
mkdir dir1/mtpt/dir2
fs mkm dir1/mtpt/dir2/mtpt2 vol
cd dir1/mtpt
rmdir dir2/mtpt2

For the 'rmdir', we will lookup 'mtpt2'. Since 'mtpt' and 'mtpt2'
are mountpoints for the same volume, their dentries point to the same
directory inode. So when we lookup 'mtpt2', we will try to invalidate
the other dentry, but we cannot do that since it is the cwd. So we
return the alias dentry (for 'mtpt'). The Linux VFS layer then does a
sanity check for the rmdir operation, checking that the child dentry's
parent inode is the same as the inode we're performing the rmdir for.
Since the dentry we returned was for 'mtpt', whose parent is 'dir1',
and the actual dir we're performing the rmdir for is 'dir2', this
sanity check fails and we BUG.

To avoid this, make the dentry alias act like a symlink when we
encounter an uninvalidateable dentry alias. That is, we allow multiple
dentry aliases for a directory, however, when the dentry aliases are
actually used, we redirect to a common dentry (via d_automount where
possible, and follow_link elsewhere).

This means that such mountpoints will behave similarly to symlinks, in
that we 'point' to a specific mountpoint dentry. This means that if we
have multiple different ways to get to the same volume, and all are
accessed at the same time, all but one of those mountpoints will
behave like symlinks, pointing to the same mountpoint. So, the '..'
entries for each path will all point to the parent dir of one
mountpoint, meaning that the '..' entry will be "wrong", but for most
cases it will still be correct.

In order to try to make the 'target', pointed-to directory consistent,
we add a new field to struct vcache: target_link. This points to the
dentry we should redirect to, whenever that vcache is referenced. To
avoid (possibly not-feasibly-solvable) problems with refcounting, this
pointer is not actually a reference to the target dentry, but just
serves as a pointer to compare to.

FIXES 130273

Change-Id: I990131ce95cefe8336e83c7ebfb48aed1d685109
Reviewed-on: http://gerrit.openafs.org/7741
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-31 09:29:04 -07:00
Derrick Brashear
73ff095130 macos: next version support
support things beyond 10.7

Change-Id: I7a50f569fd43e0e1ed3c74f0480a8e2521df1bc5
Reviewed-on: http://gerrit.openafs.org/7763
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-16 09:29:49 -07:00
Derrick Brashear
a08604b78f uss: allow disabling by configure switch
provide an option to disable building uss. current heimdal
when built static can leak symbol names for its flex/bison parser
causing symbol conflicts. this is but a workaround, but
sites not needing uss can at least use it.

Change-Id: Ibab1dd189e7fbc41ca01e7ef7479421c056999f5
Reviewed-on: http://gerrit.openafs.org/7553
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-13 15:19:44 -07:00
Derrick Brashear
5d53c12b95 gtx: add configure switch to force not building
allow gtx and associated software to be turned off.

Change-Id: If02427311c79e0784fcc5fb1816a449f7dcdd879
Reviewed-on: http://gerrit.openafs.org/7552
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-13 15:19:28 -07:00
Marc Dionne
5227148ae1 Linux 3.5: encode_fh API change
The encode_fh export operation now expects two inode arguments
instead of a dentry and a "connectable" flag.  Use the inode of
the dentry we're interested in, and NULL as the parent inode which
is the same as passing a 0 flag in the previous API.

Change-Id: I05cf146fb2a4bacdca20a9f108d04ccb11530804
Reviewed-on: http://gerrit.openafs.org/7523
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-07 05:13:50 -07:00
Marc Dionne
2b33384a4a Linux 3.4: replace end_writeback with clear_inode
end_writeback() is renamed to clear_inode().  Add a configure test
and cope.

Change-Id: Icaf5b6b54d0ee377fabcf0b295d690eaa6b4be5e
Reviewed-on: http://gerrit.openafs.org/7503
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-05-28 20:06:39 -07:00
Michael Meffie
fbc9599484 configure: solariscc check update
Add checks for recent versions of sunstudio for solaris.  The
installation paths are documented in the release notes of versions
12.1, 12.2, and 12.3.

Change-Id: Ic28f40a061f288a1c39acb6a5d11e81876631d7f
Reviewed-on: http://gerrit.openafs.org/7253
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-22 06:19:24 -07:00
Simon Wilkinson
db733e325e roken: Add setprogname
Add setprogname to the list of functions that we test for, and replace
with a libroken alternative if it is missing.

Remove setprogname and getprogname from the AC_CHECK_FUNCS list, as
AC_REPLACE_FUNCS is a superset of this test.

Change-Id: If81dc8ba6d9245329f3abae6a6f062e3827dcfab
Reviewed-on: http://gerrit.openafs.org/7250
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-19 05:06:59 -07:00
Michael Meffie
f8b759b63f auth: local realms configuration
Add krb.conf and krb.excl support to the auth cell configuration
library.  Provide a function to determine if the user is local to the
cell.  Provide a function to set the local realms during application
initialization.  These changes are intended to replace the functions
afs_krb_get_lrealm and afs_is_foreign_ticket_name.

Change-Id: Iba57e9ffc2c958f3a4565a9352ce172189276ce9
Reviewed-on: http://gerrit.openafs.org/5744
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-04-16 10:31:04 -07:00
Michael Meffie
c11d1c0319 Build: error if solariscc is not found
Fail configure if the solariscc is not found and give the builder
a message to cope with non-standard installation paths for
sunstudio.

Change-Id: I64c1e752833f2aa824f4a15cc144e54bb03a1ec8
Reviewed-on: http://gerrit.openafs.org/7204
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-04-13 17:46:30 -07:00
Chas Williams (CONTRACTOR)
29cb3b9f83 Finish removing sunos 4.x references and build cruft
Also, fix afsxbsa.h to always include <time.h> since this should get
struct tm on any fairly modern operating system.

Change-Id: Idfb39f12d28a2a0aa470c8549e4149d0b2ccde9e
Change-Id: Ia1c563e5954c533f18bd56155f2ae1825813efe3
Reviewed-on: http://gerrit.openafs.org/6923
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-03-25 18:41:24 -07:00
Marc Dionne
f246aa5f84 Linux 3.4: Switch to d_make_root
If d_make_root is available, use it instead of d_alloc_root.
The helper was introduced in 3.3, and d_alloc_root gets removed
in 3.4.

Change-Id: I39aaa6fd14d04c05ad9cb5b610e7f12f70fe0c94
Reviewed-on: http://gerrit.openafs.org/6931
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-03-22 07:05:06 -07:00
Andrew Deason
80592c53cb Disable kernel opt by default on Solaris 10 and 11
With newer Solaris Studio (sometime in the 12.* series), cc started
adding SSE instructions to optimized x86 code, which is invalid for
kernel code and can generate panics. There appears to be no way to
turn this off currently (-xvector=%none is non-functional), so default
to not optimizing kernel code.

Change-Id: I5fdedb11219df68e0146b8e0cee9010c2eb4067e
Reviewed-on: http://gerrit.openafs.org/6671
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-02-07 06:42:07 -08:00
Christof Hanke
20e82cecd9 linux: fix probing for noop_fsync
Commit 267934d0e6 introduced
probing code to deal with the renameing of simple_fsync
inside the linux-kernel.
This test does not take different parameter-lists
for noop_fsync or simple_fsync resp. into account.
Fix this.

Change-Id: Ib490f0bb7e8098acc83fce001a43c08f478ad582
Reviewed-on: http://gerrit.openafs.org/6628
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-02-01 04:18:19 -08:00
Marc Dionne
beafc7f742 Linux 3.3: use umode_t for mkdir and create inode ops
The mkdir and create inode operations have switched to using
umode_t instead of int for the file mode.

Change-Id: Ib8bbf6eaa6e87d6a9692c45b1a3fe93fcc3eff7a
Reviewed-on: http://gerrit.openafs.org/6567
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-01-18 10:12:40 -08:00
Marc Dionne
64bd0b728c Linux: use standard macro for set_nlink configure test
A generic macro exists to test for functions in the kernel, use
it for set_nlink.

Change-Id: Iaec2b29e48f500bcf7a1ef80a3f2a1305e5dbb8f
Reviewed-on: http://gerrit.openafs.org/6566
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-01-18 09:28:23 -08:00
Geoffrey Thomas
267934d0e6 linux: fsync on a directory should return 0, not EINVAL
Directory writes are synchronous, so this is fine. There's a
mostly-convenient function in fs/libfs.c that returns 0 that we can use
to do what we want ("mostly" because it was renamed in 2.6.35).

FIXES 130425

Change-Id: I9a2af60ed3152be036f0145c94152d8cff2e1242
Reviewed-on: http://gerrit.openafs.org/6491
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-01-03 07:26:06 -08:00
Anders Kaseorg
f1dd2d696f Linux: 3.2: Use set_nlink to update i_nlink
As of v3.2-rc1~84^2~1, struct inode.i_nlink is now const to prevent
direct modification.

Change-Id: If0a38ffb7f9964e23f5e64c900ae92f56fb77def
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/6096
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-11-20 18:02:11 -08:00
Andrew Deason
70e8451acd Add setenv/unsetenv to roken
Add the replacement setenv and unsetenv functions to roken, for use on
(at least) HP-UX and older Solaris.

Change-Id: Id05137b6e6c88eb6648bd6a6e649f9ef311e32a4
Reviewed-on: http://gerrit.openafs.org/5801
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-11-08 19:37:46 -08:00
Andrew Deason
353aa7ef2c Do OPENAFS_OSCONF before compiler autoconf tests
OPENAFS_OSCONF can set the C compiler we use, as well as changing
various compiler flags. These changes can alter autoconf tests, so
allow OPENAFS_OSCONF to change these before various autoconf tests are
performed which require the C compiler.

Change-Id: I8da7d10b227f230d1467c77845c0dbd4b48fa966
Reviewed-on: http://gerrit.openafs.org/5785
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2011-11-03 13:14:55 -07:00
Derrick Brashear
955bab670d ukernel: output dataversion in stat struct if possible
we already have this data; if we can output it, do so.

Change-Id: Ibc445a152e4e1e61be50003dd8683d2a4b32d190
Reviewed-on: http://gerrit.openafs.org/5510
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-09-28 11:53:26 -07:00
chas williams - CONTRACTOR
440943e96b autoconf: use $XCFLAGS from OPENAFS_OSCONF when making tests
Certain platforms (like ppc64_linux26) compiler options might
affect some autoconf tests.  In particular, the ones related to
the size of certain primitive types.

Change-Id: I20c3f737ee4623451bc6cab3f97e86d152cb397f
Reviewed-on: http://gerrit.openafs.org/5366
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-09-09 12:11:42 -07:00
Marc Dionne
def00ae8ba Linux: d_delete now takes a const argument
The d_delete dentry operation now takes a const argument.  Test for
this and define our function accordingly to avoid warnings.

Change-Id: I621f54d8e8182b29ccfdf82798773800f5870064
Reviewed-on: http://gerrit.openafs.org/5335
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-09-05 07:04:27 -07:00
Marc Dionne
cbaefa266d Linux: 3.1: adapt to fsync changes
The fsync file operation gets new arguments to specify a range.
Add a configure test to check for the API change.

The inode lock is also pushed down into the operation, so we need
to take it ourselves to keep the original behaviour.

Change-Id: Icf4e152ce52f2b32c99920f83a5cc3136c05d2cd
Reviewed-on: http://gerrit.openafs.org/5332
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-09-05 06:04:00 -07:00