After scanning the volume, release the header ihandles
for the volume.
Reviewed-on: http://gerrit.openafs.org/5099
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 4aa72b4308bae8e1d789682e7ead83bcadded862)
Change-Id: I7a24892fc5f6d77b4aaff4a280063bc13cf4d81e
Reviewed-on: http://gerrit.openafs.org/11263
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
nfs.h is required for various types used in vol-info.c. Include it. On
namei this header gets pulled in indirectly via other means, but on
inode it does not (and we shouldn't be relying on such anyway).
Reviewed-on: http://gerrit.openafs.org/5185
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 2cd9d0536b173bf8c983aecd8599de0a82610151)
Change-Id: I8c4b1c096b617a3ed62b8e1c7b8677ee7de2a56e
Reviewed-on: http://gerrit.openafs.org/11262
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
For consistency, allow -sizeonly (all lowercase letters) to
request the size summary. The old option name, -sizeOnly is
available as an alias.
Define the command line option parameter positions and use
those to set and look up the options.
1.6 note: The libcmd in 1.6 lacks parameter aliases and offsets.
Instead we create params the normal way and make the offsets enum line
up with the default offsets. To get an alias for -sizeonly, we create
a new parameter that just does the same thing (P_SIZEONLY_COMPAT).
Reviewed-on: http://gerrit.openafs.org/4741
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 1a4262253e78aa7a4e8c58006abd3301f71bab89)
Change-Id: Ic630a7c0b29bd62525dd2211a7771c647e1be8df
Reviewed-on: http://gerrit.openafs.org/11258
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Accept a partition id for the -part option. For example, -part a
is the same as -part /vicepa.
Reviewed-on: http://gerrit.openafs.org/4739
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 8fc3d6dfe196771a38f2bfe7275e90a73f742931)
Change-Id: I9a52dc881e6b77526656ca94e4f175241a79551b
Reviewed-on: http://gerrit.openafs.org/11257
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Untangle the various global mode variables, which became muddled when dsizeOnly
and saveinodes were introduced. DumpInfo now indicates the default mode and
DumpVnodes means print the vnode entries, not scan but sometimes print. Remove
unused globals.
Reviewed-on: http://gerrit.openafs.org/4735
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 277a8ad658572b60e7e460c945adee78cc04038d)
Change-Id: I9d5d9e9b2b65d703f5b35091f072b31072485d83
Reviewed-on: http://gerrit.openafs.org/11253
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Refactor volume and vnode handling code for better
maintainability. Move the code invoked by -saveinodes to a new
function. Remove an unneeded else clause in HandleVolumes.
Reviewed-on: http://gerrit.openafs.org/4734
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 56714e9a4d01d1718bbca9f3930c2993e4b7d094)
Change-Id: I96da8a2824af7283fa2d3fb34622d06715c058cb
Reviewed-on: http://gerrit.openafs.org/11252
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Commit 0fc27471e7da0c5de4addcdec1bfbca5208072cc avoids processing lock
requests for RO volumes, but it did this both in afs_lockctl() and in
the Linux-specific afs_linux_lock(). The changes in afs_linux_lock()
are incorrect, since they also avoid F_GETLK requests (whereas
afs_lockctl() just avoids F_SETLK* requests).
Additionally, the section in afs_linux_lock() incorrectly reports an
error, since it returns a positive EBADF error code, when we are
supposed to return -EBADF.
The result of all of this is that an F_GETLK F_WRLCK request for an RO
volume always fails with fcntl() returning 9 (EBADF), which is an
invalid return code for fcntl() F_GETLK (instead we should return -1
with an errno of 9). But if there are no locks, we should return
success anyway.
Just remove this section, since afs_lockctl() handles this case itself
anyway.
Thanks to Todd Lewis for reporting this issue.
Reviewed-on: http://gerrit.openafs.org/11316
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit e0d0e6ffdbb11d5445b129ef0bd5030aec59d333)
Change-Id: Ia5d03e55f7bad9f5678cdb82808b56d975865438
Reviewed-on: http://gerrit.openafs.org/11361
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Background: when an entry is looked up after its parent changes,
afs_linux_dentry_revalidate re-looks-up the entry name in its parent.
If we get an ENOENT back, we d_drop the dentry, and in any other
situation we just d_invalidate it. As discussed in prior commits
997f7fce437787a45ae0584beaae43affbd37cce and
389473032cf0b200c2c39fd5ace108bdc05c9d97, we cannot simply d_drop the
dentry in all cases, because that would cause legitimate directories
to be reported as "deleted" if we just failed to lookup the entry due
to e.g. transient network errors (this causes, among other things,
'getcwd' to fail with ENOENT).
However, this logic has problems if the dentry name still exists, but
points to a different file; the case where 'tvc != vcp' in
afs_linux_dentry_revalidate. If that case happens, and the dentry is
still held open by some process, we will continue to try to reference
the vcache pointed to by the 'old' dcache entry, which is incorrect.
To maybe more clearly illustrate the issue, consider the following
cases:
$ sleep 9999 < /afs/localcell/testvol.ro/dir1/file1 &
$ rm -rf /afs/localcell/testvol.rw/dir1
$ mkdir /afs/localcell/testvol.rw/dir1
$ vos release testvol
$ ls -l /afs/localcell/testvol.ro
ls: cannot access /afs/localcell/testvol.ro/dir1: No such file or directory
total 0
d????????? ? ? ? ? ? dir1
Here, on the last 'ls', afs_linux_dentry_revalidate will afs_lookup
'dir1', and notice that it points to a different file (tvc != vcp),
and will d_invalidate the dentry. But since the file is still held
open, the dentry doesn't go away, and so we are still pointing to the
vcache for the old, deleted 'dir1'. That file doesn't exist anymore on
the fileserver, so we get an ENOENT when actually trying to stat() it
(we get a VNOVNODE from the fileserver, whcih gets translated to an
ENOENT).
A possibly more serious case is when the file is just renamed:
$ sleep 9999 < /afs/localcell/testvol.ro/dir1/file1 &
$ mv /afs/localcell/testvol.rw/dir1 /afs/localcell/testvol.rw/dir1.moved
$ mkdir /afs/localcell/testvol.rw/dir1
$ touch /afs/localcell/testvol.rw/dir1/file2
$ vos release testvol
$ ls -l /afs/localcell/testvol.ro/dir1
total 0
-rw-rw-r--. 1 1235 adeason 0 Jul 23 11:09 file1
$ kill %1
$ ls -l /afs/localcell/testvol.ro/dir1
total 0
-rw-rw-r--. 1 1235 adeason 0 Jul 23 11:10 file2
In this situation, the same code path applies, but the old file still
exists, so we will continue to use it without error. But since we are
still pointing at the old file, of course the results are incorrect.
Once we kill the process holding the file open, the bad dentry finally
goes away and the results are valid again.
To fix this behavior, d_drop the dentry in all cases, except when we
encounter an error preventing the lookup from being done. This ensures
that the dentry is unhashed from the parent directory in the scenarios
above, and so cannot be used for a subsequent lookup.
With this change, the only afs_lookup response that causes a simple
d_invalidate is when we encounter actual errors during the lookup
(such as transient network failures). This is correct, since in those
cases we don't _know_ that the dentry is wrong. For all other cases,
we do know that the dentry is wrong and so we must force it to be
unhashed.
Reviewed-on: http://gerrit.openafs.org/11320
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit a5866b3a7c21551a8aa40fc6141cca3a65fea563)
Change-Id: I5dbde974e9166d120a5040e81696adfebf94194d
Reviewed-on: http://gerrit.openafs.org/11358
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Fix the missing error location code introduced in commit
40fb2650b783fbafe51aefd3d0af7a6b0536c265
libafs: allocate vattrs in LINUX to reduce stack used
Use location number 104, which is the next in the sequence.
The code in this module is compiled when building the
nfs translator, which is only built under linux when
configure detects it is possible.
Thanks to Andrew Deason for spotting this error.
Reviewed-on: http://gerrit.openafs.org/11351
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit 05dbea9fc4da02c6349d9e0b69656acb3254cfe8)
Change-Id: I5bb69b68716f6a7147d24c0bd698c10488bca2d4
Reviewed-on: http://gerrit.openafs.org/11366
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Allocate temporary vattrs in LINUX to reduce the amount
of stack space used.
Reviewed-on: http://gerrit.openafs.org/11170
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit 40fb2650b783fbafe51aefd3d0af7a6b0536c265)
Change-Id: I1f19c07a2ad0f8cdddd88e4528584caccaa403e0
Reviewed-on: http://gerrit.openafs.org/11339
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Add a pair of functions to allocate and free struct vattrs,
to avoid having struct vattrs on the stack.
Reviewed-on: http://gerrit.openafs.org/11169
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit 9630c075409a262424805411ed473178814b412c)
Change-Id: I7746ee69f7fde8760c066458ecfe44da46edbf81
Reviewed-on: http://gerrit.openafs.org/11338
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Do not allow callers to pass a NULL cred to afs_CreateReq. This
avoids setting the uid of zero in the vrequest when no cred is
passed. Update callers to pass afs_osi_credp for an anonymous cred
when no cred is available.
Thanks to Andrew Deason for pointing out afs_osi_credp should be
used.
Reviewed-on: http://gerrit.openafs.org/11336
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit b7f1763652fb932ca5bd3f3351a48df11e58f2dc)
Change-Id: I0a7f17a05decdd0a9ef1ff72d7bf73153db95bed
Reviewed-on: http://gerrit.openafs.org/11365
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Allocate temporary vrequests to reduce the amount
of stack space used.
Reviewed-on: http://gerrit.openafs.org/11005
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit 1ac4eb1b84db2732b9c2645492daff9e25417475)
Change-Id: I5d982afce489fbcf82cbcb69bd2677fcb0236237
Reviewed-on: http://gerrit.openafs.org/11167
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Gergely Madarasz <madaraszg@gmail.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
afs_lockctl has common cleanup code in the 'done' label. Use it here,
instead of trying to duplicate it.
Currently this code path appears to not be dropping the discon lock,
which this rectifies.
Reviewed-on: http://gerrit.openafs.org/8196
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit eae608d99a5ae94624200f91af6ed818c9f6612b)
This commit fixes a vrequest leak introduced by change
I1c60701d4e4f85aedfea6be58a03468ab34edb96. On master, the corresponding
changes appear in the opposite order.
Change-Id: I1f7a5794f19abb1495bbab6014c3ccde99cf0e1d
Reviewed-on: http://gerrit.openafs.org/11381
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Allocate temporary vrequests to reduce the amount
of stack space used.
Reviewed-on: http://gerrit.openafs.org/11004
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit 9930567bcf9655d3f562b210b2dc4b4a99226691)
Change-Id: I1c60701d4e4f85aedfea6be58a03468ab34edb96
Reviewed-on: http://gerrit.openafs.org/11166
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Generate source and header files separately to support parallel make
without contortions.
Add a complete list of dependencies for each generated header file
to avoid build errors during parallel make.
Reviewed-on: http://gerrit.openafs.org/10370
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit c01236beb5a6ad55cd424f0ccc3a836d737f78f3)
Change-Id: Ib0e3c3b8e0a268f7db741243ce78fed9f6c342c7
Reviewed-on: http://gerrit.openafs.org/11242
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
The 10.1 release cycle is starting in a month, so let's get ahead of
the curve by adding the config bits now.
Reviewed-on: http://gerrit.openafs.org/11328
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 2809bae58851ce9168ca8b18c94360392b8a609f)
Change-Id: I71779d247725c48ee362e4ff8e9356ce060863d4
Reviewed-on: http://gerrit.openafs.org/11369
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Heimdal 1.5.2 happily tries to dereference a keytab file even if
none is there. if we have a FILE: type, stat it before use
1.6 only change: master uses KeyFileExt
FIXES 131852
Change-Id: I939eb9e47d2dbbef75c2a64724fdb9111f600150
Reviewed-on: http://gerrit.openafs.org/11075
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Use the new compile_et -emit flag to generate source and header
files separately to support parallel make.
Export afs_trace.h since it is required to build libafs. Before the
compile_et -emit flag was available, The afs_trace.h file was
generated as a side-effect of creating afszcm.cat.
Reviewed-on: http://gerrit.openafs.org/10729
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit 4e6b7ab904d38d38da1b80a7342bd815668a8c09)
Change-Id: Ic1474aff86e49d8df0ba151ed0e53932aa96d1ed
Reviewed-on: http://gerrit.openafs.org/11239
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Use the new compile_et -emit option to generate source
and header files separately for parallel make support.
Remove unneed -h options, since there are no prolog
files and the header names match the error table names.
Reviewed-on: http://gerrit.openafs.org/10730
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit e97198372a8ddbdba4b5a58c0659f2aa5d2b2d56)
Change-Id: Ic8da7c3dea7953cb7ad33120df06ec1f7399bf2d
Reviewed-on: http://gerrit.openafs.org/11238
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Common makefile macros to generate headers and source files
separately using the new compile_et -emit option.
Reviewed-on: http://gerrit.openafs.org/10869
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit be36376b244d1d94b24cb8fce44810fb31b7b5ce)
Change-Id: Ic9cf078f6a013e7529ae8f11b0378173e64ee680
Reviewed-on: http://gerrit.openafs.org/11237
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
bubasics is a dependency of libadmin. Add it to the top level
makefile.
This missing dependency was found by analyzing the libadmin header
file includes.
Reviewed-on: http://gerrit.openafs.org/10727
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit b8589f1b59e520aae8d412170b663ff3bc214667)
Change-Id: Ie879c29a72bbf194bf48dea73380521dc89c4c38
Reviewed-on: http://gerrit.openafs.org/11236
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Add the missing header file dependencies to the library targets.
This is needed for parallel make.
Reviewed-on: http://gerrit.openafs.org/10726
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit d2084563648cc1e8ec697c61f593935a0b5804a3)
Change-Id: I47b3b184a3284b56c4047e27b58b6cb3a8e16cef
Reviewed-on: http://gerrit.openafs.org/11235
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Change I47b3b184a3284b56c4047e27b58b6cb3a8e16cef will add
dependencies on the header files to the library targets. Before
this can be done, we have to avoid the use of $? in compilation
rules because on AIX and OS X this causes the headers to be added
to the compilation command, making builds fail.
This is a 1.6-only change. The corresponding commit on the master
branch, f22ae5f7d8b3c143de21355f819ab872a0cf76fd, is no candidate
for a backport to 1.6.
Change-Id: Iefb432555c60bcfdf51436ebe76a267969280fe0
Reviewed-on: http://gerrit.openafs.org/11353
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Add a makefile rule to export the libadmin afs_AdminErrors.h header
file, instead of exporting afs_AdminErrors.h as a side effect of
generating the afs_AdminBosErrors error table.
Add the missing afs_AdminErrors.h dependency to the afs_utilAdmin.o
dependency list.
Reviewed-on: http://gerrit.openafs.org/10369
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 9b1ffeeeb62cd9535dc2fc1522400abb428a0ac2)
Change-Id: Ib526d18227a6c37eac08def5ab88eb1717a848f1
Reviewed-on: http://gerrit.openafs.org/11233
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Replace the custom INST makefile macro with the standard
INSTALL_DATA macro for installing and exporting files.
Reviewed-on: http://gerrit.openafs.org/10723
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 31d6467aa058a2b49c22188dfb0ca70b766d127f)
Change-Id: I7b7cc1d74c84090c9042b624af1c4e4b5c61ac6d
Reviewed-on: http://gerrit.openafs.org/11230
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Generate the param.h.new temporary file in a parallel-safe
way. The rule to generate the three copies of param.h can
run at the the same time under a parallel make, clobbering
the param.h.new temporary file. Instead of creating this file
inline, create a common rule to generate the temporary file
once.
Reviewed-on: http://gerrit.openafs.org/10516
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit c8e83f0e826bc0a56321408b1c7a2afa137bab05)
Change-Id: I8a85c0e288f2231a3bf693319a8f5fcd618464e8
Reviewed-on: http://gerrit.openafs.org/11229
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
That header is not a generated file, and is not found in the
object directory. make install would fail from a separate objdir
prior to this change.
Reviewed-on: http://gerrit.openafs.org/11160
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 7a701239d8327ae738124edb5e11f3bcbb08a76b)
Change-Id: I738adc464aa36b68403b69912253faf17cb01621
Reviewed-on: http://gerrit.openafs.org/11342
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Change the makefile install rules to install the header
file from the libafscp directory, and not the top level
include directory to make the install rules consistent
with the rest of the tree.
Reviewed-on: http://gerrit.openafs.org/10514
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 52fe3f52de95b698c93ca5da3c1ed59447817610)
Change-Id: I1ed7e92b8e27f3df8fc76ccaa6bac4199e40c180
Reviewed-on: http://gerrit.openafs.org/11228
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Add the -emit option to the compile_et command to support parallel make.
The -emit option allows make to generate the header and the source files
independently, instead of building two files at the some time. This
avoids the issue where one command creates two separate files, which is
difficult to handle correctly for parallel makes.
Reviewed-on: http://gerrit.openafs.org/7921
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 9df43aacab0f311c15837b230761a11750f8b9cb)
Change-Id: Id560fcec356a4b36c0e311440f74a97a670c07d1
Reviewed-on: http://gerrit.openafs.org/11227
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
On systems with a large number of PAGs and files in use, the
periodic daemon job that checks for expired credentials and
cleans up the axs cache can run for a very long time. This
can lead to kernel soft lockups and eventually hang processes
and file access because of unavailable locks.
Rework the scanning logic in afs_CheckTokenCache to make the
scanning more efficient in most real world cases. On a test
system accessing ~4000 files from processes in 1000 PAGs, this
has been observed to reduce the runtime of afs_CheckTokenCache
from a problematic ~70s down to about 0.7s.
Additionally, this changes the conditions in which an axscache is
discarded. uid+cell (rather than just uid) must now match, and
if no matching unixuser is found, it will also be discarded.
Adapted from code from Jeffrey Altman who provided the original
loop algorithm and code.
Reviewed-on: http://gerrit.openafs.org/11123
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit de74227d9c925206cd6d46496ec4682569d3105b)
Change-Id: I72e501cf1cb3e312d17a518666d2d638f1d52ead
Reviewed-on: http://gerrit.openafs.org/11307
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
In this function, hentry is the "previous" continuation entry that we
looked at, and centry is the "current" continuation entry. We keep
track of the previous continuation entry in case we need to update its
'next' pointer, which we do if we free one of the continuation entries
because it is empty after the removal.
So, this memcpy is supposed to copy the current entry to the previous
one, but the arguments are flipped, so we just copy zeroes to centry
(since hentry is initialized to zeroes early on in the function), and
hentry never gets set to anything besides zeroes.
The effect of this is that whenever a ptdb entry has more than one
continuation entry, and we free up any of them after the first one via
RemoveFromSGEntry, the previous continuation entry becomes blanked
(though the 'next' pointer should still be correct). This means the
membership information for that group is not recorded correctly, as it
loses a chunk of the IDs that it is a member of. The reverse mapping
should still be intact (the parent groups have a pointer to the
sub-group), but the group probably doesn't function correctly.
The reason this happened is because of the confusing conversion from
bcopy to memcpy. Most of the instances of bcopy/bcmp/bzero/etc were
converted (correctly) back in commit c5c521af, but the supergroups
implementation was added afterwards, in 8ab7a909, and contained a
bcopy reference. This bcopy was converted to memcpy in 58d5f38b, but
the argument order was not corrected, causing this bug.
To fix this, just flip the first two arguments of the memcpy. Just get
rid of the casts here, too, to match the code in the non-supergroups
RemoveFromEntry and elsewhere.
Reviewed-on: http://gerrit.openafs.org/11340
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit 2d89d447c8b00a40d3fc559813fe31c177da164b)
Change-Id: I78b80cb7b043c9d1562b543906a593a985020b43
Reviewed-on: http://gerrit.openafs.org/11352
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
List version in help for commands using cmd library
Reviewed-on: http://gerrit.openafs.org/10956
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit 4b4d44b3dd62c2a36908f20eeff345b666e7858d)
Change-Id: I1c4881de710f5c48af5645bce64fbee4fb4854f2
Reviewed-on: http://gerrit.openafs.org/11214
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Add a pair of functions to allocate and free struct vrequests, which
are to be used to avoid having struct vrequests on the stack.
Reviewed-on: http://gerrit.openafs.org/11074
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit 76ad941902c650a4a716168d3cbe68f62aef109f)
Change-Id: I08932256af58aeba31b2d5c11008658c419cf008
Reviewed-on: http://gerrit.openafs.org/11164
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Gergely Madarasz <madaraszg@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>