8775 Commits

Author SHA1 Message Date
Simon Wilkinson
ccfb125e8b bu*: Tidy header includes
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.

Change-Id: If20a2ef67d4cbc70156c1707264a5b7360cfa11a
Reviewed-on: http://gerrit.openafs.org/4323
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-03-28 15:14:09 -07:00
Simon Wilkinson
cce1bd6059 bozo: Tidy header includes
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.

Change-Id: Ie4f1b955c111f30b98aa8793b3e3d15dd0bb9275
Reviewed-on: http://gerrit.openafs.org/4322
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-28 11:49:52 -07:00
Heimdal Developers
6830269772 Import of code from heimdal
This commit updates the code imported from heimdal to
987658325eb7bd6b10882cc4cdd224499e7f7a03 (switch-from-svn-to-git-2052-g9876583)

New files are:
	roken/flock.c

Change-Id: I7b9470cfdf99e41ea460772025767c47f6ad26f0
Reviewed-on: http://gerrit.openafs.org/4367
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-28 11:49:11 -07:00
Simon Wilkinson
b440e1a551 Import flock.c from roken
Add flock.c to our list of roken imports, so that we can use it on
AIX

Change-Id: I1f7b953c8853f4b021a486bb93ddc392c2c08e07
Reviewed-on: http://gerrit.openafs.org/4366
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-03-28 11:49:01 -07:00
Marc Dionne
7d162266c4 Linux: 2.6.39: replace path_lookup with kern_path
path_lookup is no longer available, use kern_path instead.

Change-Id: I42ae43114fe257fc65452f1b0a35d43595b0044b
Reviewed-on: http://gerrit.openafs.org/4360
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-28 06:36:31 -07:00
Derrick Brashear
20da07abdf ihandle release locking simplification
several callers drop locks so ih_release can be called unlocked,
then relock. simply allow a locked call (via _ih_release_r).

side effect: we had races before on refcnt check versus cleanup style.
this addresses it, but only removes lock contention.

Change-Id: Id2d132baa170894ba3ab0e1e8d0bcf9cf6c0c712
Reviewed-on: http://gerrit.openafs.org/4271
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-28 06:34:36 -07:00
Simon Wilkinson
ae038f9250 auth: Tidy header includes
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.

Change-Id: I2afd32d86b40b84c14f8a6021a583b6a4888780c
Reviewed-on: http://gerrit.openafs.org/4321
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-03-28 05:51:40 -07:00
Simon Wilkinson
e922ac7092 autoconf: Add tests for resolver headers
Add tests for arpa/nameserv.h and resolv.h, so that roken will look
after including these files for us.

Change-Id: Ifa6b7d877d67c967811017a25c98fab6bd571d4c
Reviewed-on: http://gerrit.openafs.org/4364
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-03-28 05:38:21 -07:00
Simon Wilkinson
235aaced95 fssync: Rename state
The structure 'state' in fssync-debug conflicts with a structure
of the same name in AIX's resolv.h header. Renaming the structure here
to fssync_state to avoid the conflict.

Change-Id: I15df31a48369f76ef927a5153d3415e821bc0c51
Reviewed-on: http://gerrit.openafs.org/4363
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-03-28 05:16:48 -07:00
Simon Wilkinson
1aab133e49 audit: Tidy header includes
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.

Change-Id: I5543c5c9c22828ee19460c2ab24065f508a6353f
Reviewed-on: http://gerrit.openafs.org/4320
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-03-27 18:44:19 -07:00
Simon Wilkinson
c153ec0c9e vol: Tidy header includes
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.

Change-Id: Ifd88310dc26ebfd995b4a25b2984ddb01606264f
Reviewed-on: http://gerrit.openafs.org/4319
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-03-27 18:13:19 -07:00
Simon Wilkinson
8b88debf01 volser: Tidy header includes
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.

Also, add sys/uio.h to the list of libraries that we check for.

Change-Id: I03d9c143db42a1ec415ab5624e2cbede0d34e310
Reviewed-on: http://gerrit.openafs.org/4318
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-03-27 18:12:59 -07:00
Simon Wilkinson
f6d148f6e7 volser: More renaming of putshort and putint32
Commit 2d6bc153689f14f8690878b15d9fb711a56b0546 renamed the putshort
and putint32 macros in dumpstuff.c to avoid conflicts with macros
that are defined in resolv.h. However, an almost identical copy of
that code also exists in vol-dump.c

Rename putshort and putint32 there too.

Change-Id: I9b98f99fb5c2b24b57e2bc480c891aa86b6df344
Reviewed-on: http://gerrit.openafs.org/4317
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-03-27 17:38:55 -07:00
Simon Wilkinson
8c1f725931 afs_snprintf is dead, long live rk_snprintf
We were shipping our own implementation of snprintf and friends, as
afs_snprintf. Now that we're using roken everywhere, we can make use
of roken's rk_snprintf, and no longer need to ship our own.

As Window's snprintf isn't C99 compliant, roken always uses its own
on this platform. The effect of this is that we can no longer use
AFS_UINT64_FMT and AFS_INT64_FMT for snprintf calls (and the Log
functions that call them). Instead, we need to always use the
Unix format specifiers when calling these functions.

Make thse changes across the whole tree.

Change-Id: I3fffef97566f239ad639f15c4decd136d5bbd765
Reviewed-on: http://gerrit.openafs.org/4316
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-03-27 16:43:30 -07:00
Simon Wilkinson
a58639ee7b Windows: Don't use %I for IP addresses
%I isn't supported by the roken printf functions. In preparation
for switching over to them, replace our use of asprintf to convert
IP addresses to strings with the afs_inet_ntoa_r function.

Change-Id: Id38dc56405071d62fb2b12e4f69905aa7a2026b0
Reviewed-on: http://gerrit.openafs.org/4362
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-03-27 16:34:40 -07:00
Marc Dionne
9376293634 Linux: 2.6.39: deal with BKL removal
For 2.6 kernels the OpenAFS code is already BKL free, but the
corresponding header file smp_lock.h is still included in various
places.  This header no longer exists, so remove all occurrences
outside of LINUX24.

Change-Id: Ib659fa787eab4b39efce5b0a62f5723950e79703
Reviewed-on: http://gerrit.openafs.org/4361
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-27 10:08:50 -07:00
Simon Wilkinson
d3d3d2c51a vlserver: Rationalise usage message
Rather than having 2 copies of the usage message, just have one
with #ifdef switches to disable options that are not available in
that build.

Change-Id: I5b2135fba3d42fdbb879d5e8cb61933f4929d598
Reviewed-on: http://gerrit.openafs.org/4305
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-26 22:19:39 -07:00
Simon Wilkinson
b1b8d7a4ba ptserver: Rationalise usage message
Rather than having 4 copies of the usage message, just have one
with #ifdef switches to disable options that are not available in
that build.

Change-Id: If888a64307b78189fcf617bbe0dc4ca9e55e8d2b
Reviewed-on: http://gerrit.openafs.org/4304
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-26 22:19:24 -07:00
Simon Wilkinson
96916c8fcf HP/UX: Make more use of roken
Make more use of roken on HP/UX by letting it provide definitions
for random and srandom, and using its implementation of
getdtablesize

Change-Id: I1212c77ea9cc6ef436cfc5c16e893aefbc33d31b
Reviewed-on: http://gerrit.openafs.org/4341
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-26 22:18:58 -07:00
Simon Wilkinson
c019e03e70 crypto: Fixes for recent Heimdal changes
The last Heimdal import changed the name of a number of structures
so that they are private to the krb5 code. Mirror this by changing our
prototypes to match the new names.

This solves the key_type problem that we previously fixed by #defining
key_type to hc_key_type, so remove that define.

Change-Id: I9b3f1712b0bf6641a780cc4002e73f8a511ff080
Reviewed-on: http://gerrit.openafs.org/4340
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-26 22:18:42 -07:00
Heimdal Developers
2343c67c7c Import of code from heimdal
This commit updates the code imported from heimdal to
987658325eb7bd6b10882cc4cdd224499e7f7a03 (switch-from-svn-to-git-2052-g9876583)

New files are:
	roken/getdtablesize.c

Upstream changes are:

Love Hornquist Astrand (2):
      prefix symbols that are _krb5_ structures
      prefix internal structures with _krb5_

Change-Id: I36aae13d877b6b40b8d2db47217884dc24f3f9c8
Reviewed-on: http://gerrit.openafs.org/4339
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-26 22:18:26 -07:00
Simon Wilkinson
db3288b0e7 Add getdtablesize to the roken import
Change-Id: I089e3976e90429e39102eeb82a74ece97e87bd25
Reviewed-on: http://gerrit.openafs.org/4338
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-26 22:18:09 -07:00
Simon Wilkinson
2d754dfd37 aklog: Tidy header includes
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.

Also add pwd.h to the list of headers that we check for in configure,
and that roken will include if they are available

Change-Id: I61ab95eeca11127a33bb668dddfc24ec6ce7f8f1
Reviewed-on: http://gerrit.openafs.org/4303
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-26 22:17:56 -07:00
Simon Wilkinson
54b9813fe9 NO_DES_H_INCLUDE is no longer necessary
Now that we're using hcrypto for DES, rather than rolling our own,
we don't need to specific NO_DES_H_INCLUDE, so get rid of it.

Change-Id: Id370ddacb0a57264cc8f5cdda3c59fbb627708af
Reviewed-on: http://gerrit.openafs.org/4302
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-26 22:17:44 -07:00
Simon Wilkinson
4dd09ac28e ptserver: Tidy header includes
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.

Also reorder our headers so that they go

 #include <afsconfig.h>
 #include <afs/param.h>
 #include <afs/stds.h> (if required)

 #include <roken.h>

 [ ... out of directory headers ... ]

 [ ... local headers ... ]

Change-Id: I9214f6bf65085947cfc588b47484e1b022ffc5b1
Reviewed-on: http://gerrit.openafs.org/4299
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-26 22:17:31 -07:00
Ben Kaduk
7b4da89c8e new files for FreeBSD packaging at 1.6.0pre3
Packaging for use with FreeBSD's Ports Collection.
The directory layout is flattened, and a couple of files that do not
make sense here are not included.
The afsd rc script lives in packaging/ as it is not runnable in
its committed form, it requires variable substitution that occurs
at install-time from the Ports Collection.

Change-Id: I72d6c2ee7106611b0ec9bfe3e47a471ed66b7255
Reviewed-on: http://gerrit.openafs.org/4351
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-03-26 22:17:01 -07:00
Ben Kaduk
dce071acef Remove outdated rc file for afsd on FBSD
The semantics of rc scripts have changed drastically since this
was written.  It will need to be rewritten from scratch; the
new version will live in src/packaging/FreeBSD as afsd.in, as it
is included with the port packaging in that form.

Change-Id: I397f8d5a9dc0430f1a9e8f2f0f378585cee4bd3b
Reviewed-on: http://gerrit.openafs.org/4350
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-03-26 22:16:12 -07:00
Ben Kaduk
f901c0f525 Remove stale FreeBSD packaging
We no longer use the Transaarc paths, and the rc environment
and packaging methods are quite different now.

Change-Id: I6915f41455dcf0518472b0a81fe7e5c559d4a994
Reviewed-on: http://gerrit.openafs.org/4349
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-03-26 22:15:38 -07:00
Jeffrey Altman
9df32e55d4 Windows: export roken symbols
rk_vsnprintf
rk_vasnprintf

Change-Id: I39344d10a599e7bdc761ae03853b679ab6edcb4f
Reviewed-on: http://gerrit.openafs.org/4348
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-03-26 15:07:43 -07:00
Jeffrey Altman
620ec4382f Windows: change log for 1.5.9904 (1.6.0pre4)
Change-Id: I0c302ef20bf245f927f3167d3c662334e71d81df
Reviewed-on: http://gerrit.openafs.org/4347
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-03-26 14:01:47 -07:00
Andrew Deason
55781a8319 viced: REALLYCLOSE origfdP after CoW
In StoreData_RXStyle, we save a pointer to the original FdHandle_t if
we need to CopyOnWrite the target vnode, for the purposes of possibly
copying additional data later on.

After the CopyOnWrite call, this points to an inode that is not in the
current volume, and is thus less likely to be accessed. In CopyOnWrite
itself, the original file handle is FDH_REALLYCLOSE'd because of this,
so the handle does not remain in the cache. Do the same in
StoreData_RXStyle, so origfdP is always FDH_REALLYCLOSE'd after we
have called CopyOnWrite.

Change-Id: Ibe33d26120eb354318147f3a31fe32d38c6a70c6
Reviewed-on: http://gerrit.openafs.org/4344
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-03-26 08:24:56 -07:00
Andrew Deason
fa86aee76a Revert "ihandle: Ensure FDH_REALLYCLOSE really closes"
This reverts commit a50f4c8d802c7b1c258a9cbe388dfab50425596b.

The only difference between FDH_CLOSE and FDH_REALLYCLOSE has to do
with ihandle cache behavior. FDH_REALLYCLOSE just indicates that the
reference we are closing is not likely to be used by other code, and
should be kicked out of the cache immediately (thus closing the file
descriptor). So, if there is another reference to that FdHandle_t, and
it issues an FDH_CLOSE, it thinks that the reference is likely to be
used again soon, and so the handle should not be kicked out of the
cache. Thus, the behavior before a50f4c8d was already correct.

Change-Id: I5a5c0c18b459f50e16c1d901ecc5f4eb18e8ef62
Reviewed-on: http://gerrit.openafs.org/4343
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-03-26 08:23:25 -07:00
Jeffrey Altman
b1d51d2a60 vol: avoid MAXINT redefinition warning in vnode.c
Change-Id: Ifeed132ac477a83f21af5b52cba7b658fb083221
Reviewed-on: http://gerrit.openafs.org/4179
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-25 15:51:07 -07:00
Andrew Deason
e261238470 SOLARIS: Perform daemon syscalls as kernel threads
Add AFS_SUN5_ENV to the list of platforms where AFS_DAEMONOP_ENV is
defined. Implement the necessary functionality so we spawn kernel
threads when a daemon syscall is called. Remove the rxk_Listener
wrapper, since it will be called in a separate thread via the
afs_DaemonOp interface.

Change-Id: I3c2570696a83f1837d08522fdd9dfc30dfefda4b
Reviewed-on: http://gerrit.openafs.org/4189
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-25 15:50:16 -07:00
Andrew Deason
6143bb27d2 libafs: Consolidate afs_DaemonOp code
Create the AFS_DAEMONOP_ENV define to simplify the logic of when we
perform afs_DaemonOp-y code paths. Also create the daemonOp_common
function, to perform common pre-fork operations that are common
between platforms.

Change-Id: Id93e1ffd7b8f4c0029cf4632239a519a619e9f9f
Reviewed-on: http://gerrit.openafs.org/4188
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-25 15:50:05 -07:00
Andrew Deason
99ed22fb02 SOLARIS: Correct ioctl syscall error handling
Do not use the return code from ioctl for errno. Ioctl itself will set
the errno and return value correctly, so don't mess with them.

Change-Id: I26c3afb5c77a3fce57e0d53d8671541805b32e08
Reviewed-on: http://gerrit.openafs.org/4345
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-25 15:49:52 -07:00
Andrew Deason
05241a59a1 libafs: Indent afs_call.c ifdef maze
Change-Id: I46198de875c16e221d4b75bb45afc9e2fd09dde1
Reviewed-on: http://gerrit.openafs.org/4187
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-25 15:47:59 -07:00
Andrew Deason
d971d235e9 ihandle: One more indentation fix
Change-Id: Icfed36ba0087d82706aea88e083576480244a9ad
Reviewed-on: http://gerrit.openafs.org/4342
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-03-25 14:09:09 -07:00
Andrew Deason
c5be1f7287 salvager: Stop asking for DAFSness on SYNC_FAILED
Break out of the loop so we stop asking the same thing repeatedly.

Change-Id: Ifcb2cd62589867927ab9f8be03bab7b981e5f761
Reviewed-on: http://gerrit.openafs.org/4315
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-25 07:04:54 -07:00
Andrew Deason
ad0afb57b9 DAFS: Allow the volumeSalvager to checkout volumes
Change-Id: Ia255c866bbd4f6cb883383650373223f09875374
Reviewed-on: http://gerrit.openafs.org/4298
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-25 07:04:22 -07:00
Jeffrey Altman
1043c7ce7d Windows: trailing dot not part of volume name
When dynamically adding new cell mount points to the Freelance
directory do not include a trailing dot when specifying the root.cell
volume name.

Change-Id: Idfae9e3f44380cbce49d77fff22bee15dc4856ce
Reviewed-on: http://gerrit.openafs.org/4333
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-03-25 06:22:40 -07:00
Derrick Brashear
04bcfa2821 add AFS_DEMAND_ATTACH_UTIL
use this for non-pthreads "support code" e.g. salvager.

Change-Id: I17825fa90de33a7a4d17f364713fd4602dae497b
Reviewed-on: http://gerrit.openafs.org/4312
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-24 19:35:13 -07:00
Simon Wilkinson
9b245d856b util: Tidy header includes
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.

Change-Id: I5e5e67b695f07bf121b0543c7f936278009eff15
Reviewed-on: http://gerrit.openafs.org/4301
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-24 17:24:48 -07:00
Simon Wilkinson
6960a3038a vlserver: Tidy header includes
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times

Change-Id: I8b304bcd0e376601fbe622f7453d0295b188b697
Reviewed-on: http://gerrit.openafs.org/4300
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-24 17:01:24 -07:00
Andrew Deason
8234cc2544 DAFS: Correct FSYNC_VOL_QUERY_VOP checks
Check that the given partition matches the vp partition, and ensure
the vp is not in an exclusive state when we check the state.
Otherwise, we may return pending vol ops for a volume on a different
partition, or we may incorrectly return that there is no pending vol
op when in fact the volume does not exist at all.

Change-Id: I3e28c0b7b372360d181a3310eb1fb7fce223ae59
Reviewed-on: http://gerrit.openafs.org/4308
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-24 17:00:39 -07:00
Russ Allbery
7b00c17b49 Correctly document the AFS client setuid defaults
AFS no longer honors setuid status by default.  Update the admin
guide documentation appropriately and add a warning recommending
against enabling setuid status given the limitations of the current
AFS protocol.

Reformat this section of the admin guide to make it easier to
maintain.

Change-Id: I6ea5859037d7d194df801f1a76583257cfc8bbe8
Reviewed-on: http://gerrit.openafs.org/4311
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-03-24 13:14:28 -07:00
Jeffrey Altman
11ad1e467f Windows: avoid recursive cm_CheckOfflineVolume
Add a new cm_req_t flag CM_REQ_OFFLINE_VOL_CHK which is used
to prevent cm_Analyze() from performing recursive
cm_CheckOfflineVolume operations that will exhaust the stack.

Change-Id: Ia4ee14307bf812cc2208482a19c1a914aca3e447
Reviewed-on: http://gerrit.openafs.org/4240
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-03-24 13:01:58 -07:00
Andrew Deason
637f5b642a salvager: Give back volumes when exiting early
Sometimes the salvager exits a bit earlier than normal. For instance,
when no applicable inodes are found for a volume group, or if the
-inodes command line option was given. In these cases, we have already
checked out singleVolumeNumber from the fileserver (if we're salvaging
a single VG), so we need to give it back. So, give it back in those
instances.

Change-Id: I3ab732d3b640b76d3bdec7ac9d01e57dc5a54ade
Reviewed-on: http://gerrit.openafs.org/4297
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-24 09:22:26 -07:00
Andrew Deason
dba991728b DAFS: Do not record vol ops for DELETED vols
When a volume is VOL_STATE_DELETED, it effectively does not exist, so
there is little point in recording a vp->pending_vol_op structure for
it. Just let callers checkout the volume as they would a nonexistent
volume: without recording anything about the operation.

This just reduces some edge cases and confusing debugging info, so we
don't have to worry about cleaning up pending_vol_op structures for
nonexistent volumes.

Change-Id: I56b92c3f2548ea48f9c61100be07edf9f7277fee
Reviewed-on: http://gerrit.openafs.org/4296
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-24 09:22:01 -07:00
Andrew Deason
f2c1f2ee48 salvager: Do not AskOnline nonexistent volumes
If singleVolumeNumber is not in our volume summary list, then the
singleVolumeNumber volume does not exist. So, don't try to bring it
back online. Still do try to make sure we don't have the volume
checked out, though, so issue an AskDelete, so ensure that it's not
checked out and that the fileserver does not think it exists.

Change AskDelete so we don't care if we tried to delete a volume that
the fileserver thinks already doesn't exist. Change the FSYNC_VOL_DONE
handler so it does not complain about already-deleted volumes.

Change-Id: I33dd876c0db91a3c8a5210fca329d63bf4b3d212
Reviewed-on: http://gerrit.openafs.org/4295
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-24 09:21:29 -07:00