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: Id6b17d9cfe18d348a66df02f6b309fc53b00da86
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/3999
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-on: http://gerrit.openafs.org/4044
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
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: Ie405bb1e40cca4ba83bca3e051e2ab54b8850ac6
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/3998
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-on: http://gerrit.openafs.org/4043
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
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: Ia808d6bcd119f3999a1805b1d31678f5a3ba3d55
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/3994
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-on: http://gerrit.openafs.org/4041
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
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: I38db16f0f62500f46fad9c92d045ccfa6cfe1c38
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/3997
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-on: http://gerrit.openafs.org/4040
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
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
Reviewed-on: http://gerrit.openafs.org/2543
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry-picked from commit eaf3378f537935f6b9843886b43d)
Reviewed-on: http://gerrit.openafs.org/2550
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 58e56d080b8d19117b60f04ecb37af0c6dcafc1a)
Change-Id: I4cfdd191c60d7672c80aa3b3789e52c3e5e87666
Reviewed-on: http://gerrit.openafs.org/3519
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
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.
Reviewed-on: http://gerrit.openafs.org/2544
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry-picked from commit fb01fbd7cd2d396df8a4605eaad9febc52ef3b61)
Reviewed-on: http://gerrit.openafs.org/2552
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit e05b5937201ec313d2c8fa863f4dacec87ab687d)
Change-Id: I42a22dbea4f880f5c8bb1cd0904f1711b3a48292
Reviewed-on: http://gerrit.openafs.org/3517
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
The 'name' element of the backing_dev_info structure is new in
2.6.32 - add yet another configure test, and #ifdef to protect our
setting of it.
Change-Id: I0a3e411e571e05771619381bf621d299482c695b
Reviewed-on: http://gerrit.openafs.org/1341
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit a9951410e1cb1a713f9d26a24d6b3cf485f94ac6)
Reviewed-on: http://gerrit.openafs.org/1498
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
<linux/autoconf.h> is automatically included by kbuild; you aren’t
supposed to include it directly. That breaks in 2.6.33 because
<linux/autoconf.h> is moving to <generated/autoconf.h>.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Change-Id: I56c90dfe90ef72408620793fcd4e927ea3d8f468
Reviewed-on: http://gerrit.openafs.org/1350
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 660c7a3952f36fc892e12aa6b11eda3295b1416d)
Reviewed-on: http://gerrit.openafs.org/1374
This test needs <linux/autoconf.h>, which has moved in 2.6.33. It is
also unused (it was removed in master by commit
35d5b6c4e101c92e2c242bb75029db24eb1aa7d7).
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Change-Id: I7876fed2ed2b0395cdf29c71edfdad1089c88cce
Reviewed-on: http://gerrit.openafs.org/1354
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Fix the kmem_cache constructor function to match the current
expected prototype, and cleanup related code. This has been wrong
for a while, but since we were just passing extra parameters the
only effect was to generate a warning.
- Add a new configure test to detect the new constructor function
signature
- Define the older versions of the constructor in osi_compat.h,
making them call the current version
- Move a few compatibility #defines to osi_compat.h
(cherry picked from 3abc87a5a94f0d5eaca702c7bd66fbe35ce7b896)
Reviewed-on: http://gerrit.openafs.org/657
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I3570a3268d35ac73409b96816ba5112f809f6645
Reviewed-on: http://gerrit.openafs.org/994
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
sadly only recent kernels include uintptr_t. change the cast to use unsigned
long
Change-Id: Ib69f7aa0f2d316c5ea8bdc960b15ee0f89f96250
Reviewed-on: http://gerrit.openafs.org/1059
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 165571947be770645900bb8d55ba7b6a3c58f8fd)
Reviewed-on: http://gerrit.openafs.org/1081
The binary sysctl interface will be removed in kernel 2.6.33 and
ctl_name will be dropped from the ctl_table structure.
Make the code that uses ctl_name conditional on a configure test.
(cherry picked from commit 886801b069fab1e6fc94003221dcfe18e05ac376)
Change-Id: Iba0f107f299c6515e4e560d7596e6187bd68e399
Reviewed-on: http://gerrit.openafs.org/904
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-on: http://gerrit.openafs.org/1013
Tested-by: Derrick Brashear <shadow@dementia.org>
In kernel 2.6.33, utsrelease.h has moved to include/generated.
Adapt the configure code to consider that location, and clean
up that section's indentation.
(cherry-picked from 36f97969f39637042a54c0d45877a48cc9dfcac1)
Change-Id: Ifb139aa8183740612fbb5e8dc06faf982fef9397
Reviewed-on: http://gerrit.openafs.org/1012
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Adapt to the writeback changes in kernel 2.6.32
- Since we define our own backing_dev, it needs to be registered with
the writeback code and attached to the super_block. Otherwise it
might get ignored when writeback is needed.
- Each backing_dev now gets its own kernel thread. The name of the
thread is based on the registered name - the openafs one will appear
as "flush-afs".
Reviewed-on: http://gerrit.openafs.org/574
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: Ib1403a65991fc7c2cb73099feef7e0dbec02543d
Reviewed-on: http://gerrit.openafs.org/755
Add arm*-linux* to the case statement that attempts to automatically
determine the AFS sysname, similar to the other Linux sysname
determination cases.
Reviewed-on: http://gerrit.openafs.org/334
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit a59df36211d6bc641eeec6d8fd8876a98ce3600a)
Reviewed-on: http://gerrit.openafs.org/462
Make things build on MacOS 10.6 again. Don't break 10.5 build.
Fix an error in the MacOS port which was left from previous head.
Reviewed-on: http://gerrit.openafs.org/96
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 1d1ae6195bd03c4348a57914cf892e06b507d855)
Reviewed-on: http://gerrit.openafs.org/355
Tested-by: Derrick Brashear <shadow@dementia.org>
The move to git means that we can no longer populate the RCSID
macro in the way that it was used with CVS. This patch simply
removes the macro from every file, except where it contains
information from upstream (and it's in a comment).
Reviewed-on: http://gerrit.openafs.org/14
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 3bb5fa5f1b3dc13ab20ed026c7ea64e11388b9c9)
Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/174
Tested-by: Derrick Brashear <shadow@dementia.org>
LICENSE IPL10
FIXES 125001
check for key_type_keyring being exported; only use it if so
(cherry picked from commit 4ca66112c2a012e04619445275507ae9cd6c11da)
LICENSE IPL10
deal with this in a way which does not trip creation of CML state config files
(cherry picked from commit 0a617e33234f6104fdfb0d45593cf313c961f653)
LICENSE IPL10
FIXES 124804
add configure switches for building docs. generate version files needed.
(cherry picked from commit e452c704c59700496227dccb3161efd34ca709ba)
LICENSE IPL10
FIXES 124681
blkcnt_t doesn't exist on fbsd, macos 10.3, and isn't really the right type.
this is the right type, but also can be missing. test appropriately.
(cherry picked from commit 070f02923cfa4e01ccb754928cdd4d02bec48720)
LICENSE IPL10
FIXES 124507
Fix the old configure test for key_alloc for the task argument - we
can't just rely on the number of arguments anymore. Wish this could be
done without using -Werror.
Add an additional test for the struct cred argument
(cherry picked from commit bf9dc554b366b08ce0bef62ce242c94371938000)
LICENSE IPL10
FIXES 123604
The code has long contained a backing_dev_info structure, but it
was never attached to anything. Initialize its use properly with
bdi_init, and attach it to i_mapping for every newly filled inode.
bdi_init and bdi_destroy are needed for proper initialization of
some percpu counters, otherwise we get some oopses.
(cherry picked from commit 18e78d91e78e541fce6c9295919946af0744aa7e)
LICENSE IPL10
FIXES 124093
make libuafs work with things which expect to be able to use native file
sizes etc
(cherry picked from commit 47ac8ba7022e80e5bc0023782b6b27d5ac97ccd3)
LICENSE IPL10
FIXES 124094
avoid a race during truncation which trips an issue when fsx is run
(cherry picked from commit f49bf1d919b48901533da78c9fe38ca0339b7bca)
LICENSE IPL10
FIXES 124077
the undefs for things which are not ac macros ended up outside the ac verbatim
blob. fix it.
(cherry picked from commit 2d07a62c38fea642d52c20ff86e8f72e3c16bbe0)
LICENSE IPL10
FIXES 118058
fix the quoting and remove the tests we shouldn't need anymore
(cherry picked from commit bc9c0a14154639d8e45554a3abeb867af9a8d0b2)