openafs.git
9 years agodoc: volscan man page
Michael Meffie [Thu, 13 Mar 2014 16:40:17 +0000]
doc: volscan man page

Provide a man page for the volscan utility

Reviewed-on: http://gerrit.openafs.org/10905
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit a30b98c97d6fbf87018bcb6943e09c1c75a3918d)

Change-Id: I980dd7842bd1c606cb09ee838a584b83d004ccb1
Reviewed-on: http://gerrit.openafs.org/11280
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>

9 years agovol: Fix build with separate objdir
Benjamin Kaduk [Mon, 7 Apr 2014 21:55:09 +0000]
vol: Fix build with separate objdir

The volscan-main and volinfo-main source files are in the source
tree, not the object tree; refer to the objects in the Makefile
as dependencies, so that they will be picked up properly.  The
objects will be made just fine by the implicit .c.o rule.

Reviewed-on: http://gerrit.openafs.org/10988
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 074d745a02d80bfd2c16a4e2b7b4222022f8e641)

Change-Id: I3f29fcfb0257e145e0aae62ba425ccd7df513a72
Reviewed-on: http://gerrit.openafs.org/11279
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agovolinfo: separate volscan binary
Michael Meffie [Wed, 12 Mar 2014 19:15:32 +0000]
volinfo: separate volscan binary

Refactor vol-info.c into several files and change the makefile to
build a separate volscan binary, instead of using the program name
to determine if the user is running volinfo or volscan.

This commit adds new source files for the volinfo and volscan main()
function and a common header file.

Reviewed-on: http://gerrit.openafs.org/10903
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit af2e3d81cff39ed06e3bfbfcbfff52163c503c54)

Change-Id: Ie261ac5a8bd6baea7d5d5110248611219ee1c175
Reviewed-on: http://gerrit.openafs.org/11278
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agovolinfo: refactor global options
Michael Meffie [Wed, 12 Mar 2014 13:37:59 +0000]
volinfo: refactor global options

Move the global options to a structure and pass it to the vol-info
functions. This is a precursor for creating separate volinfo and
volscan programs.

Reviewed-on: http://gerrit.openafs.org/10902
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit 77e4d2146e166c5c70d4255408bde5e6499a06bf)

Change-Id: Id97ba0bfecb8104288f904b5efe693a6e652d844
Reviewed-on: http://gerrit.openafs.org/11277
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agovolscan: hide -mask option
Michael Meffie [Sat, 15 Mar 2014 15:04:31 +0000]
volscan: hide -mask option

The -mask option is unneccessary and sets a bad precedent, so
deprecate and hide this option. The vnodes of interest can be found
can be found easily and much more flexibly with a simple command
pipeline.

Reviewed-on: http://gerrit.openafs.org/10901
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit 8119636976de651ff0b8ccdca6a1a703643f7447)

Change-Id: I21519d7c0e9b3e3900cf3cd4c561d1a5aed1ef90
Reviewed-on: http://gerrit.openafs.org/11276
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>

9 years agovolscan: avoid printing null mount-point cellname
Michael Meffie [Wed, 4 Sep 2013 19:10:16 +0000]
volscan: avoid printing null mount-point cellname

The 'mcell' field is null when there is no cell set in the mount point,
so do not try to print it.

Reviewed-on: http://gerrit.openafs.org/10226
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit db2ed13359ce8e3cd6a4981f8ce8e10ba61f6463)

Change-Id: I96ba7dec59cc6e0fc5663e8e037d76d1006905a7
Reviewed-on: http://gerrit.openafs.org/11275
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>

9 years agovolinfo: show header filenames even if error
Michael Meffie [Wed, 11 Apr 2012 19:34:29 +0000]
volinfo: show header filenames even if error

When invoked with -header option, print the header inode
number, and namei filename, even if the header file cannot
be opened.

Reviewed-on: http://gerrit.openafs.org/7190
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit b71f4ffa7c58ef7b27eb6e28d00892906aec49ec)

Change-Id: Ibd68433ea778d5359c873e3764800d60fa7ae95d
Reviewed-on: http://gerrit.openafs.org/11274
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>

9 years agovolscan: index offset output column
Michael Meffie [Tue, 27 Mar 2012 04:33:26 +0000]
volscan: index offset output column

Add index offset as a possible volscan output column.

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

Change-Id: I17cede564fde259e04b7f1cb78724798808fb881
Reviewed-on: http://gerrit.openafs.org/11273
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>

9 years agovolscan: option to ignore dir vnode magic
Michael Meffie [Tue, 27 Mar 2012 00:20:28 +0000]
volscan: option to ignore dir vnode magic

Option to ignore directory vnode magic when looking
up the path names. Print which vnode failed when
doing the checks.

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

Change-Id: Ia9b61b8c0e812fbaa680f62b4b924d818135dc87
Reviewed-on: http://gerrit.openafs.org/11272
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agoMake volscan's column delimiter option work
Paul Smeddle [Mon, 12 Mar 2012 19:56:11 +0000]
Make volscan's column delimiter option work

Currently, volscan ignores the -delim command-line option,
using the hardcoded default. This patch adds processing
for this option, allowing alternative characters.

Corrects an error in a08c3207255756c825ab69a19e04f79dd879c646

Reviewed-on: http://gerrit.openafs.org/6894
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit d62456255e13beef41770ad90ee6cb58068007b9)

Change-Id: Ic5e253c2c1ae6fcdba79b70bf43ba16883389ccd
Reviewed-on: http://gerrit.openafs.org/11271
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agovolinfo: initialize vnode details
Michael Meffie [Thu, 16 Feb 2012 15:58:50 +0000]
volinfo: initialize vnode details

Clear the vnode details object. Fixes the path lookup in volscan.

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

Change-Id: If9848191166a774e99e68410d7891564743975e5
Reviewed-on: http://gerrit.openafs.org/11270
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>

9 years agovolinfo: fix formating of placeholder printfs
Derrick Brashear [Tue, 17 Jan 2012 21:08:56 +0000]
volinfo: fix formating of placeholder printfs

needed to placate gcc-llvm on lion

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

Change-Id: I583cc194ad81b025f925ad56a74c4acd941b7ddf
Reviewed-on: http://gerrit.openafs.org/11269
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>

9 years agovol: fix a08c3207255756c825ab69a19e04f79dd879c646
Jeffrey Altman [Thu, 15 Dec 2011 08:28:34 +0000]
vol: fix a08c3207255756c825ab69a19e04f79dd879c646

Patchset a08c3207255756c825ab69a19e04f79dd879c646 broke the suse
and windows builds by relying on C99 language syntax.  Fix it.

Reviewed-on: http://gerrit.openafs.org/6337
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit 37a0c3d00a6e2d072faf7c2958ef0c7224add161)

Change-Id: I34963c4e941ee3d580494a87b244c67bc3806ac7
Reviewed-on: http://gerrit.openafs.org/11268
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agovolscan: print vnode metadata information
Michael Meffie [Tue, 26 Jul 2011 13:18:44 +0000]
volscan: print vnode metadata information

volscan program to print vnode meta-data in a grep/awk/perl friendly
format. Optionally, find the paths of each vnode relative to the volume
root.  Access control list data can be reported, and are listed as one
access entry per line. Mount point information can be shown to which
volumes are mounted from given volumes.

The path lookup code originally written by Tom Keiser.

1.6 note: The 1.6 libcmd lacks parameter offsets, so this commit
instead splits the param enums into volinfo_parm_t and volscan_parm_t,
and just uses the regular cmd_AddParm to put the parameters in the
same place as the enums. In addition, rx queues are used instead of
opr queues, since opr queues do not exist in 1.6.

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

Change-Id: Icd7c572d09fd5a5e82bd8a1d09c6fbbe229b6b1c
Reviewed-on: http://gerrit.openafs.org/11267
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agovolinfo: implement -checkout option
Michael Meffie [Tue, 26 Jul 2011 02:02:04 +0000]
volinfo: implement -checkout option

Implement the -checkout option using the FSSYNC communication
channel with the fileserver.

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

Change-Id: Ic6614d0a28b968e261c5916e607ac8fd9d00f4d1
Reviewed-on: http://gerrit.openafs.org/11266
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>

9 years agovolinfo: fix bad format string
Derrick Brashear [Mon, 10 Oct 2011 20:57:35 +0000]
volinfo: fix bad format string

we need a format string; currently here we have none, which is no good

Reviewed-on: http://gerrit.openafs.org/5591
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 0676dc9e0c59e8aee3db5e0a7b4acf7229da7b88)

Change-Id: I665eabadee79c358562b831bf15d513e4f945f75
Reviewed-on: http://gerrit.openafs.org/11265
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>

9 years agovolinfo: refactor vnode handling
Michael Meffie [Mon, 25 Jul 2011 13:21:34 +0000]
volinfo: refactor vnode handling

At program startup, register procedures to be called
when scanning vnodes.

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

Change-Id: Iafee77acb6b175c6ba3983889c8c4adad17aaf79
Reviewed-on: http://gerrit.openafs.org/11264
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agovolinfo: release volume header ihandles when done
Michael Meffie [Sat, 23 Jul 2011 18:55:57 +0000]
volinfo: release volume header ihandles when done

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>

9 years agovolinfo: Include nfs.h
Andrew Deason [Wed, 10 Aug 2011 15:23:40 +0000]
volinfo: Include nfs.h

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>

9 years agovolinfo: clean up headers
Michael Meffie [Sat, 23 Jul 2011 03:38:36 +0000]
volinfo: clean up headers

Remove unneeded includes.

Reviewed-on: http://gerrit.openafs.org/5098
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit be152a00a7e4043592094be30f4a811c67a4ac32)

Change-Id: Ieb59affdc63f47d0adb35c89a2fc9d2ea72ba462
Reviewed-on: http://gerrit.openafs.org/11261
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>

9 years agovolinfo: fix false good magic line
Michael Meffie [Tue, 7 Jun 2011 16:37:40 +0000]
volinfo: fix false good magic line

Fix false report of good magic/version numbers in volume
header file.

Reviewed-on: http://gerrit.openafs.org/4817
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 36f6eed2b458995ab973102acf74375bf0a66931)

Change-Id: Id5972430ae8e2fe374a854c3c33d2837aac48185
Reviewed-on: http://gerrit.openafs.org/11260
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>

9 years agovolinfo: PrintFileNames is namei-only
Andrew Deason [Thu, 9 Jun 2011 04:06:58 +0000]
volinfo: PrintFileNames is namei-only

PrintFileNames only exists on namei, so make sure it's inside a namei
ifdef.

Reviewed-on: http://gerrit.openafs.org/4830
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit fc087f187759398a2646480eca25c1195ed23d22)

Change-Id: Id9cfacd35248389cb513a5470dd75ed5a2a30fb9
Reviewed-on: http://gerrit.openafs.org/11259
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>

9 years agovolinfo: accept -sizeonly for -sizeOnly
Michael Meffie [Fri, 27 May 2011 22:17:44 +0000]
volinfo: accept -sizeonly for -sizeOnly

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>

9 years agovolinfo: accept vice partition id for -part option
Michael Meffie [Fri, 27 May 2011 16:22:34 +0000]
volinfo: accept vice partition id for -part option

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>

9 years agovolinfo: comments
Michael Meffie [Fri, 27 May 2011 15:29:33 +0000]
volinfo: comments

Add doxygen style comment headers.

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

Change-Id: I69165f41bcfc5aa5fcb94bcaad8d31b7a0349179
Reviewed-on: http://gerrit.openafs.org/11256
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>

9 years agovolinfo: fix file size data type
Michael Meffie [Fri, 27 May 2011 14:27:03 +0000]
volinfo: fix file size data type

Use afs_sfsize_t for file size instead of int.

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

Change-Id: I670949abbb9ebfd652bb8baddcef47c7bad1b211
Reviewed-on: http://gerrit.openafs.org/11255
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>

9 years agovolinfo: avoid exit on errors
Michael Meffie [Fri, 27 May 2011 01:58:11 +0000]
volinfo: avoid exit on errors

Instead of exiting on errors, try to carry on.

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

Change-Id: If5f461ac4c1d35ae27336eeab844e6706fcd5bbe
Reviewed-on: http://gerrit.openafs.org/11254
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>

9 years agovolinfo: refactor mode variables
Michael Meffie [Tue, 24 May 2011 14:28:37 +0000]
volinfo: refactor mode variables

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>

9 years agovolinfo: refactor volume and vnode handling code
Michael Meffie [Mon, 23 May 2011 02:53:46 +0000]
volinfo: refactor volume and vnode handling code

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>

9 years agoLINUX: Avoid premature RO volume lock error
Andrew Deason [Thu, 17 Jul 2014 15:33:23 +0000]
LINUX: Avoid premature RO volume lock error

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>

9 years agoLINUX: Drop dentry if lookup returns new file
Andrew Deason [Wed, 23 Jul 2014 16:54:47 +0000]
LINUX: Drop dentry if lookup returns new file

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>

9 years agolibafs: fix error location code in LINUX/osi_export
Michael Meffie [Fri, 1 Aug 2014 22:27:35 +0000]
libafs: fix error location code in LINUX/osi_export

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>

9 years agolibafs: allocate vattrs in LINUX to reduce stack used
Michael Meffie [Sun, 18 May 2014 23:28:16 +0000]
libafs: allocate vattrs in LINUX to reduce stack used

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>

9 years agolibafs: api to create and free vattrs
Michael Meffie [Sun, 18 May 2014 21:17:38 +0000]
libafs: api to create and free vattrs

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>

9 years agolibafs: do not allow NULL creds for afs_CreateReq
Michael Meffie [Mon, 28 Jul 2014 21:27:40 +0000]
libafs: do not allow NULL creds for afs_CreateReq

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>

9 years agolibafs: reduce stack space in LINUX
Michael Meffie [Wed, 9 Apr 2014 12:40:21 +0000]
libafs: reduce stack space in LINUX

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>

9 years agolibafs: fix vrequest leak in afs_lookup
Michael Meffie [Tue, 29 Jul 2014 00:57:01 +0000]
libafs: fix vrequest leak in afs_lookup

Fix vrequest leak introduced in commit
9930567bcf9655d3f562b210b2dc4b4a99226691.

Thanks to Andrew Deason for finding this error.

Reviewed-on: http://gerrit.openafs.org/11337
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: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 51c97beb3f3bb68704d33e126561b8c2866ddab3)

Change-Id: If903c7863ac2ac6420a74e6bea1012c8cbf41913
Reviewed-on: http://gerrit.openafs.org/11364
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>

9 years agoafs: Use common cleanup code for lockctl EINVAL
Andrew Deason [Tue, 2 Oct 2012 20:04:47 +0000]
afs: Use common cleanup code for lockctl EINVAL

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>

9 years agolibafs: reduce stack space in VNOPS
Michael Meffie [Tue, 8 Apr 2014 20:10:36 +0000]
libafs: reduce stack space in VNOPS

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>

9 years agobudb: Fix objdir builds
Andrew Deason [Mon, 21 Feb 2011 20:56:48 +0000]
budb: Fix objdir builds

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

Change-Id: I46475c58265df9ec2b43241eb244b7d1164ad182
Reviewed-on: http://gerrit.openafs.org/11367
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agobuild: separate source and header compile_et rules
Michael Meffie [Sun, 27 Oct 2013 03:35:14 +0000]
build: separate source and header compile_et rules

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>

9 years agoFBSD: 10.1 is coming out soon
Garrett Wollman [Sat, 26 Jul 2014 04:43:10 +0000]
FBSD: 10.1 is coming out soon

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>

9 years agoFBSD: 9.3 has been released, so add config bits and sysname
Garrett Wollman [Sat, 26 Jul 2014 04:22:09 +0000]
FBSD: 9.3 has been released, so add config bits and sysname

Reviewed-on: http://gerrit.openafs.org/11327
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 6667399aa426009a841cdd6459dbfa498e562646)

Change-Id: I5eaa9316806da60699cdb194058613ff7671cb8a
Reviewed-on: http://gerrit.openafs.org/11368
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Tested-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agoauth: check for keytab before using in akimpersonate
D Brashear [Wed, 16 Apr 2014 14:35:57 +0000]
auth: check for keytab before using in akimpersonate

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>

9 years agoauth: Fix library dependencies so that tests build again
Chas Williams (CONTRACTOR) [Thu, 3 Jul 2014 15:02:40 +0000]
auth: Fix library dependencies so that tests build again

Reviewed-on: http://gerrit.openafs.org/11311
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 668b1765478eb32b5d0895d25301773e412df7a0)

Change-Id: I581a23201832bdfbe7d14eb15d09409936e91eb0
Reviewed-on: http://gerrit.openafs.org/11350
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agorxkad: fix include quotes for generated headers
Michael Meffie [Sun, 2 Mar 2014 19:54:00 +0000]
rxkad: fix include quotes for generated headers

Reviewed-on: http://gerrit.openafs.org/10871
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 0408718b8108882d5fb70612e7e7e5d3184fb65f)

Change-Id: I880f6f6b872f913e42b370c51a0b0e92962de803
Reviewed-on: http://gerrit.openafs.org/11241
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agoauth: fix include quotes for generated headers
Michael Meffie [Sun, 2 Mar 2014 17:26:24 +0000]
auth: fix include quotes for generated headers

Reviewed-on: http://gerrit.openafs.org/10870
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 d3eed1e58a7605b320ec38d48ff1c185aa2d9806)

Change-Id: Iadabd45547b671e346eec262c50f2e6aef917258
Reviewed-on: http://gerrit.openafs.org/11240
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agolibafs: separate source and header compile_et rules
Michael Meffie [Sun, 19 Jan 2014 22:04:08 +0000]
libafs: separate source and header compile_et rules

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>

9 years agolibadmin: separate source and header compile_et rules
Michael Meffie [Tue, 21 Jan 2014 18:45:32 +0000]
libadmin: separate source and header compile_et rules

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>

9 years agocompile_et macros to generate source and headers separately
Michael Meffie [Sat, 1 Mar 2014 19:52:48 +0000]
compile_et macros to generate source and headers separately

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>

9 years agolibadmin: add missing bubasics dependency
Michael Meffie [Sun, 19 Jan 2014 04:03:44 +0000]
libadmin: add missing bubasics dependency

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>

9 years agolibadmin: add header file deps
Michael Meffie [Sun, 19 Jan 2014 03:40:12 +0000]
libadmin: add header file deps

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>

9 years agolibadmin: rework compilation rules
Michael Meffie [Sun, 19 Jan 2014 03:40:12 +0000]
libadmin: rework compilation rules

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>

9 years agolibadmin: use INSTALL_DATA to export headers
Michael Meffie [Fri, 22 Nov 2013 18:36:54 +0000]
libadmin: use INSTALL_DATA to export headers

Use the INSTALL_DATA macro instead of cp to export
header files.

Reviewed-on: http://gerrit.openafs.org/10515
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 66093e4a2db297afea755d164cca7a6080909bda)

Change-Id: Icc1fb62fd68903fcf5a1f756800b0281669f59fa
Reviewed-on: http://gerrit.openafs.org/11234
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>

9 years agolibadmin: makefile rule for afs_AdminError.h
Michael Meffie [Sun, 19 Jan 2014 03:01:59 +0000]
libadmin: makefile rule for afs_AdminError.h

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>

9 years agolibadmin: remove duplicate dependency
Michael Meffie [Sun, 19 Jan 2014 02:56:36 +0000]
libadmin: remove duplicate dependency

afs_AdminPtsErrors.h was listed twice in the dependency
afs_utilAdmin.o dependency list.

Reviewed-on: http://gerrit.openafs.org/10725
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 9b105c5586a2e9c5c55dce7785e681f73ea0a759)

Change-Id: Ibf01dd6c67ecb6a89e30bd93eef82afae5eb84c4
Reviewed-on: http://gerrit.openafs.org/11232
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
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>

9 years agotvolser: fix makefile clean target
Michael Meffie [Sun, 19 Jan 2014 19:15:13 +0000]
tvolser: fix makefile clean target

Remove generated source files with the clean makefile target.

Reviewed-on: http://gerrit.openafs.org/10724
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 e39e226a13e38bfe0fb12b73633b6415c790c569)

Change-Id: Ie1159d2bfb05e274623b0985660e05ed9ce78ccc
Reviewed-on: http://gerrit.openafs.org/11231
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
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>

9 years agoconfig: use the standard INSTALL_DATA makefile macro
Michael Meffie [Sun, 19 Jan 2014 19:02:28 +0000]
config: use the standard INSTALL_DATA makefile macro

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>

9 years agoconfig: parallel-safe param.h makefile rule
Michael Meffie [Fri, 22 Nov 2013 17:23:17 +0000]
config: parallel-safe param.h makefile rule

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>

9 years agoInstall afscp.h from srcdir, not the build dir
Benjamin Kaduk [Wed, 21 May 2014 19:58:17 +0000]
Install afscp.h from srcdir, not the build dir

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>

9 years agolibafscp: makefile install rule update
Michael Meffie [Fri, 22 Nov 2013 16:50:11 +0000]
libafscp: makefile install rule update

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>

9 years agocomerr: compile_et -emit option for parallel make
Michael Meffie [Wed, 1 Aug 2012 21:26:33 +0000]
comerr: compile_et -emit option for parallel make

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>

9 years agolibafs: Speed up afs_CheckTokenCache
Marc Dionne [Tue, 29 Apr 2014 16:48:03 +0000]
libafs: Speed up afs_CheckTokenCache

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>

9 years agoptserver: Fix RemoveFromSGEntry hentry memcpy
Andrew Deason [Wed, 30 Jul 2014 16:12:39 +0000]
ptserver: Fix RemoveFromSGEntry hentry memcpy

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>

9 years agocmd: List version in help for commands
Stephan Wiesand [Mon, 14 Jul 2014 08:26:02 +0000]
cmd: List version in help for commands

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>

9 years agolibafs: reduce stack space
Michael Meffie [Thu, 27 Mar 2014 23:36:29 +0000]
libafs: reduce stack space

Allocate temporary vrequests to reduce the amount
of stack space used.

Reviewed-on: http://gerrit.openafs.org/11003
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 027e2bbb1191c31dbbe968a925c192b064d52c47)

Change-Id: I2dc6d49c7d3b7578359930f7fd922f177729281f
Reviewed-on: http://gerrit.openafs.org/11165
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
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>

9 years agolibafs: api to create and free vrequests
Michael Meffie [Mon, 14 Apr 2014 20:07:53 +0000]
libafs: api to create and free vrequests

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>

9 years agoUse a separate toplevel target for venus/tests
Benjamin Kaduk [Wed, 28 May 2014 14:41:02 +0000]
Use a separate toplevel target for venus/tests

There's no particular reason to lump them in with the venus target,
and we have reports that it causes parallel build failures on some
systems.

Just use a separate 'venustests' target akin to rxtests and ubiktests
and the like, instead.

Some of these lines are now long and should be wrapped, but leave
that for a follow-up commit.

Reviewed-on: http://gerrit.openafs.org/11177
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit f66c467bdd7182eb80ede3b9faa5f5ae5231632f)

Change-Id: Ic0c1ae4d6adb265417ba726967ff02fed476da7e
Reviewed-on: http://gerrit.openafs.org/11282
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agoBuild: check for gencat
Michael Meffie [Fri, 13 Apr 2012 15:58:02 +0000]
Build: check for gencat

Check for the gencat program and give a missing warning if
not present.

Reviewed-on: http://gerrit.openafs.org/7203
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit dcefc4576020c2c076af1a4af07cc827bf4eea40)

Change-Id: I383af43e6bb26de0095629e99d41e0e0b6bcb685
Reviewed-on: http://gerrit.openafs.org/11158
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agoafs: Suppress duplicate message on Linux
Perry Ruiter [Mon, 31 Mar 2014 11:42:22 +0000]
afs: Suppress duplicate message on Linux

Update afs_util.c to call afs_warnall in places where afs_warn and
afs_warnuser are called back to back with identical parameters.

Reviewed-on: http://gerrit.openafs.org/11006
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit 0287086fa78f0bc0012325c2eadb3dccb6b1f766)

Change-Id: I91d13654fbedffac4b2ad7ef54a90ade245de726
Reviewed-on: http://gerrit.openafs.org/11183
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>

9 years agoafs: Define afs_warnall routine
Perry Ruiter [Sat, 22 Mar 2014 07:52:32 +0000]
afs: Define afs_warnall routine

In a Linux environment afs_warn and afs_warnuser both go to
the same spot, resulting in duplicated messages if both are
invoked back to back.  Define a new function afs_warnall
for use when identical messages are directed to both warn
and warnuser.  In a Linux environment it will do the right
thing and present only one copy of the message.

Reviewed-on: http://gerrit.openafs.org/10943
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit a70f8e1a7e3fcbc13c9a60f8a7409dd01d014afb)

Change-Id: I264633cd4a30cfb7f7264e56512f318cfb23ef3e
Reviewed-on: http://gerrit.openafs.org/11182
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>

9 years agoafs: restructure afs_warn and afs_warnuser
Perry Ruiter [Sat, 22 Mar 2014 06:31:21 +0000]
afs: restructure afs_warn and afs_warnuser

Restructure afs_warn.c to provide an afs_vwarn and afs_vwarnuser
that accepts a va_list rather than a variadic parameter
specification.  afs_warn and afs_warnuser continue to be
variadic functions but now call afs_vwarn and afs_vwarnuser.
This is a preparatory change.  A subsequent update will
further exploit afs_vwarn and afs_vwarnuser.

Reviewed-on: http://gerrit.openafs.org/10942
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit c3d4c109305b2db8a63b754c1894ad37326dc340)

Change-Id: Ica9c3c8a0ae2c5b680b2e11bc85c747cfd11d30a
Reviewed-on: http://gerrit.openafs.org/11181
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>

9 years agoLinux 3.16: Convert to new write_iter/read_iter ops
Marc Dionne [Wed, 18 Jun 2014 13:06:39 +0000]
Linux 3.16: Convert to new write_iter/read_iter ops

Change read/write operations to the new write_iter/read_iter
operations.

Reviewed-on: http://gerrit.openafs.org/11303
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit a303bb257ed9e790d8c14644779e9508167887b6)

Change-Id: I3f66104be067698a4724ed78537765cf26d4aa10
Reviewed-on: http://gerrit.openafs.org/11309
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agoLinux 3.16: Switch to iter_file_splice_write
Marc Dionne [Wed, 18 Jun 2014 12:53:48 +0000]
Linux 3.16: Switch to iter_file_splice_write

Users of generic_file_splice_write need to switch to
using iter_file_splice_write.

Reviewed-on: http://gerrit.openafs.org/11302
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit e284db57f94c8f97ed1c95dcd0bd9518d86c050c)

Change-Id: I6f88ec0388fe43accc150c7243c1a474c9e643af
Reviewed-on: http://gerrit.openafs.org/11308
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>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

9 years agoafs/VNOPS: use osi_AllocSmallSpace() correctly
Chas Williams (CONTRACTOR) [Fri, 23 May 2014 11:48:11 +0000]
afs/VNOPS: use osi_AllocSmallSpace() correctly

Send the size down to the allocator so it can perform some
consistency checks.

Reviewed-on: http://gerrit.openafs.org/11168
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit 2d973c10f13b40c0ac9da25fe7f4c73b3560a686)

Change-Id: I38d16bdd014010a2ccc9636b890c9ea7a6158e6a
Reviewed-on: http://gerrit.openafs.org/11203
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agovolinfo: refactor size counters
Michael Meffie [Thu, 26 May 2011 01:54:06 +0000]
volinfo: refactor size counters

Put the volume, partition, and server size counters into structures.

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

Change-Id: I1d6f5d31d359a6e89dad34c7319b6bbd4d121ed6
Reviewed-on: http://gerrit.openafs.org/11251
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agovolinfo: refactor -sizeOnly printing
Michael Meffie [Wed, 25 May 2011 22:19:22 +0000]
volinfo: refactor -sizeOnly printing

Refactor the -sizeOnly output processing to reduce code
duplication and coupling with -saveinodes.

Reviewed-on: http://gerrit.openafs.org/4732
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

(cherry picked from commit 70145b4f4affc6aabf83fc1cc34cb4de0702c83f)

Change-Id: I8ca8979854959dc62ac5ff5147d2087e00e1f198
Reviewed-on: http://gerrit.openafs.org/11250
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agovolinfo: print namei filenames of index files
Michael Meffie [Sun, 22 May 2011 00:56:23 +0000]
volinfo: print namei filenames of index files

On namei fileservers, also print the namei filenames of the volume special
files when the -header flag is given.

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

Change-Id: I09c93c6b7512250f47359e70c5a744182ea91d9f
Reviewed-on: http://gerrit.openafs.org/11249
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agovolinfo: remove code duplication in HandleVolumes
Michael Meffie [Sat, 21 May 2011 16:06:43 +0000]
volinfo: remove code duplication in HandleVolumes

Reduce duplicate code for processing volume header files when printing header
details (-header) and calculating the volume size (-sizeOnly).

Reviewed-on: http://gerrit.openafs.org/4695
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

(cherry picked from commit ae27283550dab33704f30e18975722e0ed2c5424)

Change-Id: I83e5797acf09597d7c4da8c90e49049cec1294db
Reviewed-on: http://gerrit.openafs.org/11248
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agovolinfo: fix volume aux totals output
Michael Meffie [Sat, 21 May 2011 16:38:03 +0000]
volinfo: fix volume aux totals output

Do not print the volumes aux totals prematurely when running
volinfo with the -headers flag on an namei fileserver. Instead
print the aux totals only once after the link table size is found.

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

Change-Id: I6e059a070785fb44821827a75397d04c8669418d
Reviewed-on: http://gerrit.openafs.org/11247
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agovolinfo: print errors to stderr
Michael Meffie [Sat, 21 May 2011 11:28:41 +0000]
volinfo: print errors to stderr

Print volinfo errors messages to stderr instead of a mix of stdout
and stderr. Print a consistent program name.

Reviewed-on: http://gerrit.openafs.org/4693
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

(cherry picked from commit b7fe087745923bdea4571870799e484da67221d2)

Change-Id: Id9b6eb5c0cb50bc3908d6e1662f4485219452ecc
Reviewed-on: http://gerrit.openafs.org/11246
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agolibafs: check afs_InitReq return code
Michael Meffie [Thu, 24 Apr 2014 19:27:38 +0000]
libafs: check afs_InitReq return code

Do not ignore the return code from afs_InitReq everywhere it is
called. If afs_InitReq fails, the vrequest could not be initialized
for some reason.

Reviewed-on: http://gerrit.openafs.org/11097
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 cdbf49f06baf33abd803b5d1ec245e58a94eec52)

Change-Id: Ia8c0368f50f77b148a1e3f41b0538b0ec7c4123d
Reviewed-on: http://gerrit.openafs.org/11163
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Gergely Madarasz <madaraszg@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agoafs/VNOPS: reduce stack usage
Chas Williams (CONTRACTOR) [Fri, 28 Mar 2014 20:46:32 +0000]
afs/VNOPS: reduce stack usage

AFSFetchStatus is rather large and is in the stack twice.  Allocating with
osi_AllocSmallSpace will save about 160 bytes of stack.

Reviewed-on: http://gerrit.openafs.org/10964
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit 972585c24b5c193a982570ff9264a1971760f48f)

Change-Id: I5ee4441cd1c09646051e148a67147a2663768d44
Reviewed-on: http://gerrit.openafs.org/11162
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agovlserver: Add auditing to some more RPC's
Chas Williams (CONTRACTOR) [Fri, 21 Mar 2014 20:33:36 +0000]
vlserver: Add auditing to some more RPC's

A future commit will conditionally restrict access to these RPC's.
Auditing will allow debugging and monitoring of this feature.

Reviewed-on: http://gerrit.openafs.org/10939
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 900427ecac4bde5ef78ae9fc86f9237552cc1dd4)

Change-Id: Id140855220522ebfe560e1023f3b68acb67e82e9
Reviewed-on: http://gerrit.openafs.org/10946
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agodoc: afs_compile_et -h option
Michael Meffie [Mon, 20 Jan 2014 19:37:52 +0000]
doc: afs_compile_et -h option

Document the afs_compile_et -h option.

Reviewed-on: http://gerrit.openafs.org/10722
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 501d6d288fcaa195c3cda0be0e3423c7959c9958)

Change-Id: I5085f35d1b75a6dbae2768c2ba1ea61bb9c4201c
Reviewed-on: http://gerrit.openafs.org/11226
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agocomerr: long and short form of the -prefix option.
Michael Meffie [Tue, 21 Jan 2014 14:26:11 +0000]
comerr: long and short form of the -prefix option.

The man page documented the prefix option as -prefix; compile_et
supported only the short form -p.

Document and support both the long and short forms for the prefix
option; -p and -prefix.

Reviewed-on: http://gerrit.openafs.org/10721
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 37937a3e924eee7a09c7719ca6355703e65092e1)

Change-Id: I65b8d54bde89be85bd535d3a85fd2b22408bba39
Reviewed-on: http://gerrit.openafs.org/11225
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agocomerr: avoid comma operator
Michael Meffie [Fri, 22 Nov 2013 20:26:34 +0000]
comerr: avoid comma operator

Avoid unnecessary use of the comma operator in compile_et's
command-line argument processing.

Reviewed-on: http://gerrit.openafs.org/10491
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 15c80b1a92516a41d4aed8403db1485e97a7eff6)

Change-Id: I28f7503877d670406c973520a33924480bb96ad9
Reviewed-on: http://gerrit.openafs.org/11224
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agodoc: afs_compile_et -lang short form
Michael Meffie [Tue, 21 Jan 2014 14:39:56 +0000]
doc: afs_compile_et -lang short form

Document the -lang short form for -language.

Reviewed-on: http://gerrit.openafs.org/10720
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 355ca7b20b8bb9f06b030be966311d4afb40ed00)

Change-Id: I26c56ac064968d65f06de9f34c50bc71d2208560
Reviewed-on: http://gerrit.openafs.org/11223
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agodoc: afs_compile_et formatting fixes
Michael Meffie [Tue, 21 Jan 2014 14:36:37 +0000]
doc: afs_compile_et formatting fixes

Fix two pod formatting errors and remove one trailing
whitespace characters.

Reviewed-on: http://gerrit.openafs.org/10719
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit de8ff76f8767246431115bf04a1475a0cf3ad28a)

Change-Id: Ie2da8d8bf55a6ef9a067be06eb6626fc3dfd57fc
Reviewed-on: http://gerrit.openafs.org/11222
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agoubik: fix include quotes
Michael Meffie [Fri, 25 Oct 2013 17:47:59 +0000]
ubik: fix include quotes

Include the generated header in the current directory.

Reviewed-on: http://gerrit.openafs.org/10361
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit aa440ec7cbb8732ad0d9e1e1401fe4929c2cfd50)

Change-Id: I985dadc0db2ecd76c6a8640bd838511cf2abd80b
Reviewed-on: http://gerrit.openafs.org/11221
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agobozo: remove duplicate prototype
Michael Meffie [Fri, 23 Sep 2011 15:28:05 +0000]
bozo: remove duplicate prototype

Remove duplicate function prototype.

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

Change-Id: I6074ff7d8cdb6b3360ad4064b524d22ab6afe61c
Reviewed-on: http://gerrit.openafs.org/11220
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agoaklog: double get_credv5 in retry logic
Michael Meffie [Fri, 9 May 2014 15:43:35 +0000]
aklog: double get_credv5 in retry logic

Fix a bug where get_credv5() is called twice, even if the first one
succeeded, in the aklog retry logic.

(This bug uncovers another bug where get_credv5_akimpersonate
crashes in the krb5 libs when get_credv5 is called back to back.)

Reviewed-on: http://gerrit.openafs.org/11133
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit b9979e1a23ce28b20fe95d5e6042b9b15506c993)

Change-Id: I53b274f5e417ebd2a88b18df15ceb0e1ea39624d
Reviewed-on: http://gerrit.openafs.org/11218
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: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agorx: Remove rx_waitingForPacket
Chas Williams (CONTRACTOR) [Thu, 3 Apr 2014 18:12:38 +0000]
rx: Remove rx_waitingForPacket

Commit f43c2f4412d670ce1131dc429cb43302352df3e4 introduced
rx_waitingForPacket.  Given its current usage, I can't see any
functionality.

It looks like this might have been the result of merging a renamed
rx_waitForPacket from another development branch?

Reviewed-on: http://gerrit.openafs.org/10981
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit be236140f72fc51e111898abc896f93cc505fac7)

Change-Id: Ib1be9031bc217183f1997b6d79455e1693fa7c21
Reviewed-on: http://gerrit.openafs.org/11219
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agoconfig: Move AFS_LRALLOCSIZ to afs_args.h
Perry Ruiter [Tue, 27 May 2014 08:26:59 +0000]
config: Move AFS_LRALLOCSIZ to afs_args.h

AFS_LRALLOCSIZ is currently defined in afs/afs.h.  Other memory
related definitions such as AFS_SMALLOCSIZ and AFS_MDALLOCSIZ
are defined in config/afs_args.h.  Move AFS_LRALLOCSIZ to
config/afs_args.h for consistency.

Reviewed-on: http://gerrit.openafs.org/11174
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 02565591855f5a5ddb7dd6e308d9f535c2fd64b8)

Change-Id: I691a7d6025a1b4353f479049d09c54297b80989c
Reviewed-on: http://gerrit.openafs.org/11209
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agoDelete several unused memory management constants
Perry Ruiter [Tue, 27 May 2014 08:16:26 +0000]
Delete several unused memory management constants

Change 412854593cf368006c18e6c0dc607a9ecd76a0e0, removed from
the code base the last usage of:
AFS_SALLOC_LOW_WATER (defined in afs/afs.h)
AFS_MALLOC_LOW_WATER (defined in config/afs_args.h)
AFS_MDALLOCSIZ (defined in config/afs_args.h)
This patch deletes these constants.

Reviewed-on: http://gerrit.openafs.org/11173
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 85f3d0941b37c71047f59e1b1f4f92557d232fb8)

Change-Id: Ie9178db145bde21021251a17adb4bbb1bd77f14d
Reviewed-on: http://gerrit.openafs.org/11208
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agolinux: dont ignore kmod build errors
Michael Meffie [Tue, 3 Jun 2014 03:24:45 +0000]
linux: dont ignore kmod build errors

Errors from the linux kmod build are not propagated, since make is
run as the first command in a pipeline, and the shell returns the
exit code of the last command in the pipeline.  Run the make command
in a subshell to detect errors, and exit afterwards.  (This method
is more portable than bash specific pipeline processing options.)

Thanks to Mark Vitale for pointing out this build system defect
to me.

Reviewed-on: http://gerrit.openafs.org/11186
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit 48789d47b613e40734e7b0caac58572a80f8b318)

Change-Id: Idbdfad2a50901041aedaed35b8f01d713a66620d
Reviewed-on: http://gerrit.openafs.org/11205
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agolibadmin: Remove redundant memset call
Stephan Wiesand [Fri, 30 May 2014 13:05:28 +0000]
libadmin: Remove redundant memset call

Commit bf78bf2c115659b78c34d3bc9d1934bcff21c8cc added initialisation
of the nbulkentries structure to 0, to avoid freeing garbage due to a
goto fail_... before the structure is initialised. As pointed out by
Andrew Deason, there already is an equivalent memset call later in the
code which is now redundant. Remove it.

Reviewed-on: http://gerrit.openafs.org/11180
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit f05abc47938beddb436fd0b9677f7b59fc64a215)

Change-Id: I7338e42a45d0871af2ad404191ab622605172ac3
Reviewed-on: http://gerrit.openafs.org/11195
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agoxstat: use ephemeral ports for xstat_fs_test and scout
Michael Meffie [Mon, 13 Jan 2014 20:28:17 +0000]
xstat: use ephemeral ports for xstat_fs_test and scout

Instead of trying to bind to port 7101, and then retrying if
the port is in already in use, let the os find an available
port for scout and xstat_fs_test.

This fixes a bug where scout and xstat_fs_test do not call
rx_Finalize() before retrying rx_Init() with a different port
number, causing the program to crash later when more than
one copy of xstat_fs_test and/or scout are running at the same
time.

Reviewed-on: http://gerrit.openafs.org/10707
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit cda5e665ebee3da5615dba71b7a11ffff1229c6d)

Change-Id: I00c2d9e7d48e80dc1bc062a85788ad2de65709c7
Reviewed-on: http://gerrit.openafs.org/11155
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agoxstat: fix a malformed debug message
Michael Meffie [Mon, 13 Jan 2014 20:38:44 +0000]
xstat: fix a malformed debug message

a munged format specifier obscured the missing rn arg.

Reviewed-on: http://gerrit.openafs.org/10708
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit ba0208f1d69c8c403150fb6312214f9b1c972c6d)

Change-Id: Ie422f4a7be98052fec9281be73eac1823e9ea57f
Reviewed-on: http://gerrit.openafs.org/11154
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

9 years agoFix buffer length validation in ktc_GetToken and knfs
Anders Kaseorg [Sun, 4 May 2014 09:30:25 +0000]
Fix buffer length validation in ktc_GetToken and knfs

The signed int tktLen is checked against a maximum size, then passed
as the unsigned size_t argument to memcpy.  So we need to make sure it
isn’t negative.

This doesn’t appear to be exploitable: tktLen comes from the kernel,
which should have previously validated the length within the SETTOK
pioctl.

This bug was found with STACK <http://css.csail.mit.edu/stack/>.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/11109
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 9c10c202f1f2e516dde8b70c3a3b69a73d163070)

Change-Id: Id8dacdc00fd686d4f2ff234ffd6c8f5346d9e7b0
Reviewed-on: http://gerrit.openafs.org/11112
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>