397 Commits

Author SHA1 Message Date
Marc Dionne
2d04a9016b 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.

Reviewed-on: http://gerrit.openafs.org/6931
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit f246aa5f84a5233b6525ae43456a8da5b7e92984)

Change-Id: Ic0fccd9f09f811bab6e49639149e41fb71841547
Reviewed-on: http://gerrit.openafs.org/6933
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-03-22 10:32:26 -07:00
Christof Hanke
e0e23418bb linux: fix probing for noop_fsync
Commit 267934d0e6910c8d8166a6e78f93c1bab40857b8 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.

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>
(cherry picked from commit 20e82cecd9008f9b3467c9a323c5c3abf27f3021)

Change-Id: I478a1ea15150ca120c8f85e9696d8bdedfc974d1
Reviewed-on: http://gerrit.openafs.org/6751
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-02-22 17:44:52 -08:00
Andrew Deason
0329984e29 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.

Reviewed-on: http://gerrit.openafs.org/6671
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 80592c53cbb0bce782eb39a5e64860786654be9f)

Change-Id: If1539dd88d4d28771a7eafcdaff30a75cb230917
Reviewed-on: http://gerrit.openafs.org/6683
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-02-08 13:51:21 -08:00
Marc Dionne
39f0511911 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.

Reviewed-on: http://gerrit.openafs.org/6566
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 64bd0b728ca95ba7bb4f1fdd909386fde3ce81e1)

Change-Id: I93d169bec8f476d5e692f7f5a7fe31002af7ce1e
Reviewed-on: http://gerrit.openafs.org/6569
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-01-23 07:25:27 -08:00
Geoffrey Thomas
babc991c01 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

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>
(cherry picked from commit 267934d0e6910c8d8166a6e78f93c1bab40857b8)

Change-Id: Iaeb8a699673b6144c186b470f6d877fb54f1e319
Reviewed-on: http://gerrit.openafs.org/6493
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-01-03 10:38:22 -08:00
Andrew Deason
6908f7d93a aklog: Add replacement setenv/unsetenv
aklog makes use of the setenv and unsetenv functions, which do not
exist (at least) on HP-UX earlier than around 11i v3, and do not exist
on Solaris earlier than Solaris 10. Add replacement functions for
setenv and unsetenv when they are not present. Note that these
implementations are copied from libroken, and setenv was modified to
not use asprintf.

This is 1.6-specific. On the master branch, libroken takes care of
these for us. On the master branch, setenv and unsetenv from libroken
were added in 70e8451acd0426024c152073e53bc6606e0189e1.

Change-Id: I35546f1add7f4f87c6ffc484059057825887499f
Reviewed-on: http://gerrit.openafs.org/6376
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-12-18 18:56:59 -08:00
Marc Dionne
364fad6fa5 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.

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>
(cherry picked from commit cbaefa266d433af3b9a082a360e23a42f161d80f)

Change-Id: Idb6770204b014c62a8611548509240f8b5f950bc
Reviewed-on: http://gerrit.openafs.org/6098
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2011-11-21 06:07:49 -08:00
Anders Kaseorg
737a2802e9 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.

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>
(cherry picked from commit f1dd2d696fb9ab71b4192b156042e0c63019c58a)

Change-Id: I685aa6e8638e8fe864f1a6a7e428dfb6839ebcea
Reviewed-on: http://gerrit.openafs.org/6099
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-11-21 04:58:59 -08:00
Marc Dionne
7f55b45ed7 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.

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>
(cherry picked from commit def00ae8ba774f4d7290c29208484dda756dc0e0)

Change-Id: I128a721587f4963849652cb389472a550d81d267
Reviewed-on: http://gerrit.openafs.org/6097
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-11-21 04:58:40 -08:00
Derrick Brashear
accf7824d2 ukernel: output dataversion in stat struct if possible
we already have this data; if we can output it, do so.

Reviewed-on: http://gerrit.openafs.org/5510
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 955bab670d0aed714fc940b5be7e2b75896a63d0)

Change-Id: I9ce28fcb20cee8f15f71cd734b9da0ad85c12c3f
Reviewed-on: http://gerrit.openafs.org/5541
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-10-07 10:33:07 -07:00
Jonathan A. Kollasch
e909c5158b Add nbsd60 param files and autoconf logic
Reviewed-on: http://gerrit.openafs.org/4512
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 9fd238ea056b6883dd1caf6e8e724ad3ddabeb3a)

Conflicts:

	src/cf/osconf.m4

Change-Id: Ibac29f9b80624800db7c2829153fb9b2aeb44d6c
Reviewed-on: http://gerrit.openafs.org/5422
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-09-15 09:45:35 -07:00
Chaz Chandler
e475ca5410 afsio: rewrite using libafscp
afsio is a utility for file transfer to and from AFS file space
without the help of the AFS client/cache manager.  Using libafscp,
this (partially rewritten) version of afsio is able to accomplish
(1) authenticated access to an AFS path or FID (an existing
KerberosV ticket is required), (2) fall back on unauthenticated
("anonymous") access if authentication (token acquisition) fails,
and (3) work independtly of the AFS cache manager (afsd need not
be running, though CellServDB and ThisCell are currently required).

issues:
1) libvldbint and libafsint are not compiled pthreaded. we link in
what we need. this should be changed when we are all-pthreaded.
2) venus is not a pthreaded-directory otherwise. same deal:
in an all-pthreaded universe, undo the bodge that we do here.
3) venus is not an all-krb5 directory either. slight ick.

Reviewed-on: http://gerrit.openafs.org/4381
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 94d44d59e3d18f1d450e495a55fdd927e7584948)

Change-Id: Ibe140c58970f1b4f2f9e7f016e55d770f8cdcc09
Reviewed-on: http://gerrit.openafs.org/5383
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2011-09-10 16:35:53 -07:00
Anders Kaseorg
2b70e2508e Treat Linux 3 as Linux 2.6
Linux 3.0 is just a rebranded Linux 2.6.40, so we can use the same
sysname and the same code.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/4843
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 34bdd979fc487843c26f15655b94eac7c8f98fee)

Change-Id: Ibbedc447ea4b2dfa61f06a4b0b87a5bc884f711a
Reviewed-on: http://gerrit.openafs.org/4907
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-07-06 22:51:21 -07:00
Chas Williams (CONTRACTOR)
f9930accfd doc: let configure find the XML tools if possible
configure should attempt to find the XML tools we need to process
the documentation.  if it can't, it should provide a safe default.
still allow the user to override via command line.

Reviewed-on: http://gerrit.openafs.org/4766
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit cc2bc3e17ff5f7a10c515e309f8fec47a6fa14b6)

Change-Id: I4773affa193b5210da6416dd8b4321bd3f471429
Reviewed-on: http://gerrit.openafs.org/4794
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 20:32:45 -07:00
Christof Hanke
7640d15c91 linux: add read_descriptor_t configure test and ifdef
With linux 2.6.8 the struct read_descriptor_t changed.
Add a configure-test and respective ifdef to deal with that.

Reviewed-on: http://gerrit.openafs.org/4719
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 7133266bafbf238ef921690c40846f3ea2d2fc8b)

Change-Id: Ifdc7c1d3c4162452c1576942b7bfe37ea5014a77
Reviewed-on: http://gerrit.openafs.org/4726
Reviewed-by: Christof Hanke <christof.hanke@rzg.mpg.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-05-26 11:21:16 -07:00
Derrick Brashear
0ca30d92a1 macos: further next version support
try to optimize out things which will be missing

Reviewed-on: http://gerrit.openafs.org/4569
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit a33f77b6e11214326f5e752de171602c0e9efe86)

Change-Id: Ie20120aad8cb477d532594b9462aca3cf993aabb
Reviewed-on: http://gerrit.openafs.org/4571
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-04-27 18:47:59 -07:00
Marc Dionne
7494fa49b2 Linux: Fix fallout from path_lookup commit
Fix a few issues with the recent commit to deal withg the removal
of path_lookup, spotted on RHEL 5:
- the configure tests needs fs.h to be included before namei.h, to
get the definition of struct inode
- we need to avoid the use of struct path unless its needed; on
older kernels the structure doesn't exist

(cherry-picked from commit f2e91cc3fe61956e7661eae9da82ddf746e63824)

Change-Id: I752976dd5a68dd4212ad2c0088f799bd6a44ffc6
Reviewed-on: http://gerrit.openafs.org/4382
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-on: http://gerrit.openafs.org/4570
2011-04-27 04:58:25 -07:00
Marc Dionne
a8aa6f4221 Linux: 2.6.39: replace path_lookup with kern_path
path_lookup is no longer available, use kern_path instead.

Reviewed-on: http://gerrit.openafs.org/4360
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 7d162266c4958b22cc45d65e3f204a96c218e5f6)

Change-Id: I1c2aba273d1d597346ecb92f75caed6b6d624454
Reviewed-on: http://gerrit.openafs.org/4371
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-29 16:15:09 -07:00
Simon Wilkinson
9b62a95e4d Disable vectored positional IO if no 64bit support
In order to support vectored positional I/O, and large files, we
need there to be an implementation of preadv64 and pwritev64. If
this isn't present, then just disable HAVE_PIOV.

(cherry picked from commit 98a0c2f47b8641e3e31ed7d2f7d84c2eb484ef51)
Reviewed-on: http://gerrit.openafs.org/4153
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

Change-Id: I4e199c748d7b88ff7076106b19c3dec0e60be39a
Reviewed-on: http://gerrit.openafs.org/4160
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-07 20:26:24 -08:00
Andrew Deason
cc41996379 Prefer libHcurses over libcurses
Use the HP-UX-specific libHcurses instead of libcurses, like we used
to. Otherwise we fail to link some gtx programs.

Reviewed-on: http://gerrit.openafs.org/3583
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 651f66b0ffed08da82b352e3e252a03b8b13c780)

Change-Id: I6c3c7e219548c0694dc84d167535cacbbfbb1e02
Reviewed-on: http://gerrit.openafs.org/4079
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-02-27 04:06:26 -08:00
Christof Hanke
65ddae68df check curses-libs by configure
Presently, the used curses-library are determined by OS.
The leads to a build error when no curses-headers are installed.
Use configure to test if curses.h or ncurses.h is present.
ncurses takes precedence over curses.h.
If neither the curses- nor ncurses-libs are available, do not build
afsmonitor and scout.
A summary at the end of the configure should make this clear to
everyone.
The variable TXLIBS has been renamed to LIB_curses.

(cherry picked from commit 4a6a00d6f45bd0ac94e2eb05adee41552073643a)
Reviewed-on: http://gerrit.openafs.org/3345
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

Change-Id: Iea866ca6dfe758d95ef890f0d95e1c38012048b4
Reviewed-on: http://gerrit.openafs.org/4078
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-02-27 03:45:24 -08:00
Andrew Deason
5aebd8d541 LINUX: Replace dcache.h for fs.h in config tests
When detecting if we have certain Linux kernel features, we only
include dcache.h. On some kernel versions (at least 2.4.27),
compilation fails if we include dcache.h directly (due to e.g.
list_head not being defined), which causes false negatives in tests
such as the test for dcache_lock. If we instead include fs.h, which
includes dcache.h, the tests succeed when they should succeed. So, use
fs.h instead of dcache.h.

Reviewed-on: http://gerrit.openafs.org/3989
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 839b62ab414fde02e1a2093bc036c63c708d861d)

Change-Id: Ia8ea701c81bad9dc293ecb2848bd971052743c81
Reviewed-on: http://gerrit.openafs.org/4025
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-20 12:16:47 -08:00
Andrew Deason
02cbe51710 HPUX: Disable positional I/O
Some versions of HP-UX have the pread() and pwrite() functions, but
they behave in odd ways; most notably, ignoring the offset argument
when _FILE_OFFSET_BITS is defined to 64.

This is noted in recent gnulib documentation
<http://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/posix-functions/pwrite.texi>,
and slightly less clear references to pread() being broken can be
found on the development mailing list for git itself.

It is not completely clear what specific HP-UX versions are affected
by this. An autoconf run-time test may also be insufficient, because
the same binaries should be usable on machines with broken and
non-broken pread() implementations. So, to be safe, disable positional
I/O on HP-UX unconditionally.

Reviewed-on: http://gerrit.openafs.org/3949
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 11b2c6d6fe4dbbf5a54ae1e08e979c35ab6b7fa0)

Change-Id: Iaa27ae965482aafd0f981e70ce33df438af650e9
Reviewed-on: http://gerrit.openafs.org/3964
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-16 11:40:59 -08:00
Marc Dionne
9a91e1a9b1 Linux: 2.6.38: dentry->d_count is not an atomic
d_count is now an int protected by the dentry's d_lock.
Take the lock when we use it, instead of using an atomic_*
function.

Reviewed-on: http://gerrit.openafs.org/3883
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry-picked from commit 281f5bf5fbb0a546edcce62ef4e097ae9bbdbf73)

Change-Id: I45caa6aef451a7f93bfa43dfb1ebe9b0b856fbd0
Reviewed-on: http://gerrit.openafs.org/3935
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-02-12 20:04:01 -08:00
Antoine Verheijen
85eb528a68 OpenBSD: Add support for OpenBSD 4.8
Add param headers and other config info for OpenBSD 4.8
support.

Reviewed-on: http://gerrit.openafs.org/3748
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit be0e9fb703d9ca0ae17f1117cd53796f82d7fb30)

Change-Id: I03d4474d66d015126654d6d031a1870705733a41
Reviewed-on: http://gerrit.openafs.org/3922
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-11 05:15:13 -08:00
Antoine Verheijen
471ec3d1e2 OpenBSD: Make OpenBSD 4.7 param headers consistent
OpenBSD follows the policy of using a separate common
param file (post 1.4.x). However, when introducing support
for i386 OpenBSD 4.7, this was not done and a single param
config header file was created instead. This patch changes
the param files for OpenBSD 4.7 so that they are
consistent with the other OpenBSD versions by using a
separate common param header file.

Reviewed-on: http://gerrit.openafs.org/3725
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit cd6bd75d1c97ce87ab1597d80fcd3cee2ea18825)

Change-Id: I5845e68f3fd7fac905993a0ac7a371e058c9a618
Reviewed-on: http://gerrit.openafs.org/3920
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-10 20:09:23 -08:00
Marc Dionne
cc0382da34 Linux: 2.6.38: deal with dcache_lock removal
dcache_lock is gone in 2.6.38, and some of the vfs locking rules
have changed.

Of interest for openafs:
- inode->i_lock protects the d_alias list
- dentry->d_lock protects d_unhashed()

Add a new configure test for dcache_lock, and replace its use by
the appropriate new lock(s).

Reviewed-on: http://gerrit.openafs.org/3771
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 2eca7aef7b2940e4ef5f9901ce28481af6edb6dd)

Change-Id: Ic6cff1884a55aeb2ab29518e8d160000c6254fc5
Reviewed-on: http://gerrit.openafs.org/3918
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-10 20:08:54 -08:00
Marc Dionne
af5e870f59 Linux: 2.6.38: Adjust for permission inode operation changes
The permission i_op has a new signature with a flags argument, and
must now deal with RCU path walking.
- Fix existing configure test for this i_op, it succeeds when it
shouldn't
- Add a new configure test for the new signature
- Make our permission i_op "RCU-walk aware" - return ECHILD if
called in that mode

Reviewed-on: http://gerrit.openafs.org/3770
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 5bcc0ea735ea519298c98b46c66bf1326cdee5e4)

Change-Id: Ia47dfe390ea317925acfca709dbd637b68e94ca8
Reviewed-on: http://gerrit.openafs.org/3917
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-10 20:08:43 -08:00
Marc Dionne
06b8a3d52b linux: 2.6.38: New d_op handling
In 2.6.38, the super block structure has a new field to hold the
default dentry ops.  The vfs will automatically set it for new
dentries in most cases.

Set s_d_op to our set of operations, and omit setting the dentry
ops where the vfs will already do it (and where new locking rules
prohibit it).

Reviewed-on: http://gerrit.openafs.org/3758
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 08bb83d95027bb3ac68834d12b72bdc647fa24a9)

Change-Id: Ia108e8c7c624521965bdbddd7a37ebf281eb7967
Reviewed-on: http://gerrit.openafs.org/3869
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 06:55:10 -08:00
Michael Meffie
0b7c5f7b56 ihandle positional read and write
When available, use POSIX positional read and write
calls in the ihandle package. Originally written
by Derrick Brashear and Andrew Deason.

(cherry picked from commit 335ccb4082657b7d0e4e9af1076356cf115642d2)
Reviewed-on: http://gerrit.openafs.org/1562
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

Change-Id: I6616a8f7ba04410c57097fb6fa687258b847ac4e
Reviewed-on: http://gerrit.openafs.org/3884
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-02-03 08:24:15 -08:00
Marc Dionne
4209e98c2d Linux: 2.6.37 - replace get_sb with mount
With kernel 2.6.37 the new entry point for mounting a filesystem
is the mount() operation instead of get_sb().

Replace afs_get_sb with afs_mount if the new operation is
available, and use mount_nodev instead of get_sb_nodev.

Note that this is not strictly required for 2.6.37 since the old
interfaces are still around, but we might as well switch now.

Reviewed-on: http://gerrit.openafs.org/3245
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 2ea841feac2de8ade987c18cb7043aacfebe0d83)
Change-Id: I1f17068a1a06654568f30b75c5c65da0100995cd
Reviewed-on: http://gerrit.openafs.org/3251
2010-11-25 13:31:01 -08:00
Chas Williams (CONTRACTOR)
0372a9f65d configure: --with-linux-kernel-packaging should default to disabled
the test for this build feature is reversed.  by default, the value for
with_linux_kernel_packaging will not be defined which makes the existing
test pick MPS='SP' instead of LINUX_WHICH_MODULES.  based on the configure
help messages, this would appear to be an opt-in not an opt-out.

...
Optional Packages:
...
  --with-linux-kernel-packaging
                          use standard naming conventions to aid Linux kernel
                          build packaging (disables MPS, sets the kernel
                          module name to openafs.ko, and installs kernel
                          modules into the standard Linux location)
...

Reviewed-on: http://gerrit.openafs.org/2869
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 87e96c30e069a2379365c9947a311e700cf51c4d)
Change-Id: Id46afcb341104795c8e206261a2b1dfac289f37b
Reviewed-on: http://gerrit.openafs.org/2938
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-05 12:25:38 -07:00
Matt Benjamin
56e0c3d8ed DFBSD update dfbsd userland
Add new sysnames.  Fix some userland header inclusions,
defend against kernel-mode ioctl interpretation when
building UKERNEL.  Add fragments missing from DFBSD
MakefileProto template.

Change-Id: I56659bfe43dc24ef8a158aaf486c9a6f23643002
Reviewed-on: http://gerrit.openafs.org/2619
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 239a62034b849565d680baa9e5b8e6921256ffd5)
Reviewed-on: http://gerrit.openafs.org/2684
2010-09-07 11:45:40 -07:00
Chaz Chandler
e8bb948db1 autoconf detection of label support
acinclude.m4 now has struct label support detection and sets
HAVE_STRUCT_LABEL_SUPPORT in afsconfig.h.  Obviates complicated
ifdefs in various src/afs/ and src/rx/ files.  Must run regen.sh
to generate new configure and afsconfig.h.in, then configure will
detect label support and set afsconfig.h appropriately.  Not sure
what to do for Windows, but should be a step in the right
direction.

Fixes issue with compilation of libuafs on IRIX and sunpro by accurately
detecting label support.

Change-Id: I092eda47c4cfcc2517dc39f5e48b5038c413cb01
Change-Id: I2ff8449b28db645d9cfd27796b5f89e5c328a2b2
Reviewed-on: http://gerrit.openafs.org/2516
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-12 15:07:21 -07:00
Marc Dionne
fb01fbd7cd Linux: switch to evict_inode
In 2.6.36, the delete_inode and clear_inode inode operations
are replaced by evict_inode.
Rename our current clear_inode to evict_inode, and add a few
things that were previously handled by the generic delete_inode.

This is required for 2.6.36.

Change-Id: I68d75830b43df710ccce173ab36f3bb39074c59e
Reviewed-on: http://gerrit.openafs.org/2544
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-12 13:46:04 -07:00
Marc Dionne
eaf3378f53 Linux: adapt to truncate sequence changes
As part of changes to the truncate sequence, inode_setattr() no
longer exists, and all filesystems have to define the setattr op
so we can assume that it is not NULL.

Introduce a compat inline function afs_inode_setattr that hides
the tests and the different versions from the main code.

Note that the existing test for the inode_setattr() return type
will fail, but the value is no longer used in that case.

This is required for 2.6.36

Change-Id: I2f5e8a0b660b48453d0152b6c4db64e57539f91a
Reviewed-on: http://gerrit.openafs.org/2543
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-12 13:43:53 -07:00
Derrick Brashear
3121a07fbf disable pmtu error gathering
don't enable kernel pmtu, don't collect errors.

a report from Marc Dionne suggests there are still issues here

Change-Id: Ib54fa522ba53efe50e8f08b27422ebfc8af7f9e5
Reviewed-on: http://gerrit.openafs.org/2538
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-11 22:54:54 -07:00
Andrew Deason
1ad26bc193 autoconf: Force absolute INSTALL
Force using an absolute path for install-sh. Autoconf normally prefers
using a relative path, which confuses (at least) part of the libafs
build system.

Change-Id: I6962e61bb866362f674708e611ff22eb190a771a
Reviewed-on: http://gerrit.openafs.org/2461
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-07-22 11:51:38 -07:00
Simon Wilkinson
c3fc948e34 Check for crypt in external library
Check to see if we need to explicitly include a library in order
to get the crypt() function

Change-Id: I9bd1d70e420d4d1656bd86cd3215525102fa6259
Reviewed-on: http://gerrit.openafs.org/2404
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-07-13 21:45:18 -07:00
Derrick Brashear
95f51b8670 enable pmtu in configure by default
if we can get a socket error to let us get pmtu discovery info,
use it.

Change-Id: I7756c1a00e6cb018146a5b0545bed828446e5483
Reviewed-on: http://gerrit.openafs.org/2400
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-07-13 21:25:25 -07:00
Derrick Brashear
3610ba191f demand attach build always
always build demand attach. includes doubtless-broken
windows support. installs dafileserver, dasalvager, davolserver.
salvageserver keeps its (unique) name.

Change-Id: Ia272dd2b0f72789b9e0f2a7712f9c206bb922095
Reviewed-on: http://gerrit.openafs.org/2403
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-07-13 21:22:30 -07:00
Derrick Brashear
b666166b6d simple is-lex-flex autoconf test
if we're flex, we may need to be lex-compatible. engage
it if we're flex

Change-Id: If9a39ca0bce3f4a68b742d1e8f0c679d3f79896e
Change-Id: I7f245d579bcc46fdd0aa7202bbd45f3f9f647ebc
Reviewed-on: http://gerrit.openafs.org/2399
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-07-13 19:27:46 -07:00
Derrick Brashear
52fe3b2748 64bit macos new config.guess support
new config.sub/config.guess call 64 bit macos something
new. update our handling so we deal.

Change-Id: Ieadd71b66e879ff58bf2c7f77173284c570e4252
Reviewed-on: http://gerrit.openafs.org/2398
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-07-13 11:35:21 -07:00
Derrick Brashear
d29643b055 unix disconnected mode always
per 1.6 release plan, enable disconnected always. eject ifdefs
(and a stray printf that was hidden in one)

Change-Id: I6a68cb8506878c28502e1742a48858f2e84958f5
Reviewed-on: http://gerrit.openafs.org/2397
Tested-by: Jason Edgecombe <jason@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-07-13 11:35:09 -07:00
Derrick Brashear
27d415d2b8 linux cache bypass by default
can't eject the ifdef yet as this is not fully portable now.
however, just enable it always.

Change-Id: Ia7a49a10377f308740ebd42027ac9748b073016e
Reviewed-on: http://gerrit.openafs.org/2396
Tested-by: Jason Edgecombe <jason@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-07-13 11:34:53 -07:00
Ken Hornstein
cdef1c67ae fix dumptool on macos
make dumptool in test suite compile on macos again

Change-Id: Id60f625ce53bc9695673b68c733fa653521a8122
Reviewed-on: http://gerrit.openafs.org/2387
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-07-12 12:17:17 -07:00
Derrick Brashear
bdf6192509 bosserver force corefiles
override system resource limits so we get corefiles

Change-Id: I50f228d709090c8275bed2fc2958653c43a0a026
Change-Id: I5b5e8c6a5e02ed0b28610949eb81f6345357969e
Reviewed-on: http://gerrit.openafs.org/1959
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-07-02 09:35:36 -07:00
Andrew Deason
e61800b992 Remove --enable-fast-restart configure option
FIXES 127526

Change-Id: I80a18fe083a0d52dad9d4e2d5b14bf667c44630b
Reviewed-on: http://gerrit.openafs.org/2278
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-07-01 08:32:19 -07:00
Marc Dionne
b59af55f80 Linux: Use filehandles for all 2.6 kernels
This generalizes the use of the exportfs API and file handles
to open disk cache files for all 2.6 kernels.

Code outside of src/afs/LINUX (ex: afsd) can assume that file
handles are used for all 2.6 kernels and can use AFS_LINUX26_ENV
to check.

Within src/afs/LINUX/osi_file.c, NEW_EXPORT_OPS can be used to
determine if the old exportfs API (pre 2.6.24) or the new one
applies.

All traces of the LINUX_USE_FH define are removed.

FIXES 127530

Change-Id: I6803101c56981f9f674cef581f7299656723fdf3
Reviewed-on: http://gerrit.openafs.org/2260
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-06-27 20:33:12 -07:00
Andrew Deason
5e4c33f563 Indicate that fssync unix sockets are the default
Using unix domain sockets for FSSYNC has been the default for some
time now; make it clear from the configure help output that this is
the case.

Change-Id: Ibe8b41361242d6cea035b7710910d7d693f60a85
Reviewed-on: http://gerrit.openafs.org/2241
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Russ Allbery <rra@stanford.edu>
2010-06-23 15:57:26 -07:00