openafs.git
13 years agoDAFS: variable declarations in C must be a top of block
Jeffrey Altman [Mon, 12 Jul 2010 18:42:12 +0000]
DAFS: variable declarations in C must be a top of block

Two instances of variable declarations not being present
at the top of a code block in src/vol/volume.c when building
with AFS_DEMAND_ATTACH_FS.  Fix them.

Change-Id: Ic6b9c5a6bbbd8355a144fea38a6ca1dd2a2c747d
Reviewed-on: http://gerrit.openafs.org/2388
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: Generate a valid <revision> block using mkvers.c
Jeffrey Altman [Tue, 13 Jul 2010 03:35:05 +0000]
Windows: Generate a valid <revision> block using mkvers.c

The <revision> tag requires not only a <revnumber> but a <date>.

Change-Id: I3c5b7691d18381b1bf71bbd3d726bd284bf90919
Reviewed-on: http://gerrit.openafs.org/2390
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: Permit docbook validation using xmllint
Jeffrey Altman [Tue, 13 Jul 2010 03:36:56 +0000]
Windows: Permit docbook validation using xmllint

Add a "check" rule to each of the docbook directories
that uses xmllint.exe (from Cygwin) to validate the
docbook source against the DTD.  Validation failures
will halt the build.

Change-Id: Ifcfcab11d5077381bfe7fa5e3767070a8d55cb21
Reviewed-on: http://gerrit.openafs.org/2391
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoCommit DTD validation errors in the Windows Release Notes
Jeffrey Altman [Tue, 13 Jul 2010 03:40:01 +0000]
Commit DTD validation errors in the Windows Release Notes

Correct errors detected using xmllint

Change-Id: I75c936084f116addbb7918856fe958b596e91b03
Reviewed-on: http://gerrit.openafs.org/2393
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoCorrect DTD validation errors in the UserGuide
Jeffrey Altman [Tue, 13 Jul 2010 03:40:52 +0000]
Correct DTD validation errors in the UserGuide

Correct errors detected using xmllint

Change-Id: Idd9e91ef463679cb58bdb622fd600e4020224e81
Reviewed-on: http://gerrit.openafs.org/2394
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jason Edgecombe <jason@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoCorrect DTD validation errors in the AdminGuide
Jeffrey Altman [Tue, 13 Jul 2010 03:38:56 +0000]
Correct DTD validation errors in the AdminGuide

Correct DTD validation errors detected using xmllint.

Change-Id: Ia255ac319a81966e63b702dd2b672ff3d6d8958a
Reviewed-on: http://gerrit.openafs.org/2392
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLinux: Use inode lock compat function
Simon Wilkinson [Mon, 12 Jul 2010 11:04:20 +0000]
Linux: Use inode lock compat function

We've now got a compatibilty function for locking and unlocking an
inode. Use that in osi_file, rather than a local set of #ifdefs

Change-Id: Ie64f0b758df0b90d0df2033d57729c8b09652c39
Reviewed-on: http://gerrit.openafs.org/2389
Tested-by: Jason Edgecombe <jason@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agofix dumptool on macos
Ken Hornstein [Tue, 4 May 2010 18:04:59 +0000]
fix dumptool on macos

make dumptool in test suite compile on macos again

Change-Id: Id60f625ce53bc9695673b68c733fa653521a8122
Reviewed-on: http://gerrit.openafs.org/2387
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agorx getaddr loopback change fallout
Derrick Brashear [Mon, 12 Jul 2010 19:04:44 +0000]
rx getaddr loopback change fallout

failed to git add, and so failed to push this back.

Change-Id: Ic538ac13f3099cfb3b8a5561e332750421ddd093
Reviewed-on: http://gerrit.openafs.org/2386
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoxstat: fix large integer output
Michael Meffie [Tue, 11 May 2010 21:26:36 +0000]
xstat: fix large integer output

Do not print large positive integers as negative.

Change-Id: Ia7f96e64ee6ad0c58de0d03779b230623d60b114
Reviewed-on: http://gerrit.openafs.org/1949
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoProvide man pages for more fssync-debug commands
Andrew Deason [Wed, 23 Jun 2010 21:08:13 +0000]
Provide man pages for more fssync-debug commands

Provide man pages for the fssync-debug commands vgcadd, vgcdel,
vgcquery, vgcscan, vgcscanall, vnode, and volop.

Change-Id: If456a4cdfedbf5f2776c276bc20178319638c26a
Reviewed-on: http://gerrit.openafs.org/2239
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoviced: host hash address collisions
Michael Meffie [Mon, 19 Apr 2010 14:00:52 +0000]
viced: host hash address collisions

Attempt to resolve collisions when adding a host to the
address hash table and another host with the same address:port
is already present in the hash table. Retrieve the uuid for
the host at that address and if the uuid matches the new host
and not the old, remove the address from the old host and
install the new host into the address hash.

Change-Id: Id182f907f63be556c61ffb91777edd35f0aa950d
Reviewed-on: http://gerrit.openafs.org/1786
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoConsolidate loopback address tests
Andrew Deason [Thu, 8 Jul 2010 20:37:48 +0000]
Consolidate loopback address tests

Many different places were testing if an address is a loopback
address. Consolidate these into one function to make it easier to
alter.

Change-Id: I9c4465f3bdc4e840c83d69456504caaac1c544e7
Reviewed-on: http://gerrit.openafs.org/2375
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoGetInodeSummary: free inode info
Andrew Deason [Thu, 8 Jul 2010 21:40:07 +0000]
GetInodeSummary: free inode info

In the salvager, GetInodeSummary stores some information about the
relevant inodes into a file. Free the memory for that information
after it's been written out, since we don't reference that memory
again.

Change-Id: I9578f941d2ea13240dd22d9b6e7a1f32217263c9
Reviewed-on: http://gerrit.openafs.org/2370
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoAn RPC test dispatch library for vice
Matt Benjamin [Thu, 24 Jun 2010 13:07:36 +0000]
An RPC test dispatch library for vice

A library framework for remote testing against file servers,
with the ability to establish multiple call/callback channel
pairs within a single test process and dispatch requests
arbitrarily on each.  Thanks to Derrick for design and debugging
help.  Additional callback processing intelligence will follow
in a future changeset.  This version builds on Windows NT (but
might need further adjustment).

Change-Id: Ibea39e912b2a23ebf58e9e0931114572eccf6e78
Reviewed-on: http://gerrit.openafs.org/2229
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLinux: Actually use freezer compatibility func
Simon Wilkinson [Sat, 10 Jul 2010 19:30:31 +0000]
Linux: Actually use freezer compatibility func

We were calling try_to_sleep, rather than afs_try_to_sleep. Whilst
try_to_sleep is present in all modern Linux kernels, on some older
systems we need to fall back to our own implementation, which is
what the afs_try_to_sleep function should do, but it can only do so
if we call it.

Change-Id: I900e50cf2754535e676d582bd3da82f1833bde52
Reviewed-on: http://gerrit.openafs.org/2384
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLinux: Use freezer compatibility macros in RX
Simon Wilkinson [Sat, 10 Jul 2010 19:17:56 +0000]
Linux: Use freezer compatibility macros in RX

Commit eef18466d920985c37ed8d22a6557b609c6225a6 introduced some
compatibility macros for the refridgerator functionality. Use these
in the Linux kernel RX code, rather than rolling our own.

Change-Id: I4279e0b3ee92337cb992ff46895712630f681b7b
Reviewed-on: http://gerrit.openafs.org/2383
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoUpdate config.guess and config.sub to 2009-12-30 and 2010-01-22
Russ Allbery [Fri, 9 Jul 2010 23:46:21 +0000]
Update config.guess and config.sub to 2009-12-30 and 2010-01-22

Update to the latest versions provided by the Debian autotools-dev
package.

Change-Id: I503ed6bd4316af40f9d36be6010708cb4fef42e1
Reviewed-on: http://gerrit.openafs.org/2378
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoMake config.sub executable
Russ Allbery [Fri, 9 Jul 2010 23:42:26 +0000]
Make config.sub executable

Autoconf apparently doesn't care because it runs it explicitly under
a shell, but it's sometimes useful to run it manually to check
something.  Plus, executable shell scripts should be executable on
general principles.

Change-Id: I0663d91da643f7c0a77fe758ca63f1cc14e81180
Reviewed-on: http://gerrit.openafs.org/2377
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoTerminate the DARWIN80 #if in afs_osidnlc.c
Russ Allbery [Sat, 10 Jul 2010 01:09:32 +0000]
Terminate the DARWIN80 #if in afs_osidnlc.c

The #if defined(AFS_DARWIN80_ENV) in src/afs/afs_osidnlc.c was
never terminated, leading to build failures.  Add an #endif.

Change-Id: Ie2f324668becef8294b86cadec5cf5547731d2ad
Reviewed-on: http://gerrit.openafs.org/2381
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoFix ktime test for errors
Russ Allbery [Sat, 10 Jul 2010 01:06:47 +0000]
Fix ktime test for errors

The variable passed into ktime_DateToLong must be initialized to 0
or, on error, we get the previous value and the tests fail.

Change-Id: I5528a830981a85fb6737bb8cb5931ab95faffb13
Reviewed-on: http://gerrit.openafs.org/2379
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoInclude linux/freezer.h in rx_kmutex.c
Russ Allbery [Sat, 10 Jul 2010 01:08:12 +0000]
Include linux/freezer.h in rx_kmutex.c

rx_kmutex.c calls refrigerator(), which is prototyped in linux/freezer.h,
but was not including it, causing build failures on Linux 2.6.32-5
(Debian).

Change-Id: I3867be6e7b8478d6fab8b97a4c923f979029517e
Reviewed-on: http://gerrit.openafs.org/2380
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoUse afs_sfsize_t for *_SIZE results
Andrew Deason [Wed, 7 Jul 2010 20:43:26 +0000]
Use afs_sfsize_t for *_SIZE results

Callers of FDH_SIZE and OS_SIZE should be storing the results in an
afs_sfsize_t. Some were using regular 'int's and other things, which
can screw up if the file is sufficiently large.

Change-Id: Ibbc2067ed3b90edcbdd46cfa43da559fd6419f0b
Reviewed-on: http://gerrit.openafs.org/2357
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoRemove incorrect critical section use in dnlc_lookup
Ben Kaduk [Fri, 9 Jul 2010 04:38:16 +0000]
Remove incorrect critical section use in dnlc_lookup

Critical sections may not be used with (non-spin) locks.  As such,
this code was wrong, and led to a panic.
We don't see why there what synchronization they may have been
providing, so just remove them and do not replace them.

Change-Id: I5d81595a7059a91b9aad46ab0a634fa684f67325
Reviewed-on: http://gerrit.openafs.org/2373
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agowiki url changed
Michael Meffie [Sat, 3 Jul 2010 22:54:15 +0000]
wiki url changed

Update the various places we reference the project wiki.

Change-Id: I56bcf038553eec02695667d737e0cd51e653b881
Reviewed-on: http://gerrit.openafs.org/2374
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agobuild fix on older linux
Michael Meffie [Thu, 8 Jul 2010 18:45:22 +0000]
build fix on older linux

The commit d0abe56aa47d4561ba57527d53a2b0db2ea613c2 added
a duplicate inclusion of freezer.h. Older versions
of linux (circa 2.6.20) are missing include guards
on freezer.h.

Change-Id: I12c47cded7d06a3514a520b554bbcbd3328f0d2b
Reviewed-on: http://gerrit.openafs.org/2369
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoSOURCE-MAP updates
Alexander Redinger [Fri, 2 Jul 2010 19:43:42 +0000]
SOURCE-MAP updates

SOURCE-MAP now reflects state of current code tree,
reformatted for readability and easier updating.

Change-Id: I858156692c1e4c60ba4d5a75b684db2a079e2dba
Reviewed-on: http://gerrit.openafs.org/2348
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agovos: Don't call SubEnumerate twice
sanket [Thu, 1 Jul 2010 22:05:24 +0000]
vos: Don't call SubEnumerate twice

Set a flag to say when we've called SubEnumerate, so that we don't
end up calling it twice when in -format mode

(Simon Wilkinson extracted this from a larger patch by sanket)

FIXES 41031

Change-Id: I2cadd536cb6c9f389330d64ffbf35a16d673d2de
Reviewed-on: http://gerrit.openafs.org/2320
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoUpdate the Red Hat spec file to include fssync-debug man pages
Jonathan Billings [Thu, 8 Jul 2010 13:23:28 +0000]
Update the Red Hat spec file to include fssync-debug man pages

Include the new man pages in the base 'openafs' package.  The package
build process fails with unpackaged files without this update.

Change-Id: Ie7a80a283bb95b492b56be0133c1bd811953c57e
Reviewed-on: http://gerrit.openafs.org/2364
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFix VPrintDiskStats_r logging
Andrew Deason [Fri, 2 Jul 2010 19:28:29 +0000]
Fix VPrintDiskStats_r logging

VPrintDiskStats_r tried to log some information using separate Log()
statements on the same line. This looks very odd when logged, since we
add a timestamp to every Log() call these days. Fix it to print the
line as one call to Log().

Change-Id: I19a5365c24208229201ba54ff04e793b5e50eee5
Reviewed-on: http://gerrit.openafs.org/2359
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoviced: Remove stray \r
Andrew Deason [Mon, 28 Jun 2010 19:55:18 +0000]
viced: Remove stray \r

The "File Server has started at" log message contains a trailing '\r'
for some reason. Remove it (ctime will give us a trailing '\n').

Change-Id: I8f280abff9a7548f376f007021d74d3a21ac45cf
Reviewed-on: http://gerrit.openafs.org/2358
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoRemove a few erroneous NEWS entries for 1.5.75
Russ Allbery [Wed, 7 Jul 2010 21:04:37 +0000]
Remove a few erroneous NEWS entries for 1.5.75

FUSE was already in 1.5.74, and DAFS fast-restart was not in
1.5.75.

Change-Id: I2e1b765c61ce4670800787dbcfd13c2c2af63f79
Reviewed-on: http://gerrit.openafs.org/2356
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFix build
Ben Kaduk [Thu, 8 Jul 2010 02:10:44 +0000]
Fix build

Previous commit to this file was not as tested as we thought.
This one actually builds (well, except for the part where flex
doesn't like et_lex.lex.l at the moment).

Change-Id: I11d918adc50bb387c022d90cb0877a6a667e8252
Reviewed-on: http://gerrit.openafs.org/2362
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFBSD: sync with NFS for *pages vnops
Ben Kaduk [Thu, 8 Jul 2010 00:47:55 +0000]
FBSD: sync with NFS for *pages vnops

We've had per-cpu counter variables for a while, use the proper
macros to adjust them.
FBSD90 has had the page queue locks pushed down a level, so we
don't need to lock them and should lock individual pages instead.
This fixes mmap() on FreeBSD HEAD.

Change-Id: I95d16097aaa65c1c99b4a686c05ac84fe9c11584
Reviewed-on: http://gerrit.openafs.org/2360
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoAdd NEWS entries for 1.5.75
Russ Allbery [Wed, 7 Jul 2010 19:50:37 +0000]
Add NEWS entries for 1.5.75

Change-Id: I3510b03b6821ce266ebcf217b4bf7d6065a8aaa5
Reviewed-on: http://gerrit.openafs.org/2355
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoklog: refactor klog_prompter
Andrew Deason [Wed, 7 Jul 2010 17:52:10 +0000]
klog: refactor klog_prompter

The ifdefs in klog_prompter were getting a bit confusing. Split out
some logic into a separate "is this prompt a password prompt"
function. As a result, we can build without KRB5_PROMPT_TYPE_PASSWORD
defined, which happens to be the case on hp_ux11i.

Change-Id: I1d5f794bfc33017f699478e367cde91a3e77d33c
Reviewed-on: http://gerrit.openafs.org/2353
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFix shlibafsrpc des.c hp-ux special case
Andrew Deason [Wed, 7 Jul 2010 16:40:20 +0000]
Fix shlibafsrpc des.c hp-ux special case

'$$@ -I../des', not '-I../des $$@'.

Change-Id: I322963b8f6ab31cfa76a91095be665ca59a3c9c3
Reviewed-on: http://gerrit.openafs.org/2352
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoHPUX: correct PostPopulateVCache vfsp set
Andrew Deason [Wed, 7 Jul 2010 15:23:27 +0000]
HPUX: correct PostPopulateVCache vfsp set

Setting AFSTOV(avc)->v_mount is the linux/BSD way. avc->v.v_vfsp is
the HP-UX (et al) way.

Change-Id: If2cd1c1e74fcd0ca5ad981497abe7968d97cf0ed
Reviewed-on: http://gerrit.openafs.org/2351
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoHPUX: include proc_iface.h for proc_t
Andrew Deason [Wed, 7 Jul 2010 14:51:45 +0000]
HPUX: include proc_iface.h for proc_t

We use proc_t in a typedef, and we need proc_iface to get proc_t. So,
include it.

Change-Id: I515abe43ae1d3b4a2c54ebe1b7192a91ed441117
Reviewed-on: http://gerrit.openafs.org/2350
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoUINT_MAX requires limits.h
Andrew Deason [Tue, 6 Jul 2010 19:02:56 +0000]
UINT_MAX requires limits.h

We need to include limits.h to use UINT_MAX on some platforms, so
include it in src/rxkad/v5der.c.

Change-Id: I79343011e72080e58f07d53195488808d9e29121
Reviewed-on: http://gerrit.openafs.org/2339
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agokernel InitPeerParams has bogus branching and dup code
Derrick Brashear [Wed, 7 Jul 2010 14:43:48 +0000]
kernel InitPeerParams has bogus branching and dup code

several of the mtu configuration cases for the kernel version
of InitPeerParams were bogus. clean up the function.
(a forthcoming change reworks this anyway, but..)

Change-Id: Ia4449d5cecc80cddae7d0f611186f48614b908ee
Reviewed-on: http://gerrit.openafs.org/2343
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoHPUX: make osi_procname a stub
Andrew Deason [Tue, 6 Jul 2010 19:41:13 +0000]
HPUX: make osi_procname a stub

It is not immediately clear how to obtain the current process name on
HPUX, and the current osi_procname definition breaks the build, so
just make osi_procname a stub for HPUX.

Change-Id: I8c825d53d7f25b1500b41629ba73f2fe1f48f00a
Reviewed-on: http://gerrit.openafs.org/2341
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFix stray static inline
Andrew Deason [Tue, 6 Jul 2010 19:10:35 +0000]
Fix stray static inline

'static inline' should be 'static_inline'; keep the hp-ux compiler
happy.

Change-Id: Ibfb819571c608b9ca7c1437fde6898b405bccc4c
Reviewed-on: http://gerrit.openafs.org/2340
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agofix newline conventions
Derrick Brashear [Tue, 6 Jul 2010 15:11:25 +0000]
fix newline conventions

we had some CRLF files hanging out. fix them.

Change-Id: Ie2aa707813967192f202aabc3b28808ae8f80da6
Reviewed-on: http://gerrit.openafs.org/2335
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agorxkad heimdal cleanup openafs-devel-1_5_75
Derrick Brashear [Tue, 6 Jul 2010 13:36:27 +0000]
rxkad heimdal cleanup

don't assume every system have uint16_t and uint32_t;
instead massage for use of native afs types.

Change-Id: I8943f37ecf6dd5d1565ed295b6e6a2ca9eea5b6d
Reviewed-on: http://gerrit.openafs.org/2334
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoWindows: update release notes for 1.5.75
Jeffrey Altman [Tue, 6 Jul 2010 04:30:06 +0000]
Windows: update release notes for 1.5.75

Add:

 * better description of Win7 netbios name lookup bug

 * "fs newcell" changes

 * IdleDeadTimeout registry value

 * NatPingInterval registry value

 * ReadOnlyVolumeVersioning registry value

Change-Id: Ibf5ff8145be94ab8a7a48a1a9bd87c7d60e8549b
Reviewed-on: http://gerrit.openafs.org/2333
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: ChangeLog for 1.5.75
Jeffrey Altman [Fri, 2 Jul 2010 17:55:05 +0000]
Windows: ChangeLog for 1.5.75

Change-Id: Iff322bf65d9d8b5af58d6f4b53630256504999cb
Reviewed-on: http://gerrit.openafs.org/2332
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agomake openafs 1.5.75
Derrick Brashear [Fri, 2 Jul 2010 21:53:50 +0000]
make openafs 1.5.75

version number updates for 1.5.75

Change-Id: I05cf66281e497c3eff473a350abe480e6fcfd928
Reviewed-on: http://gerrit.openafs.org/2328
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFBSD: always close the rx socket when shutting down
Ben Kaduk [Sun, 4 Jul 2010 06:28:02 +0000]
FBSD: always close the rx socket when shutting down

The soclose(rx_socket) call is needed in order to restart AFS.
(Otherwise sobind() fails with EADDRINUSE.)
While here, use the defined constant SHUT_RDWR instead of
hardcoding '2' for soshutdown's second argument.

Change-Id: Iba7cac3aec79764783628da28b12253d496a7680
Reviewed-on: http://gerrit.openafs.org/2331
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoDo not recurse on the glock in rxk_NewSocketHost
Ben Kaduk [Sun, 4 Jul 2010 02:58:39 +0000]
Do not recurse on the glock in rxk_NewSocketHost

If sobind() failed, we would lock the glock before going to bad,
which proceeded to lock the glock, panic()ing on the recursion attempt.
Remove the unneeded first call.

Change-Id: Ifa793735ebe64bde98156caa610c06612bdb92bd
Reviewed-on: http://gerrit.openafs.org/2330
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoRemoved kpasswd from openafs-file-list
Jonathan Billings [Wed, 30 Jun 2010 19:09:39 +0000]
Removed kpasswd from openafs-file-list

The executable %{_bindir}/kpasswd was included in the
the 'openafs' base package.

This change removes the kpasswd executable from the base package.  It
is still built and is installed in the 'openafs-kpasswd' package.  I
believe this was the original intent of the 'openafs-kpasswd' package.

Change-Id: Idf49747d8a703bb959cdf758d489d640045f285f
Reviewed-on: http://gerrit.openafs.org/2305
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoupdate VAllocVnode logging
Derrick Brashear [Fri, 2 Jul 2010 21:42:13 +0000]
update VAllocVnode logging

move the log message i added to the correct place and put one where
it came from. oops

Change-Id: Ieb78d8cc076dbc2279922b0909546878b9ee005e
Reviewed-on: http://gerrit.openafs.org/2327
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoDAFS: Salvage VG on volume creation error
Andrew Deason [Tue, 29 Jun 2010 18:19:11 +0000]
DAFS: Salvage VG on volume creation error

When trying to create a volume (either an entirely new volume or a
clone), request a demand-salvage on that volume group if we hit an
unexpected error. This can allow some situations to automatically
rectify themselves if, for example, a volume is missing its .vol
header, but still otherwise exists and causes an error during a clone.

Change-Id: I22b3e9028685395a8e621962138dee9f5f2ec822
Reviewed-on: http://gerrit.openafs.org/2286
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoDAFS: Allow FSSYNC salvages on unknown volumes
Andrew Deason [Tue, 29 Jun 2010 19:44:31 +0000]
DAFS: Allow FSSYNC salvages on unknown volumes

Allow salvage requests over FSSYNC (FORCE_ERROR with the FSYNC_SALVAGE
reason code) that are requested on volumes that we do not know to
exist. This can be helpful if a salvage is requested on a volume that
someone attempted to create but failed, indicating that a
partially-created volume may be in the way.

Log an additional message when we do this, as it should not be a
normal occurrence.

Change-Id: I6e1bbe35111a41c489fe85cad36e6a8a6f323a5a
Reviewed-on: http://gerrit.openafs.org/2285
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLinux: cache bypass: fix FCSBypass tests
Marc Dionne [Fri, 2 Jul 2010 13:13:50 +0000]
Linux: cache bypass: fix FCSBypass tests

Add some parentheses around the tests for FCSBypass.
Without them, the test will not always give the intended result.

Change-Id: I94cb2b2c95c702981fce9cff066b620bce652ee1
Reviewed-on: http://gerrit.openafs.org/2324
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLinux: cache bypass: warning fix in afs_bypasscache.c
Marc Dionne [Fri, 2 Jul 2010 13:10:06 +0000]
Linux: cache bypass: warning fix in afs_bypasscache.c

Cast the printf argument to int to match the format specifier.

Change-Id: I4300c8a407c99c40e116a6e166a76112fb92d254
Reviewed-on: http://gerrit.openafs.org/2323
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agocache-bypass explicitly reference pages involved in background i/o
matt@linuxbox.com [Fri, 18 Jun 2010 18:27:07 +0000]
cache-bypass  explicitly reference pages involved in background i/o

Formerly, we assumed that any page eligible for background i/o could
be effectively pinned by lock_page.  Persuant to concern expressed by
Simon that such pages might be eligible to be released by the kernel
after readpages returns, call get_page to increment the refcount on
each page before dispatching a background read (and matching put_page
when the i/o is completed).

Change-Id: Ib3a63e56e6b902b4eb5deb769847e7f17ce2c9ff
Reviewed-on: http://gerrit.openafs.org/2215
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoDAFS: Log attempted salvage requests
Andrew Deason [Tue, 29 Jun 2010 17:30:10 +0000]
DAFS: Log attempted salvage requests

Log in FileLog (or VolserLog, or the log of any program that requests
salvages) when we request a demand-salvage to occur.

Change-Id: I2444480287a1647c2d3e25039467167e28e17f38
Reviewed-on: http://gerrit.openafs.org/2284
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoBuild: Let configure pick our lex and yacc
Simon Wilkinson [Thu, 1 Jul 2010 19:18:33 +0000]
Build: Let configure pick our lex and yacc

Let the autoconf magic pick our lex and yacc implementations,
rather than hardcoding possibly wrong values in osconf.m4

FIXES 1394

Change-Id: I692eb8568780c78cfe6ba2e5b0fddca6fe6c142c
Reviewed-on: http://gerrit.openafs.org/2316
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoBuild: Rework git version detection
Simon Wilkinson [Tue, 29 Jun 2010 20:45:36 +0000]
Build: Rework git version detection

Rework the git version detection script to handle some issues that
have been pointed out.

1/ Make it work properly with objdir builds
2/ Don't try to work out if the tree is dirty if git describe failed
3/ Use the configured VERSION as a fallback if we can't obtain proper
   version information during a make

Change-Id: I39494e1c18cf4eacbb55386334da7128fbe96310
Reviewed-on: http://gerrit.openafs.org/2283
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agovol: Move destroyMe check outside of inUse check
Andrew Deason [Fri, 25 Jun 2010 21:22:28 +0000]
vol: Move destroyMe check outside of inUse check

The destroyMe conditional does not depend on the result of
VShouldCheckInUse(), so move it outside of that block.

Change-Id: Ieb4c97ae9f76b4369680629f18eecd1dfc06682f
Reviewed-on: http://gerrit.openafs.org/2276
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoVAllocVnode error handling
Derrick Brashear [Wed, 30 Jun 2010 00:49:41 +0000]
VAllocVnode error handling

avoid growing a volume index too large. handle errors other than just by
dropping a core

Change-Id: Id1bf7a1a40672b6b960cc0d7a1cd54f48ab0b50a
Reviewed-on: http://gerrit.openafs.org/2291
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoDo not call afs_FlushVCBs with afs_xvcache held
Rainer Toebbicke [Wed, 23 Jun 2010 11:08:47 +0000]
Do not call afs_FlushVCBs with afs_xvcache held

In afs_AllocCBR, use dynamically created afs_cbr structures
when running out of preformatted ones, rather than calling
afs_FlushVCBs under, potentially, the afs_xvcache lock
(which would be held across the RPC, difficult to drop and
re-acquire under the current hierarchy).

Modest modernization of the number preformatted afs_cbr structures,
rule-of-thumb, not pretending any research.

Change-Id: I9427427d5dab7d4639822c370bdded0418f67d9e
Reviewed-on: http://gerrit.openafs.org/2243
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agobosserver force corefiles
Derrick Brashear [Fri, 14 May 2010 20:03:32 +0000]
bosserver force corefiles

override system resource limits so we get corefiles

Change-Id: I50f228d709090c8275bed2fc2958653c43a0a026
Change-Id: I5b5e8c6a5e02ed0b28610949eb81f6345357969e
Reviewed-on: http://gerrit.openafs.org/1959
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoLinux: cache bypass: remove warning print before panic
Marc Dionne [Fri, 2 Jul 2010 13:28:05 +0000]
Linux: cache bypass: remove warning print before panic

This warning printf has some issues - it prints out pointers as
ints with %d (which causes warnings), and if the intention was
to print the referenced values, they wouldn't be set yet at that
point in the function.

Since the purpose is not clear and it has issues, just remove it.

Change-Id: Ied69c390818f9dff235bdaa31af42996aaa39af3
Reviewed-on: http://gerrit.openafs.org/2325
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLinux: cache bypass: warning fixes in afs_pioctl.c
Marc Dionne [Fri, 2 Jul 2010 12:55:44 +0000]
Linux: cache bypass: warning fixes in afs_pioctl.c

Fix two minor warnings in afs_pioctl.c:

- gcc complains that threshold may get used uninitialized.  the
warning looks bogus, but initialize it to keep gcc happy.

- PSetCachingBlkSize is declared but never defined.

Change-Id: I3ac84d665f60ba51fef2d52f2bd8d90e0a7bc3b3
Reviewed-on: http://gerrit.openafs.org/2322
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLinux: cache bypass: deal with the afs_serverHasNo64Bit case
Marc Dionne [Thu, 1 Jul 2010 20:07:40 +0000]
Linux: cache bypass: deal with the afs_serverHasNo64Bit case

Deal correctly with the case of a server with no 64-bit fetch
support.  In that case, the code needs to fallback to the standard
FetchData call, similar to what happens in afs_fetchstore.c.
Move existing check out of 64-bit-only branch so servers
already known to be non-64-bit and not merely those newly
discovered so execute the non-64-bit FetchData.

Change-Id: I505ce6d88072bc3ee5208863717395a78f8562fa
Reviewed-on: http://gerrit.openafs.org/2319
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoProtect truncate_inode_pages when called from osi_VM_FlushPages
Rainer Toebbicke [Wed, 23 Jun 2010 13:10:46 +0000]
Protect truncate_inode_pages when called from osi_VM_FlushPages

truncate_inode_pages requires the mapping to be protected using
i_mutex / i_sem, which is not held whereever osi_FlushPages is called.

Change-Id: I2ca59cf75633368efb7f6a17fd01c7c517a8f609
Reviewed-on: http://gerrit.openafs.org/2244
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLinux: cache bypass: avoid unused variable warnings
Marc Dionne [Thu, 1 Jul 2010 19:22:47 +0000]
Linux: cache bypass: avoid unused variable warnings

Some variables are only used for AFS_64BIT_CLIENT code, so make
their declaration conditional as well.

Also, initialize 'code' while we're at it.  The compiler has a
legitimate complaint that it could be used before it's set,
for instance if we have AFS_64BIT_CLIENT but afs_serverHasNo64Bit
is true.

Change-Id: Ic04b07fffa9668123a9029bb42415a7c701c2339
Reviewed-on: http://gerrit.openafs.org/2317
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLinux: cache bypass: warning cleanup in afs_daemons.c
Marc Dionne [Thu, 1 Jul 2010 19:38:32 +0000]
Linux: cache bypass: warning cleanup in afs_daemons.c

Remove unnecessary warning for the UKERNEL case.  This file will
always get compiled with UKERNEL.

Remove an "if 1" ifdef that was probably used while debugging to
make the function non static.

Change-Id: I5ba5bbb4bd2b782c605699028cf3ad2c7e8cd41f
Reviewed-on: http://gerrit.openafs.org/2318
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLinux: Fix pagevec use in cache-bypass
Simon Wilkinson [Wed, 30 Jun 2010 07:29:28 +0000]
Linux: Fix pagevec use in cache-bypass

Cache-bypass was still using the old style pagevec manipulation
functions, and so won't build on newer kernels. Update it to use the
same pagevec functions as the generic readpages code.

FIXES 127505

Change-Id: I9d8acaf3165bbdf24068bd9145a2369cd0c87e4d
Reviewed-on: http://gerrit.openafs.org/2298
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoDocument fs -human
Andrew Deason [Thu, 1 Jul 2010 16:57:59 +0000]
Document fs -human

Document the new -human switch for 'fs diskfree' and 'fs listquota'.

Change-Id: Ic4b4f9d7492c887085ab6da4c802cfc75fd4d08e
Reviewed-on: http://gerrit.openafs.org/2314
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFBSD: do not recurse on the afs_xvcache write lock
Ben Kaduk [Thu, 1 Jul 2010 16:47:55 +0000]
FBSD: do not recurse on the afs_xvcache write lock

afs_ShakeLooseVcaches grabs the write lock before calling
osi_TryEvictVCache.  The latter calls vgone(l), which sometimes
calls into VOP_CLOSE, which again trys to acquire the write lock,
leading to deadlock.  Drop the write lock and reaquire it in
TryEvictVCache as a fix.

While here, set *slept to 1 since we drop the glock.

This churn was enough that the gcc no longer cached the value of
AFSTOV(avc), which gets set to 0 in VOP_RECLAIM, so the subsequent
VOP_UNLOCK dereferenced a null pointer.  Cache the vnode pointer
in a local variable for the entire function instead of using
AFSTOV() everywhere.

Change-Id: Ic826e7888cb400c19857c58cb6ed88b9bdd0dddc
Reviewed-on: http://gerrit.openafs.org/2315
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agofs diskfree displays 'total' not 'kbytes'
Andrew Deason [Thu, 1 Jul 2010 16:52:21 +0000]
fs diskfree displays 'total' not 'kbytes'

Correct the fs manpage to show that 'fs diskfree' shows a header
called 'total' to represent the total disk space, not 'kbytes'.

Change-Id: Id827ec81dcfd79ab28eed3bc392524a378f0069d
Reviewed-on: http://gerrit.openafs.org/2313
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agofs: Correct human-readable output alignment
Andrew Deason [Thu, 1 Jul 2010 16:22:13 +0000]
fs: Correct human-readable output alignment

'fs lq' output separates its space values by whitespace, but 'fs df'
does not, which was causing the human-readable output for 'fs' to not
be properly aligned with the output headers. Modify HumanPrintSpace to
take up exactly 10 characters (9 for the value, 1 for the exponent),
and have the callers print out an extra space if appropriate.

Change-Id: Ied81e73e1e84df34e63fdf0c80ad86341bea0cd4
Reviewed-on: http://gerrit.openafs.org/2311
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agonuke configure options from AIX param files
Tom Keiser [Thu, 1 Jul 2010 06:07:54 +0000]
nuke configure options from AIX param files

Remove antisocial behavior whereby the AIX param
files silently turn on the FAST_RESTART and
BITMAP_LATER config options.

Change-Id: Ic7f77bd6c7aefe0f17b6d8796ce204cc8a5ad4c2
Reviewed-on: http://gerrit.openafs.org/2309
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoupdate ticket5 from heimdal
Derrick Brashear [Wed, 30 Jun 2010 19:35:38 +0000]
update ticket5 from heimdal

includes updated instructions for updating.
note that gen_glue.c in lib/asn1 has a bug which omits
a needed newline in the "const struct units * asn1_%s_units(void);",
line.

FIXES 127554

Change-Id: Ibc880bf51419d51de40b33d8c43122e592971b0b
Reviewed-on: http://gerrit.openafs.org/2306
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoRemove --enable-fast-restart configure option
Andrew Deason [Mon, 28 Jun 2010 18:48:00 +0000]
Remove --enable-fast-restart configure option

FIXES 127526

Change-Id: I80a18fe083a0d52dad9d4e2d5b14bf667c44630b
Reviewed-on: http://gerrit.openafs.org/2278
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoDAFS: fix VOL_HDR_IN_LRU state bit tracking
Tom Keiser [Wed, 30 Jun 2010 22:40:20 +0000]
DAFS: fix VOL_HDR_IN_LRU state bit tracking

For the case where the cached vp->header can be re-used by
GetVolumeHeader(), we have not been re-setting the VOL_HDR_IN_LRU
state bit.  Although this has not affected correctness (this
bit is merely used to aid in debugging), we should be resetting
it in all relevant cases...

Change-Id: I2ad2b8c5070470beb067efdcda6f76f6b72c006c
Reviewed-on: http://gerrit.openafs.org/2308
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agofs: HumanPrintSpace is void
Andrew Deason [Wed, 30 Jun 2010 17:59:24 +0000]
fs: HumanPrintSpace is void

HumanPrintSpace never returns anything; declare it void.

Change-Id: I336deb991e298b5132667a9bd7311b521fc082c3
Reviewed-on: http://gerrit.openafs.org/2304
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agovlclient: Remove incorrect whitespace fix
Andrew Deason [Wed, 30 Jun 2010 17:53:13 +0000]
vlclient: Remove incorrect whitespace fix

Commit e59a0ff9934f8ea44ecb02e9fdaa81a29bd04b61 generated a warning
since we try to assign NULL into a character. Just remove this code,
since removing trailing whitespace was already handled by commit
df18c9e895e75e77ed466dea3b06ef2a0a07260a.

Change-Id: I915c0678a2f6893e09cf049bf71c519be554369f
Reviewed-on: http://gerrit.openafs.org/2303
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoDisable red zones for amd64 FBSD kernel code
Ben Kaduk [Wed, 30 Jun 2010 04:40:09 +0000]
Disable red zones for amd64 FBSD kernel code

The kernel has been compiled with -mno-red-zone since at least
FreeBSD 5.0; when we compile libafs.ko with red zones enabled
and interact with the red-zone-less kernel, we get occasional
stack corruption, which manifests itself in a variety of
unpleasant ways.
The flags we pass to gcc for our module build currently differ
substantially from those used during a kernel build (or modules
built with the kernel); I hope to transition to a module build
process involving bsd.kmod.mk in the relatively near future.

Change-Id: I406e264c1f96e1d893b9d12b561f48a3cbfdf57c
Reviewed-on: http://gerrit.openafs.org/2297
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoAdd human-readable printout to fs df
Evan Broder [Wed, 30 Jun 2010 08:52:15 +0000]
Add human-readable printout to fs df

This patch adds a -human option to fs df, which causes it to printout
all of its values in "human-readable" form (i.e. rounded to roughly
the nearest power of 1024).

FIXES 124529

Change-Id: I98e4c872abec5784c6ec600d5d977c36f4a8b0ac
Reviewed-on: http://gerrit.openafs.org/2301
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agofix & enhance vlclient command-line handling
Max Cohan [Wed, 30 Jun 2010 08:30:49 +0000]
fix & enhance vlclient command-line handling

Corrects an EOL bug in vlclient and adds a more user-friendly
handling of request for help (i.e., '-help' now works)

FIXES 125036

Change-Id: I70f6523d538e34a02536e482f99916293a195df5
Reviewed-on: http://gerrit.openafs.org/2300
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFix VLog so that actual levels are used
Steven Jenkins [Wed, 30 Jun 2010 08:06:29 +0000]
Fix VLog so that actual levels are used

Fix VLog() so that it actually uses the loglevels and does not set
all log messages to level 5.

FIXES 125035

Change-Id: Ia9f42a814be182215cedadb6a4837347ace32f41
Reviewed-on: http://gerrit.openafs.org/2299
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFBSD: in reclaim, print the failed vnode
Ben Kaduk [Wed, 30 Jun 2010 04:29:41 +0000]
FBSD: in reclaim, print the failed vnode

If we fail to flush a vnode, in addition to printing a diagnostic
message, also print information about the vnode; fs getfid can
frequently confirm which vnode(s) are problematic, which may be
useful in debugging the failure.

Change-Id: Ia6e93f436f9dcd2d634c46856ede5effbf79e9cb
Reviewed-on: http://gerrit.openafs.org/2296
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoActually invalidate the buffer in FBSD's FlushPages
Ben Kaduk [Wed, 30 Jun 2010 04:27:11 +0000]
Actually invalidate the buffer in FBSD's FlushPages

Chaskiel added a commented-out call to vinvalbuf() in
revision bd707fb7e6 back in 2002; adding in what the
current call should be does not seem to cause any problems
for me.

Change-Id: I2450fbaaa51b5baf2781e8a6572065e5f69b44ed
Reviewed-on: http://gerrit.openafs.org/2295
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFBSD TryToSmush locking fixup
Ben Kaduk [Wed, 30 Jun 2010 04:21:10 +0000]
FBSD TryToSmush locking fixup

We need to hold the interlock when we check v_flags, so do so.

TryToSmush is sometimes called with the vnode already locked,
as the current code appears to hold the vnode lock for the
current working directory (which is probably a bug).  Check if
the lock is already held (panic if someone else has it!), and
unlock as appropriate when we're done.

Change-Id: Id09ef1e10632c7f63b590271a6339a069176deac
Reviewed-on: http://gerrit.openafs.org/2294
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoCorrect whitespace in FBSD/osi_vm.c
Ben Kaduk [Wed, 30 Jun 2010 04:12:59 +0000]
Correct whitespace in FBSD/osi_vm.c

I'm about to touch this, and the whitespace was bothering me.
Change the six-space indentations to match the rest of the code.

Change-Id: I35a12c82f8b2b4644e58cf1f19f021282e43dc77
Reviewed-on: http://gerrit.openafs.org/2293
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoCorrect FBSD-version conditionals for VFS locking
Ben Kaduk [Sun, 20 Jun 2010 22:49:58 +0000]
Correct FBSD-version conditionals for VFS locking

The locking around some interfaces has changed with time.
Make our preprocessor checks match the reality of when
the changes were made.

Change-Id: If933dd636bb908af27852897e9c77ed600759674
Reviewed-on: http://gerrit.openafs.org/2292
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agostop abusing OPTMZ in aklog
Derrick Brashear [Tue, 29 Jun 2010 18:33:06 +0000]
stop abusing OPTMZ in aklog

instead, abuse XCFLAGS less. sigh

Change-Id: Ieda727bf62704f31ba4c1aebe3c5b8aa62c2dfed
Reviewed-on: http://gerrit.openafs.org/2282
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoklog warning fix
Derrick Brashear [Tue, 29 Jun 2010 18:32:38 +0000]
klog warning fix

fix warning-found uninitialized variable in klog.krb5

Change-Id: Id4c78e2ceef82fcc7fbb6cdae7b6d07d74495547
Reviewed-on: http://gerrit.openafs.org/2281
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFix checked build of vldb_check
Rod Widdowson [Tue, 29 Jun 2010 17:30:39 +0000]
Fix checked build of vldb_check

Checkin http://gerrit.openafs.org/#change,2027 appears to have caused
issues with the checked build for vldb_check.

This fixed is by reflecting the structure change into vldb_check

Change-Id: I12343be8a3a31cb2f6474115a8d9137dadd4ae2d
Reviewed-on: http://gerrit.openafs.org/2280
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoUse git describe to determine build version
Simon Wilkinson [Sat, 26 Jun 2010 18:35:18 +0000]
Use git describe to determine build version

This patch makes the configure and build system use the output
from 'git describe' to determine the version of the software being
built. This means that all that is necessary to create a new release
is to tag the repository - removing the double sources of version
information.

There are a couple of fallbacks for systems which do not have git
available for builds. Firstly, if a file called '.version' exists
in the top level of the repository, then the version information is
pulled from this file. The intention is that those packaging up
git checkouts for onwards distribution will use
'git describe > .version' before producing their tarballs.

Secondly, if we cannot find any version information then the version
will default to 'UNKNOWN'

This all mirrors the way that many others have integrated git with
automake and friends - although the implementation is independent.

Change-Id: I7fa4605e52181d60657ad794ca8efdb5a9fb1449
Reviewed-on: http://gerrit.openafs.org/1824
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>

13 years agoLINUX24: crfree typo
Andrew Deason [Mon, 28 Jun 2010 16:03:28 +0000]
LINUX24: crfree typo

crfree, not crfee.

Change-Id: I4a2d4bd4e37e409b62d587b22c36f4a6d02e9c32
Reviewed-on: http://gerrit.openafs.org/2272
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLINUX24: remove pagecopy and other 2.6-only code
Andrew Deason [Mon, 28 Jun 2010 15:43:55 +0000]
LINUX24: remove pagecopy and other 2.6-only code

The client background readahead code and 'readpages' implementation
were only written for 2.6 kernels and used 2.6-specific constructs.
Remove them, along with references to the 'pagecopy' code, and some
other 2.6-only cruft in osi_vnodeops.c.

Change-Id: I2e939e98bd72cd7b275b0f7a389607ee5dc94efa
Reviewed-on: http://gerrit.openafs.org/2271
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLINUX: Remove LINUX26 conditional in proc2cred
Andrew Deason [Mon, 28 Jun 2010 16:24:04 +0000]
LINUX: Remove LINUX26 conditional in proc2cred

afs_osi_proc2cred contained a 2.4 implementation; remove it, since we
can assume at least 2.6.

Change-Id: I605856e920508cf49a975e5375ade87e00598763
Reviewed-on: http://gerrit.openafs.org/2274
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLINUX24: Remove BDI references
Andrew Deason [Mon, 28 Jun 2010 16:17:50 +0000]
LINUX24: Remove BDI references

afs_backing_dev_info was still referenced in a couple of places in the
LINUX24 code. Although they are properly ifdef-guarded, these lines
were never getting built, so remove them.

Change-Id: I55ffca5dad99124b9d451925c9fcf15b7060bb9b
Reviewed-on: http://gerrit.openafs.org/2273
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLINUX24: NEED_IOCTL32 fixup
Andrew Deason [Mon, 28 Jun 2010 15:46:22 +0000]
LINUX24: NEED_IOCTL32 fixup

The NEED_IOCTL32 symbol needs to protect the entire if block, not just
the conditionals.

Change-Id: Ie33860b1d5677cec19ed19aa1ccc1ce0a26824ff
Reviewed-on: http://gerrit.openafs.org/2270
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLINUX24: cr_ref is a regular int
Andrew Deason [Mon, 28 Jun 2010 15:42:05 +0000]
LINUX24: cr_ref is a regular int

cr_ref is a regular integer, not an atomic_t, so we need to just
assign '1' to it directly.

Change-Id: I3533c79a67f7be35724cc81553d24bfecb7b81d3
Reviewed-on: http://gerrit.openafs.org/2269
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>