openafs.git
10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 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>

10 years agoLINUX24: Remove group_info macros/functions
Andrew Deason [Mon, 28 Jun 2010 15:33:38 +0000]
LINUX24: Remove group_info macros/functions

The LINUX24 code has a macro and a function abstracting
'struct group_info' access. But 'struct group_info' does not exist in
2.4, and nothing calls these, so get rid of them.

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

10 years agoMake file offsets in vldb layout unsigned ints
Rod Widdowson [Wed, 26 May 2010 15:18:26 +0000]
Make file offsets in vldb layout unsigned ints

vlserver.h has a few cases where links through the vldb are being
stored as afs_int32s. These are file offsets and should be unsigned.
This commit fixes just these declarations.  The code still compiles
(because they are silently cast all over the shop), but it starts
the tidy effort.

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

10 years agoMake make_libafs_tree.pl use strict and warnings
Simon Wilkinson [Sun, 27 Jun 2010 14:15:33 +0000]
Make make_libafs_tree.pl use strict and warnings

Turn on the perl use strict and use warnings options in the
make_libafs_tree script to better catch programming bugs.

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

10 years agoLinux: Use filehandles for all 2.6 kernels
Marc Dionne [Sat, 26 Jun 2010 00:06:08 +0000]
Linux: Use filehandles for all 2.6 kernels

This generalizes the use of the exportfs API and file handles
to open disk cache files for all 2.6 kernels.

Code outside of src/afs/LINUX (ex: afsd) can assume that file
handles are used for all 2.6 kernels and can use AFS_LINUX26_ENV
to check.

Within src/afs/LINUX/osi_file.c, NEW_EXPORT_OPS can be used to
determine if the old exportfs API (pre 2.6.24) or the new one
applies.

All traces of the LINUX_USE_FH define are removed.

FIXES 127530

Change-Id: I6803101c56981f9f674cef581f7299656723fdf3
Reviewed-on: http://gerrit.openafs.org/2260
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agolinux trivially track host signedness in afs_prototypes.h
Matt Benjamin [Mon, 28 Jun 2010 00:00:37 +0000]
linux trivially track host signedness in afs_prototypes.h

track host signedness in definition of afs_nfsclient_reqhandler, which
changed in 7d1bbee02a80f045a6ae4e30410798f4785906a8.

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

10 years agolibafs: correct export_reqhandler prototype
Andrew Deason [Fri, 25 Jun 2010 20:03:23 +0000]
libafs: correct export_reqhandler prototype

The export_reqhandler function pointer takes an afs_int32*, not an
afs_int32 as the fourth argument.

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

10 years agoUse unsigned addresses in the NFS exporter
Andrew Deason [Fri, 25 Jun 2010 19:17:49 +0000]
Use unsigned addresses in the NFS exporter

Use unsigned IP addresses in the NFS exporter code in libafs. This
modifies the distributed headers exporter.h and nfsclient.h.

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

10 years agoUse unsigned IP addresses in bu*
Andrew Deason [Fri, 25 Jun 2010 18:52:16 +0000]
Use unsigned IP addresses in bu*

Use unsigned IP addresss in bubasics, bucoord, and butc code. This
alters the public tcdata.p.h, but stays away from wire RPCs or
variables used directly with those RPCs.

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

10 years agovlserver: Use unsigned addresses
Andrew Deason [Fri, 25 Jun 2010 17:43:50 +0000]
vlserver: Use unsigned addresses

Use unsigned IP addresses in vlserver code. This alters some
structures in the public cnvldb.h header.

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

10 years agoLinux: remove some 2.6 specific code from 2.4
Marc Dionne [Fri, 25 Jun 2010 23:33:51 +0000]
Linux: remove some 2.6 specific code from 2.4

Remove some code that will never be compiled or used in the
afs/LINUX24 directory.
This includes code depending on AFS_LINUX26_ENV, and on
LINUX_USE_FH which is never set in 2.4 and is going away
soon anyway.

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

10 years agoAutoconf: Update AC_INIT macro use
Simon Wilkinson [Sat, 26 Jun 2010 16:39:20 +0000]
Autoconf: Update AC_INIT macro use

Update the way that we use the AC_INIT macro to match current
autoconf conventions

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

10 years agoRPM Packaging: Make file types clear
Simon Wilkinson [Sat, 26 Jun 2010 14:59:21 +0000]
RPM Packaging: Make file types clear

Make it clear that makesrpm.pl takes the bz2, rather than gzip'd,
versions of the OpenAFS distribution.

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

10 years agoRPM Packaging: All debug kernels are bad
Simon Wilkinson [Sat, 26 Jun 2010 14:55:29 +0000]
RPM Packaging: All debug kernels are bad

We can't build against any of the recent Fedora debug kernels, because
they have options enabled that make criticial symbols GPL-only. Just
skip all debug kernel variants, rather than having to explicitly list
each new Fedora release as it comes out.

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

10 years agoRPM Packaging: Add support for Fedora 12 and Fedora 13
Simon Wilkinson [Sat, 26 Jun 2010 14:54:05 +0000]
RPM Packaging: Add support for Fedora 12 and Fedora 13

Add support for building for Fedora 12 and 13, both i386 and x86_64

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

10 years agoRPM Packaging: Skip comments in configure.in
Simon Wilkinson [Sat, 26 Jun 2010 14:35:07 +0000]
RPM Packaging: Skip comments in configure.in

Skip comments in the configure.in file, so we don't end up using the
commented out version information.

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

10 years agoRemove semicolon from AFS_NORETURN
Andrew Deason [Mon, 14 Jun 2010 16:01:06 +0000]
Remove semicolon from AFS_NORETURN

AFS_NORETURN had a trailing semicolon, which will confuse potential
future additional attribute markers, if used after AFS_NORETURN.
Remove it.

Change-Id: I21fd6b874728b8ca74d0e8abd783cd5015f63e97
Reviewed-on: http://gerrit.openafs.org/2258
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

10 years agoptserver: Remove IP_WILDCARDS symbol
Andrew Deason [Fri, 25 Jun 2010 16:38:37 +0000]
ptserver: Remove IP_WILDCARDS symbol

ptserver defined the symbol IP_WILDCARDS to enable the use of
wildcarding in machine entries. It is always enabled, so just remove
the symbol and always use the wildcard code.

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

10 years agoptserver: Use unsigned addresses
Andrew Deason [Fri, 25 Jun 2010 16:30:15 +0000]
ptserver: Use unsigned addresses

Use unsigned IP addresses in ptserver code. This alters some
prototypes in the public ptuser.h header.

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

10 years agorx: Use unsigned addresses
Andrew Deason [Fri, 25 Jun 2010 14:48:38 +0000]
rx: Use unsigned addresses

RX sometimes uses afs_int32 to represent IP addresses; make it use
afs_uint32. This alters some structures in rx.h and some prototypes in
rx_prototypes.h.

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

10 years agovolser: Use unsigned addresses and volume IDs
Andrew Deason [Thu, 24 Jun 2010 15:19:21 +0000]
volser: Use unsigned addresses and volume IDs

Fix code and header files in src/volser that use afs_int32 for server
IP addresses instead of afs_uint32 (the worst offenders being UV_*
functions). Also fix an instance of afs_int32 being used for a volume
ID, and remove 'struct volser_dest' instead of fixing it, since it is
completely unused.

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

10 years agowindows add rx_Get/SetServiceSpecific to libafsrpc module exports
Matt Benjamin [Thu, 24 Jun 2010 12:51:06 +0000]
windows  add rx_Get/SetServiceSpecific to libafsrpc module exports

Add rx_GetServiceSpecific and rx_SetServiceSpecific to afsrpc.def
using the next available ordinals (267 and 268).

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

10 years agoLinux: Check return code from VerifyVCache in mmap
Simon Wilkinson [Thu, 24 Jun 2010 15:00:22 +0000]
Linux: Check return code from VerifyVCache in mmap

afs_linux_mmap wasn't doing anything with the return code
from afs_linux_VerifyVCache. Change the code so that it matches
the other callers of afs_linux_VerifyVCache

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

10 years agoRemove stale warning suppressions
Andrew Deason [Wed, 23 Jun 2010 22:42:30 +0000]
Remove stale warning suppressions

butc/dump.c and ubik/beacon.c have had their warnings fixed and their
suppressions removed. Remove the warning suppression for tbutc/dump.c
and tubik/beacon.c, as well.

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

10 years agoWindows: Cleanup of src/config/NTMakefile
Jeffrey Altman [Wed, 23 Jun 2010 16:56:17 +0000]
Windows: Cleanup of src/config/NTMakefile

src/config/NTMakefile had the following issues:

 * duplicate entries for headers in $(INCFILES)

 * no clean: rule for $(INCFILES)

 * no clean: rule for $(DESTDIR)\util_cr.exe

 * $(INCTOOLS) dependent upon $(INCFILES) but the order is reversed
   in the install: rule

Change-Id: I2707009d60b303ab897ed25d9245d893fa342a8e
Reviewed-on: http://gerrit.openafs.org/2238
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: Matt Benjamin <matt@linuxbox.com>

10 years agowindows don't include assert.h (and afs support headers) in util_cr.c
Matt Benjamin [Wed, 23 Jun 2010 14:26:12 +0000]
windows  don't include assert.h (and afs support headers) in util_cr.c

Don't include afsconfig.h and afs/param.h in util_cr.c, nor
assert.h.  The assert was included but was in fact not used in
the file, and can be ommitted, per jaltman.  The OpenAFS
includes are then not needed.  An incorrect cast is also changed,
due to jaltman.

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

10 years agoIndicate that fssync unix sockets are the default
Andrew Deason [Wed, 23 Jun 2010 22:47:43 +0000]
Indicate that fssync unix sockets are the default

Using unix domain sockets for FSSYNC has been the default for some
time now; make it clear from the configure help output that this is
the case.

Change-Id: Ibe8b41361242d6cea035b7710910d7d693f60a85
Reviewed-on: http://gerrit.openafs.org/2241
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Russ Allbery <rra@stanford.edu>

10 years agoubik: Remove api for reading during write locks
Andrew Deason [Wed, 23 Jun 2010 21:23:15 +0000]
ubik: Remove api for reading during write locks

This reverts commit eaeff661c26b0f5a504a547952ea1d0f0241b539.

The code using this API will not be in 1.6. Remove this interface for
the 1.6 branch, as it is known to have issues.

FIXES 127520

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

10 years agoTry to flush vnodes in FBSD's unmount, bailing if necessary
Ben Kaduk [Fri, 18 Jun 2010 04:05:14 +0000]
Try to flush vnodes in FBSD's unmount, bailing if necessary

vflush() actually returns something!  Check if we get EBUSY,
and don't continue if so.  Also, actually call vflush on FBSD80_ENV.
Note that we currently leak refs on our root vnode, so this means
umount will fail unless it uses -f, for now.

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

10 years agomariner log messages for creating and removing files
Derrick Brashear [Tue, 27 Apr 2010 17:22:37 +0000]
mariner log messages for creating and removing files

give a hint to event listeners that files are being created and removed

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

10 years agoDon't hold on to the afs_xvcache lock while creating a symlink
Rainer Toebbicke [Mon, 21 Jun 2010 10:02:46 +0000]
Don't hold on to the afs_xvcache lock while creating a symlink

Holding the afs_xvcache lock over the RPC while creating a symlink is a
severe blow to performance as look-ups from other tasks likely
require the lock. Drop the lock and rely solely on the fileserver
to detect a clash with a same entry created simultaneously.

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

10 years agovldb_check: Interpret VLOP_* vlentry flags
Andrew Deason [Wed, 23 Jun 2010 15:13:39 +0000]
vldb_check: Interpret VLOP_* vlentry flags

The flags for each vldb entry can have various VLOP_* bits set to show
that the entry is locked, and for what reason. In vldb_check, output
these bits symbolically instead of mentioning them in "errorflags".

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

10 years agovos: Interpret VLOP_* lock flags
Andrew Deason [Wed, 23 Jun 2010 14:58:38 +0000]
vos: Interpret VLOP_* lock flags

When a volume is locked in the VLDB, we are given flags for the reason
why the lock was set. Make vos interpret and output this reason.

This adds output to any vos command that previously printed that a
volume was LOCKED. It now outputs, for example,

    Volume is currently LOCKED
    Volume is locked for a delete/misc operation

Change-Id: Ie3a6f804a3e3a551840975c3689b24d3916891df
Reviewed-on: http://gerrit.openafs.org/2235
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jason Edgecombe <jason@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

10 years agopatch cbd_printCBcrash - harden callback debugging
Rainer Toebbicke [Tue, 4 May 2010 10:06:55 +0000]
patch cbd_printCBcrash - harden callback debugging

Create callbackup dumps with updates locked out and add bounds checking
and loop detection to the cbd program.

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

10 years agoDo not corrupt volume linktable when special file already exists
Rainer Toebbicke [Tue, 4 May 2010 12:11:30 +0000]
Do not corrupt volume linktable when special file already exists

Upon volume creation, when a special file unexpectedly exists, e.g. due
to a failed cleanup, do not blindly assume that it is the link table.
Otherwise the latter's magic will get silently overwritten.

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

10 years agoMake ubik use unsigned addresses
Andrew Deason [Fri, 27 Nov 2009 22:56:19 +0000]
Make ubik use unsigned addresses

The ubik code currently treats IPv4 addresses as both signed and
unsigned 32-bit ints. Make some instances use unsigned ints to make ubik
more consistent and squash a couple of warnings.

Note that this slightly alters the signatures of the public ubik
functions ubeacon_InitServerListByInfo, ubeacon_InitServerList,
ubik_ServerInitByInfo, ubik_ServerInit, ubik_ParseClientList, and
ubik_ParseServerList, to use unsigned addresses.

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

10 years agoMention that -fakestat fakes local cellular mounts
Andrew Deason [Mon, 17 May 2010 20:44:50 +0000]
Mention that -fakestat fakes local cellular mounts

The afsd man page says that -fakestat only fakes stat information for
cross-cell mount points. Technically it fakes stat information for all
cellular mount points, local or foreign. Most people shouldn't care,
but note the difference, since some places do have local cellular
mount points.

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

10 years agoProvide manpage for fssync-debug and most subcmds
Davor Ocelic [Sun, 20 Jun 2010 13:38:14 +0000]
Provide manpage for fssync-debug and most subcmds

This is another patch in the series to provide manpages for
dafs-related commands.

Most (if not all) documentation is coming from source
documentation and DAFS articles/presentations.

The primary motivation behind this is to comply with Debian
guidelines requiring all binaries to have respective manpages.

This patch has been sitting here for months, so it's good time
to finally submit it.

Note that fssync-debug also supports some vcg* commands, for
which I was not able to find any documentation I could use.
So, they are still left to be documented.

Change-Id: I9d067766e2a90b26646edc87f15a4f533c5c8d44
Reviewed-on: http://gerrit.openafs.org/2220
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

10 years agono fs sa /afs in dynroot mode
Derrick Brashear [Wed, 28 Apr 2010 03:48:36 +0000]
no fs sa /afs in dynroot mode

change the quick start guide so people stop asking why they can't
set the ACL on /afs.

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

10 years agovol: break callbacks when needsCallback is set
Andrew Deason [Fri, 11 Jun 2010 22:40:18 +0000]
vol: break callbacks when needsCallback is set

The needsCallback vol header field indicates that a volume has been
altered by a non-fileserver program somehow, and that callbacks for
the volume should be broken. So, when we attach a volume that has this
flag set, break callbacks if we can. If we are not the fileserver,
tell the fileserver over FSSYNC to break callbacks if we can.

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

10 years agorx mtu ping timing tweaks
Derrick Brashear [Tue, 22 Jun 2010 15:52:48 +0000]
rx mtu ping timing tweaks

avoid potentially sending pings too often. if we aren't desperate,
push out grow mtu pings to just inside call timeouts.

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

10 years agoFix CHush test
Marc Dionne [Tue, 22 Jun 2010 21:37:15 +0000]
Fix CHush test

The compiler flagged this with a warning, and depending on the
flags that are set, the test may not give the expected result.

Use parentheses to get the intended precedence.

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

10 years agoafsd -dynroot-sparse mode for hushed cells
Derrick Brashear [Sat, 19 Jun 2010 15:26:49 +0000]
afsd -dynroot-sparse mode for hushed cells

if an admin specifies -dynroot-sparse (instead of dynroot) come up
with just local cell and cell aliases showing. cell list
is configured as normal. fs newcell works as normal.

document it.

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

10 years agotest suite warning safety
Derrick Brashear [Mon, 21 Jun 2010 05:06:38 +0000]
test suite warning safety

make test suite compile without warning

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

10 years agosalvaged: Break volume callbacks on vol change
Andrew Deason [Fri, 11 Jun 2010 22:39:32 +0000]
salvaged: Break volume callbacks on vol change

The salvager code can change a volume in many ways as it fixes errors.
We should break callbacks on the volume whenever we change it, as
clients may have callbacks on whatever we changed. So, for the
salvageserver, send an FSSYNC command to the fileserver to tell it to
break callbacks for that volume.

FIXES 127030

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

10 years agoSimplify preprocessor logic in afs_pioctl
Ben Kaduk [Sun, 20 Jun 2010 22:54:26 +0000]
Simplify preprocessor logic in afs_pioctl

We had identical code in two branches of an if/elif/else path.
Merge them together.
This allows two DARWIN80_ENV blocks to be coalesced; reindent
them correctly while we're here.

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

10 years agoSet VolumeChanged when we create a new root dir
Andrew Deason [Fri, 11 Jun 2010 22:18:07 +0000]
Set VolumeChanged when we create a new root dir

Set the VolumeChanged flag when we create a new root directory in a
volume when salvaging, since doing so changes the volume.

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

10 years agovldb_check: ntohs ubik header size
Andrew Deason [Mon, 21 Jun 2010 22:28:10 +0000]
vldb_check: ntohs ubik header size

The 'size' field in the ubik header is only 16-bits wide. So, we must
use ntohs to convert it, not ntohl. Without this, vldb_check would
emit false-positive "Ubik header size is 0" warnings.

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

10 years agoubik: Do not hide ReplayLog errors
Andrew Deason [Mon, 21 Jun 2010 20:47:06 +0000]
ubik: Do not hide ReplayLog errors

For some reason, the ReplayLog code was printing encountered errors in
the replay log as debug messages. Print them out as regular log
messages instead, since these are errors that at least warrant
visibility, if not more action.

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

10 years agoubik: ntohl on reading the replay log
Andrew Deason [Fri, 18 Jun 2010 22:20:22 +0000]
ubik: ntohl on reading the replay log

When attempting to read the replay log, ubik was not ntohl'ing all
integers that were read in from the log, causing the log to appear
invalid on little-endian systems. Fix it.

This problem manifests as apparent corruption in the database on top
of ubik when a commit is occurring when we are shut down, or a disk
error is encountered during a commit.

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