]> git.michaelhowe.org Git - packages/o/openafs.git/log
packages/o/openafs.git
14 years agofix manpage for udebug -servers
Ken Dreyer [Mon, 11 Apr 2011 21:24:41 +0000 (17:24 -0400)]
fix manpage for udebug -servers

The proper option to udebug is "-server", not "-servers". Fix the manpage to line up with the binary.

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

Change-Id: I66bea4923717a6b7df5fbefa1dd93d469d96be3c
Reviewed-on: http://gerrit.openafs.org/6287
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agodoc: Add aklog_dynamic_auth manpage
Andrew Deason [Fri, 15 Apr 2011 19:18:57 +0000 (14:18 -0500)]
doc: Add aklog_dynamic_auth manpage

Add a manpage for the aklog_dynamic_auth LAM module.

Reviewed-on: http://gerrit.openafs.org/4485
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 24ddd06a0dc19ad7c0b2a2847d41a5ea69665b15)

Change-Id: Ib5f7463b75ee8d58ecc6b725f629fd7600c64792
Reviewed-on: http://gerrit.openafs.org/6297
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoafs: prevent nat pings on destroyed connections
Jeffrey Altman [Mon, 5 Dec 2011 04:15:13 +0000 (23:15 -0500)]
afs: prevent nat pings on destroyed connections

If the connection is no longer in use, reset the nat keep alive
timer to 0 seconds.

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

Change-Id: I019bdce7a8f9f0123786b46d0563f42f7b26c14b
Reviewed-on: http://gerrit.openafs.org/6232
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoFBSD: switch afsi_SetServerIPRank implementation
Ben Kaduk [Sat, 3 Dec 2011 19:37:09 +0000 (14:37 -0500)]
FBSD: switch afsi_SetServerIPRank implementation

Upstream has removed the ia_net{,mask} elements from
struct in_ifaddr, so we can no longer use them directly.
Switch to passing an rx_ifaddr_t (i.e. struct ifaddr*) in instead,
as that uses a slightly different codepath which still works
for our purposes.

We compile the kernel module with -Werror, so storing a pointer
(memcpy return value) in an int is forbidden, hence the conditional
declaration of 't'.

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

Change-Id: Icb338331c879dc4cbd69ae565b115de000e8d3d0
Reviewed-on: http://gerrit.openafs.org/6235
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoFBSD: cleanup dvp locking for ISDOTDOT
Ben Kaduk [Sun, 13 Nov 2011 18:12:50 +0000 (13:12 -0500)]
FBSD: cleanup dvp locking for ISDOTDOT

This is a more correct version of
c2ed2577f9c16df3088158fb593d7aab6e8690d0, which was reverted since
it caused build issues on some versions and kernel panics on others.

We do want to always unlock dvp before calling over the network
in the ISDOTDOT case, but be sure to use the proper spelling
for this operation (as the syntax has changed between FreeBSD versions).
This requires not unlocking dvp right after the afs_lookup() call if
it succeeds, letting us just lock the "child" vp (which is actually
the parent starting from '/') first, and then re-lock dvp.

The error case of afs_lookup() was already handled correctly in
this logic, which is to say that it was incorrect before this change,
attempting to recursively lock dvp which causes a panic.

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

Change-Id: I2d929875a9b008f0aa0b64bce7971932691d9956
Reviewed-on: http://gerrit.openafs.org/6234
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoFBSD: typo fix
Ben Kaduk [Sun, 23 Oct 2011 15:22:07 +0000 (11:22 -0400)]
FBSD: typo fix

Gerrit/5572 added conditionals on __FreeBSD_version >= 900044, which
is (approximately) when a bunch of kernel API renames happened.
(There has since been a dedicated version bump to 900045 a month
or two post-facto, but 900044 should be fine for now.)
However, 900044 is not 90004.

Reviewed-on: http://gerrit.openafs.org/5657
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit ca8ba7e7a41e61cc943b34196872b72a190432e3)

Change-Id: Ibacd6d037590df0696b8dab8107d36bca470785a
Reviewed-on: http://gerrit.openafs.org/6233
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoremove CopyOnWrite2 and unused vars
Derrick Brashear [Wed, 30 Nov 2011 21:20:23 +0000 (16:20 -0500)]
remove CopyOnWrite2 and unused vars

unused static functions make grumpy compilers grumpy.

(cherry picked from commit 7a6cf450babea4e706392cb8ad83586fa7f8e558)

Change-Id: Ib40be2b9458ca799ba2b808ed86a627c40cf6ec4
Reviewed-on: http://gerrit.openafs.org/6161
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoviced: disable accelerated copyonwrite
Derrick Brashear [Sun, 27 Nov 2011 16:23:29 +0000 (11:23 -0500)]
viced: disable accelerated copyonwrite

don't do multistage CoW

FIXES 130295
(cherry picked from commit 97540f78aa333feefe9f567ee71695c1d6451f5c)

Change-Id: I1cd9d54ec9202aa4a11828cd443622413f195687
Reviewed-on: http://gerrit.openafs.org/6160
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoUnix CM: Fix PutVolume in afs_BlackListOnce
Simon Wilkinson [Wed, 23 Nov 2011 16:30:55 +0000 (16:30 +0000)]
Unix CM: Fix PutVolume in afs_BlackListOnce

It isn't safe to keep accessing a structure once we have Put our
reference to it.

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

Change-Id: I013b5d6ecf7705745ab16c8736f32ca7750b933b
Reviewed-on: http://gerrit.openafs.org/6124
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoafs: Leave cellnum alone for explicit mtpt cell
Andrew Deason [Tue, 15 Nov 2011 19:18:48 +0000 (13:18 -0600)]
afs: Leave cellnum alone for explicit mtpt cell

When a mountpoint is given an explicit cell, don't alter cellnum.
Cellnum represents the cell for the parent, and is used for
determining whether or not we're crossing a cell boundary.

Previously, this code forced the mount point to always be treated as
foreign (for a mountpoint prefixed with a cell name), or to always be
treated as local (for a mountpoint prefixed with a cell number).

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

Change-Id: I8d2b378a95533aabd65e7121000ce34238d728b7
Reviewed-on: http://gerrit.openafs.org/6123
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agodafs: avoid null deref getting volume header
Derrick Brashear [Sun, 6 Nov 2011 21:28:27 +0000 (16:28 -0500)]
dafs: avoid null deref getting volume header

we don't assign hd before dereferencing. stop dereferencing
and just use the queue cursor.

Reviewed-on: http://gerrit.openafs.org/5814
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 00beae8c4e3b390637f20584e676cf86c817dadd)

Change-Id: Iec2dbbf84e4f08f02998c9e998d2ea899ce48a5d
Reviewed-on: http://gerrit.openafs.org/6122
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoLinux: 3: Update specfile to know about 3.* kernels.
Edward Z. Yang [Sun, 27 Nov 2011 00:32:51 +0000 (19:32 -0500)]
Linux: 3: Update specfile to know about 3.* kernels.

Update spec file to be consistent with acinclude.m4 with regards to
sysnames.  We don't bother updating the code inside the legacy kernel
build section, as it doesn't get triggered for 3.* kernels (it should
probably get cleaned up at some point.)

Also, fix a bug in error message printing of unrecognized kernel.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Reviewed-on: http://gerrit.openafs.org/6120
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 0f9214164ad56bfe74d0f2cec8775a312f5128dd)

Change-Id: Ie414751cf01c44a73bf9eaef67c593cced2680d9
Reviewed-on: http://gerrit.openafs.org/6121
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoLinux: make sure backing_dev_info is zeroed
Marc Dionne [Tue, 22 Nov 2011 02:27:06 +0000 (21:27 -0500)]
Linux: make sure backing_dev_info is zeroed

The afs backing_dev_info structure is allocated dynamically
without zeroing out the contents.  In particular there's no
guarantee that congested_fn is NULL, causing spurious oopses
when bdi_congested in the kernel tries to call it.

(adapted from commit 8e97cf6f215d5575c63d86eaec59031399f4beda)

Change-Id: I83755b6bb5ec2fada7e077c00d3d8edf8af1cae4
Reviewed-on: http://gerrit.openafs.org/6104
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoLinux: 3.1: adapt to fsync changes
Marc Dionne [Fri, 2 Sep 2011 21:56:58 +0000 (17:56 -0400)]
Linux: 3.1: adapt to fsync changes

The fsync file operation gets new arguments to specify a range.
Add a configure test to check for the API change.

The inode lock is also pushed down into the operation, so we need
to take it ourselves to keep the original behaviour.

Reviewed-on: http://gerrit.openafs.org/5332
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit cbaefa266d433af3b9a082a360e23a42f161d80f)

Change-Id: Idb6770204b014c62a8611548509240f8b5f950bc
Reviewed-on: http://gerrit.openafs.org/6098
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoLinux: 3.2: Use set_nlink to update i_nlink
Anders Kaseorg [Mon, 21 Nov 2011 00:00:00 +0000 (19:00 -0500)]
Linux: 3.2: Use set_nlink to update i_nlink

As of v3.2-rc1~84^2~1, struct inode.i_nlink is now const to prevent
direct modification.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/6096
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit f1dd2d696fb9ab71b4192b156042e0c63019c58a)

Change-Id: I685aa6e8638e8fe864f1a6a7e428dfb6839ebcea
Reviewed-on: http://gerrit.openafs.org/6099
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoLinux: d_delete now takes a const argument
Marc Dionne [Sat, 3 Sep 2011 18:10:50 +0000 (14:10 -0400)]
Linux: d_delete now takes a const argument

The d_delete dentry operation now takes a const argument.  Test for
this and define our function accordingly to avoid warnings.

Reviewed-on: http://gerrit.openafs.org/5335
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit def00ae8ba774f4d7290c29208484dda756dc0e0)

Change-Id: I128a721587f4963849652cb389472a550d81d267
Reviewed-on: http://gerrit.openafs.org/6097
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoredhat: make rpms build on pre-f15 again
Derrick Brashear [Sat, 5 Nov 2011 15:24:43 +0000 (11:24 -0400)]
redhat: make rpms build on pre-f15 again

we don't have systemd everywhere. don't assume it

Reviewed-on: http://gerrit.openafs.org/5813
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 47b010d1e1d0e8bdbbcad73d5aedc19719d5d96a)

Change-Id: I200ca2306b0e6a22cdcb0515641977b2ea6d21a0
Reviewed-on: http://gerrit.openafs.org/6090
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agolinux: Update Packaging to build OpenAFS services for Fedora's systemd
Edward Z. Yang [Tue, 18 Oct 2011 03:16:15 +0000 (23:16 -0400)]
linux: Update Packaging to build OpenAFS services for Fedora's systemd

Fedora 15 now uses systemd (see http://fedoraproject.org/wiki/Systemd)
for the OS init system. While it currently has backwards
compatibility with older SysV-style init scripts, future versions of
Fedora may no longer support it, and OS startup tends to be faster
with the systemd service units. Also, systemd runs all the service's
processes within a linux kernel cgroup.
(see http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt)

This change includes an openafs-client.service and
openafs-server.service unit files for the client and server packages
respectively.

Client
- Loading the openafs module was moved into
/etc/sysconfig/modules/openafs-client.modules. This causes the OS to
load the module on boot. This is the preferred way for modules to be
loaded with Fedora. (See
http://docs.fedoraproject.org/en-US/Fedora/15/html/Deployment_Guide/sec-Persistent_Module_Loading.html
for more details)
- The CellServDB file is generated with sed rather than cat.
This change was made because Systemd doesn't execute as a shell
script, but rather executes processes directly. Rather than invoking
a shell to concatenate the CellServDB.* files, they're written to the
CellServDB file using a sed oneliner.
- Do all of the proper kernel module loading and unloading.

Server
- Since systemd uses cgroups, when the service is shut down, all
processes in the openafs-server.service cgroup will be terminated.

The other changes are standard as per:
    http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd

Original version by Jonathan Billings <jsbillin@umich.edu>.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Reviewed-on: http://gerrit.openafs.org/5637
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Alex Chernyakhovsky <achernya@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 286ffa0d7c4d594ff107b70f9e930271c027a79e)

Change-Id: I653b211ef24fb9010f0a8ff0ad70c11703a64e82
Reviewed-on: http://gerrit.openafs.org/6089
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoLinux: 3.1: update RCU path walking detection in permission i_op
Marc Dionne [Sat, 29 Oct 2011 23:23:07 +0000 (19:23 -0400)]
Linux: 3.1: update RCU path walking detection in permission i_op

The permission() inode operation changed again with kernel 3.1,
back to the form it had before 2.6.38.  This compiles fine,
but is missing the new way of detecting when we get called in
RCU path walking mode, resulting in system hangs.

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

Change-Id: Ibd497309e6699fb585cf70e618373e800b73cbb8
Reviewed-on: http://gerrit.openafs.org/6088
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoklog.krb5: enforce DES for rxkad
Jeffrey Altman [Fri, 14 Oct 2011 13:10:19 +0000 (08:10 -0500)]
klog.krb5: enforce DES for rxkad

0. Always request a TGT regardless of the state of
   writeTicketFile.

1. request des-cbc-crc when requesting a ticket for an
   rxkad service principal

2. check the returned key length to ensure that it matches
   the permitted length of an rxkad key.  If not, generate
   an error instead of overwriting memory and continuing.

FIXES 130278

Reviewed-on: http://gerrit.openafs.org/5619
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 3a9a5783cd1fd73902655f0876e2069b42688c94)

Change-Id: Ia162cb9fc1d67a38cde26e52b9077f5634a62c84
Reviewed-on: http://gerrit.openafs.org/6087
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoSolaris: Specify ARCHFLAGS in CFLAGS
Andrew Deason [Wed, 2 Nov 2011 16:35:42 +0000 (11:35 -0500)]
Solaris: Specify ARCHFLAGS in CFLAGS

Various autoconf tests which use the C compiler may yield different
results depending on whether or not we are compiling for x86 or amd64
on Solaris (different libraries are available, structures may be
different, et al). So, set CFLAGS depending on which arch we are
targeting, so the autoconf results are more consistent with the actual
compilation during the build.

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

Change-Id: Idd0f7d2220ae9762af60e96d087e7eb7ee8c0e63
Reviewed-on: http://gerrit.openafs.org/6086
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoDAFS: Deal with exclusive-state volume headers
Andrew Deason [Fri, 4 Nov 2011 17:42:33 +0000 (12:42 -0500)]
DAFS: Deal with exclusive-state volume headers

GetVolumeHeader assumes that headers on the LRU are not associated
with a volume in an exclusive state. This is known to not be true for
some cases when salvage requests are received over FSSYNC, and may be
true in other scenarios. It's easy to just skip such headers, so skip
them.

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

Change-Id: I0eda511071114b01cd8984d30858b0aa9157727a
Reviewed-on: http://gerrit.openafs.org/6085
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoukernel: handle pioctl errors properly in ktc
Derrick Brashear [Fri, 4 Nov 2011 15:43:01 +0000 (11:43 -0400)]
ukernel: handle pioctl errors properly in ktc

the straight return from call_syscall isn't what we want. munge so
e.g. EDOM handling for ktc_GetToken does the right thing.

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

Change-Id: I8929615940cb4f025bdd04139399f0ceb82955c9
Reviewed-on: http://gerrit.openafs.org/6084
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agosalvager: Implement AskDAFS via SYNC flags
Andrew Deason [Thu, 3 Nov 2011 18:17:33 +0000 (13:17 -0500)]
salvager: Implement AskDAFS via SYNC flags

Instead of probing the DAFS-ness of the fileserver by probing which
FSSYNC opcodes it supports, detect DAFS-ness by looking at the SYNC
response header flags, which explicitly state whether or not the
endpoint is DAFS. This avoids unnecessary "protocol mismatch" log
messages when the endpoint is not DAFS.

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

Change-Id: I0643b0e61795f39b63783c937e88c4a74c3c8312
Reviewed-on: http://gerrit.openafs.org/6083
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoregen: Fail on failures
Andrew Deason [Tue, 8 Nov 2011 18:52:50 +0000 (12:52 -0600)]
regen: Fail on failures

If something fails, don't ignore the error.

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

Change-Id: I5e5ac4d843b9dafce7b7f3acadfcdb0901aed214
Reviewed-on: http://gerrit.openafs.org/6082
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoviced: avoid bogus handle in rename
Derrick Brashear [Wed, 9 Nov 2011 15:34:10 +0000 (10:34 -0500)]
viced: avoid bogus handle in rename

because fileptr's handle can be reset during CopyOnWrite
we need to SetDirHandle after that call

FIXES 130215

Reviewed-on: http://gerrit.openafs.org/5818
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit a1669f3e37299c11bf29a458212e03d1bdb22334)

Change-Id: I57e084102048916b04e45aa32792dc91193e43d8
Reviewed-on: http://gerrit.openafs.org/6081
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agovolser: Preserve needsSalvaged during restore
Andrew Deason [Wed, 9 Nov 2011 23:04:09 +0000 (17:04 -0600)]
volser: Preserve needsSalvaged during restore

Some of the routines during a volume restore may set needsSalvaged, if
an inconsistency is detected while writing the given volume data.
However, after the data is read, we set the volume header information
to what was found in the dump stream, ignoring any needsSalvaged that
may have been set.

To ensure that inconsistent volumes in this situation actually get
demand-salvaged (for DAFS) or offlined (non-DAFS), keep the value of
needsSalvaged in the header, if it was set.

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

Change-Id: Iece9f5b03f0454b7f833e4f3e86da4478b4441fe
Reviewed-on: http://gerrit.openafs.org/6080
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agonamei: Remove extraneous rmdir
Andrew Deason [Thu, 10 Nov 2011 17:58:12 +0000 (11:58 -0600)]
namei: Remove extraneous rmdir

We just unlinked the file, so we know we won't be able to rmdir() the
same thing. Give a path one level higher to
namei_RemoveDataDirectories, so we start rmdir()ing at the parent dir.

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

Change-Id: Ibd14490e2d85bd78522472203ad57120237bff22
Reviewed-on: http://gerrit.openafs.org/6079
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agonamei: tweak getlinkbyte error handling
Jeffrey Altman [Fri, 11 Nov 2011 16:00:47 +0000 (11:00 -0500)]
namei: tweak getlinkbyte error handling

in the event of a pread error, add the same error exit path
trigger that we have elsewhere

Reviewed-on: http://gerrit.openafs.org/5843
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit 51f71e533b20cd875eec8adda71edea044a606da)

Change-Id: I05623d392e7e3446b7b41dcc1778c6aca986bca1
Reviewed-on: http://gerrit.openafs.org/6078
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoWindows: Track active RPCs per scache_t
Jeffrey Altman [Sat, 12 Nov 2011 18:45:08 +0000 (13:45 -0500)]
Windows: Track active RPCs per scache_t

It has been noticed that multiple RPCs can be active on
a cm_scache_t object at the same time.  This is especially
true of directory objects with the redirector.  Track the
number of active RPCs and use that number in cm_MergeStatus
when deciding whether or not to discard the cached data for
the object.

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

Change-Id: Ic40b73ae44c47ad6077fcbbe41bf0d783ab776fc
Reviewed-on: http://gerrit.openafs.org/6045
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: Add Vista/Win7 Firewall Configuration
Jeffrey Altman [Sat, 5 Nov 2011 08:10:42 +0000 (04:10 -0400)]
Windows: Add Vista/Win7 Firewall Configuration

Make use of the INetFwPolicy2 COM interface to configure
the Vista/Win7 firewall for all network profile types.

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

Change-Id: I3022b2480c7c7273e819d0a10c092f22f4af3800
Reviewed-on: http://gerrit.openafs.org/6044
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: cm_Rename break in 9cf7a628c2ff178b2fa236d2c0a41ca9be315036
Jeffrey Altman [Fri, 28 Oct 2011 21:43:24 +0000 (17:43 -0400)]
Windows: cm_Rename break in 9cf7a628c2ff178b2fa236d2c0a41ca9be315036

9cf7a628c2ff178b2fa236d2c0a41ca9be315036 broke renaming of
a file to a name that does not exist.  Put back the code that
makes that possible with a comment.

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

Change-Id: Ia82ddc46b303cb80380c342d44db437c490b8508
Reviewed-on: http://gerrit.openafs.org/6043
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: out of date version not in current chunk
Jeffrey Altman [Fri, 28 Oct 2011 15:36:10 +0000 (11:36 -0400)]
Windows: out of date version not in current chunk

In buf_GetNewLocked(), the comparision to decide whether a
cm_buf_t is a member of the current chunk must take the data
version into account.  If the data version is out of date, it
is not part of the current chunk and is an object that can be
safely recycled.

Reviewed-on: http://gerrit.openafs.org/5734
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit 1dad690fc34fdd8d9df8a3be6d580441b7cae8bb)

Change-Id: I626562d2189182b434f8da0f4f0a6213c5b695fe
Reviewed-on: http://gerrit.openafs.org/6042
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: only flush buffers on shutdown if running
Jeffrey Altman [Thu, 27 Oct 2011 21:57:25 +0000 (17:57 -0400)]
Windows: only flush buffers on shutdown if running

If a service shutdown message is received prior to the
service entering the running state, do not attempt to
buf_CleanAndReset() because the required data structures
and locks are not initialized.

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

Change-Id: I2bda1c4a538c83595f2d60ad4661c7e6865c5fc3
Reviewed-on: http://gerrit.openafs.org/6041
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: Do not EEXIST exact match during rename
Jeffrey Altman [Tue, 25 Oct 2011 19:32:11 +0000 (15:32 -0400)]
Windows: Do not EEXIST exact match during rename

AFS Rename operations on the file server will delete a
target file if it exists.  Do not prevent renames because
an exact match of the target name exists in the target
directory.

Reviewed-on: http://gerrit.openafs.org/5731
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit 9cf7a628c2ff178b2fa236d2c0a41ca9be315036)

Change-Id: I02c32fab18053e1a37811089812f402d351a6666
Reviewed-on: http://gerrit.openafs.org/6040
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: validate buffer hash tables in cm_MergeStatus
Jeffrey Altman [Wed, 14 Sep 2011 21:46:32 +0000 (17:46 -0400)]
Windows: validate buffer hash tables in cm_MergeStatus

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

Change-Id: Ia685aebdc443113b4ddb968155f306cc53680af9
Reviewed-on: http://gerrit.openafs.org/6039
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: record history of read lock threads
Jeffrey Altman [Sun, 21 Aug 2011 04:38:24 +0000 (00:38 -0400)]
Windows: record history of read lock threads

Maintance an array of up to 32 reader threads that have
acquired a rwlock.  Use it for debugging when things go bad.

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

Change-Id: Icab5ffc36e4c6245b7d0699596eca66a66bc9538
Reviewed-on: http://gerrit.openafs.org/6038
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: ignore SYNCHRONIZE privilege in cm_CheckNTOpen
Jeffrey Altman [Fri, 9 Sep 2011 16:47:52 +0000 (12:47 -0400)]
Windows: ignore SYNCHRONIZE privilege in cm_CheckNTOpen

SYNCHRONIZE has not meaning for AFS so just ignore it.  Do not
deny an open request because it is set.

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

Change-Id: Ice8758dcbd0b355c9fdfb5af293b6d670ec8c1e4
Reviewed-on: http://gerrit.openafs.org/6037
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: permit offline volume check to be disabled
Jeffrey Altman [Sun, 4 Sep 2011 18:58:23 +0000 (14:58 -0400)]
Windows: permit offline volume check to be disabled

Setting the registry value to 0 can now be used as a
method of disabling the offline volume check.

Reviewed-on: http://gerrit.openafs.org/5370
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 19a5b5e67c65f0a9109b0fb5410b5ba74ad85b41)

Change-Id: I50dfa3c5387ba8a1cbdd3ca80f9e8dc03e92c404
Reviewed-on: http://gerrit.openafs.org/6036
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: add clean rule to src/afs/NTMakefile
Jeffrey Altman [Tue, 6 Sep 2011 15:57:18 +0000 (11:57 -0400)]
Windows: add clean rule to src/afs/NTMakefile

Reviewed-on: http://gerrit.openafs.org/5368
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 4ec6fd003084b02c299466bcaeac3850be10f79c)

Change-Id: I0cadd04598e78f9b8a5c0774e0636af153a5030c
Reviewed-on: http://gerrit.openafs.org/6035
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: correct comments in cm_BkgStore
Jeffrey Altman [Wed, 7 Sep 2011 17:33:36 +0000 (13:33 -0400)]
Windows: correct comments in cm_BkgStore

Reviewed-on: http://gerrit.openafs.org/5369
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit b6e5493437b942d5550247761dac3311c6d73a86)

Change-Id: I73c2fcab9ccff73e4419d3edf3ffc7395230e6e5
Reviewed-on: http://gerrit.openafs.org/6034
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: remove CM_BUF_CMBKGFETCH flag
Jeffrey Altman [Mon, 14 Dec 2009 18:33:02 +0000 (13:33 -0500)]
Windows: remove CM_BUF_CMBKGFETCH flag

The processing of the CM_BUF_CMBKGFETCH flag adds more
overhead than it prevents.  Get rid of it.

LICENSE MIT

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

Change-Id: I423aa105bad99c70942d6b967a1dde70216fb096
Reviewed-on: http://gerrit.openafs.org/6033
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: use lock conversion in cm_EndDirOp
Jeffrey Altman [Mon, 5 Sep 2011 14:11:09 +0000 (10:11 -0400)]
Windows: use lock conversion in cm_EndDirOp

Instead of dropping the lock for read and reacquiring for write
use lock_ConvertRToW() which will make the change atomicly if
it is possible or place the thread into the wait list if not.

LICENSE MIT

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

Change-Id: Id92298fa848becb4131139579fd31b0c5f98a4ad
Reviewed-on: http://gerrit.openafs.org/6032
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: cm_SymLink export created cm_scache_t
Jeffrey Altman [Fri, 2 Sep 2011 17:54:01 +0000 (13:54 -0400)]
Windows: cm_SymLink export created cm_scache_t

Permit the caller to request the cm_scache_t that represents
the created symlink or mount point object.

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

Change-Id: I170059255e3bbc7e3ccbd59b66d7d8b11005a94f
Reviewed-on: http://gerrit.openafs.org/6031
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: correct cm_buf use of Head/Tail queues
Jeffrey Altman [Sun, 4 Sep 2011 01:07:13 +0000 (21:07 -0400)]
Windows: correct cm_buf use of Head/Tail queues

The buffer free list least recently used queue has both
head and tail points.  Use the proper versions of the queue
mgmt functions and do not handle edge cases as special cases.

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

Change-Id: I0d5afaf59895f34ced739f4626a351fe41186008
Reviewed-on: http://gerrit.openafs.org/6030
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: remove dead code from cm_scache.c
Jeffrey Altman [Sun, 4 Sep 2011 00:22:19 +0000 (20:22 -0400)]
Windows: remove dead code from cm_scache.c

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

Change-Id: Ifd8cf9ec7b517da80b22853e0f90034586560e0d
Reviewed-on: http://gerrit.openafs.org/6029
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: add logging to smb_IoctlRead
Jeffrey Altman [Sun, 4 Sep 2011 00:06:21 +0000 (20:06 -0400)]
Windows: add logging to smb_IoctlRead

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

Change-Id: I1f72db5148d2f596f4b0b58cb6788a244fd4fa44
Reviewed-on: http://gerrit.openafs.org/6028
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: remove potential data loss warning with cast
Jeffrey Altman [Sun, 4 Sep 2011 00:03:28 +0000 (20:03 -0400)]
Windows: remove potential data loss warning with cast

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

Change-Id: I02a87c4980c6ebe6ef671f90e2c6000ab2eeb60e
Reviewed-on: http://gerrit.openafs.org/6027
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agowindows: pass cm_req_t through background ops
Jeffrey Altman [Sat, 3 Sep 2011 23:14:11 +0000 (19:14 -0400)]
windows: pass cm_req_t through background ops

add cm_req_t object to background daemon operations in order to
permit request source to be propagated to the background daemon.

pass a cm_req_t into buf_SetDirty().

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

Change-Id: I2fbc78cf765c534fc6fc673695634fcf946dca0b
Reviewed-on: http://gerrit.openafs.org/6026
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: correct log message in buf_Sync()
Jeffrey Altman [Sat, 3 Sep 2011 23:03:05 +0000 (19:03 -0400)]
Windows: correct log message in buf_Sync()

Reviewed-on: http://gerrit.openafs.org/5347
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 20772897654b58da6f7d4cd0bd2caf169abddd50)

Change-Id: I676a919701c4edfbc130a04c94f4092676a1d53c
Reviewed-on: http://gerrit.openafs.org/6025
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: buf_SetDirty do nothing if length is zero
Jeffrey Altman [Thu, 1 Sep 2011 13:51:06 +0000 (09:51 -0400)]
Windows: buf_SetDirty do nothing if length is zero

Reviewed-on: http://gerrit.openafs.org/5358
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 7dcc4766377b99c60db60328c21a3990db132268)

Change-Id: I30dc0f218df56e6e38fe6ce3736a5450b7036e51
Reviewed-on: http://gerrit.openafs.org/6024
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: remove MULTIHOMED ifdef
Jeffrey Altman [Sat, 3 Sep 2011 03:51:59 +0000 (23:51 -0400)]
Windows: remove MULTIHOMED ifdef

All builds include the MULTIHOMED functionality.
Get rid of the #ifdef MULTIHOMED.

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

Change-Id: Ia11e4bfdc83737720e5274bad3d01232f0f2dbbe
Reviewed-on: http://gerrit.openafs.org/6023
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: missing ! in update volume location
Jeffrey Altman [Fri, 2 Sep 2011 22:36:13 +0000 (18:36 -0400)]
Windows: missing ! in update volume location

The check to see if the volume name is numeric or not was
missing a ! in order to perform the correct test.  Add it.

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

Change-Id: I9760845b597c1653a78ab3e496166e5df03b7575
Reviewed-on: http://gerrit.openafs.org/6022
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: improve handling of volume rename
Jeffrey Altman [Fri, 2 Sep 2011 22:32:40 +0000 (18:32 -0400)]
Windows: improve handling of volume rename

The windows cache manager tracks volumes by volume group.
Up to this point all volume location updates have been performed
by the volume name.  What if the volume name was altered?  In this
case the volume location information for the in use volume ids will
fail until a mount point to the new name is queried.  Before
marking the volume group as non-existent attempt to perform a
lookup using either the volume id for the readwrite or readonly
volume.

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

Change-Id: I33771780a4ace4aa5b4613bef4590d5efaf15922
Reviewed-on: http://gerrit.openafs.org/6021
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: refactor volume location updates
Jeffrey Altman [Fri, 2 Sep 2011 22:28:31 +0000 (18:28 -0400)]
Windows: refactor volume location updates

Break out the VL_GetEntryByName RPC calls into support
functions so we can reduce the amount of duplicated code.

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

Change-Id: I7fc8b9ac2902c0909b39c446468307fba30b2a51
Reviewed-on: http://gerrit.openafs.org/6020
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agoWindows: netidmgr krb5_cc_get_principal can fail
Jeffrey Altman [Mon, 14 Nov 2011 15:23:53 +0000 (10:23 -0500)]
Windows: netidmgr krb5_cc_get_principal can fail

Do not dereference a NULL pointer if krb5_cc_get_principal fails.

On master this bug is fixed by e55d1774b1b5b27a3617467b5e2a24ee2be3a38c
but that change is after the conversion to the Kerberos Compatibility
SDK and cannot be applied to openafs-stable-1_6_x.

Change-Id: I646011dd3171fd1aa6f40f349329f8261546b809
Reviewed-on: http://gerrit.openafs.org/6019
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
14 years agovolser: Remove debugging log messages
Andrew Deason [Fri, 4 Nov 2011 22:19:28 +0000 (17:19 -0500)]
volser: Remove debugging log messages

While the -log option to volserver is supposed to print additional log
information, it shouldn't spam the log with useless data. Remove some
of the log lines that are really more "debug" information, so we log
the same amount of information as in the 1.4 series.

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

Change-Id: I1af47fa1910a98a6175f1f000d0432af1e1126e8
Reviewed-on: http://gerrit.openafs.org/5831
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agorx: Don't clear the receive queue when out of packets
Simon Wilkinson [Wed, 12 Oct 2011 13:47:14 +0000 (09:47 -0400)]
rx: Don't clear the receive queue when out of packets

We can end up discarding a receive queue that's been soft acked,
effectively taking back soft acks we sent. Whilst the RX
documentation says that a client can drop soft acked packets at
will, our RX implementation assumes that if the final packet in
a call has been soft acked, we won't clear the queue. If a client
clears the queue in this situation, the call will hang.

What *should* happen is that we should take necessary locks,
confirm that we have not soft-acked all of the packets in a flow,
and then discard, or, if we're just going to discard, error the
call.

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

Change-Id: Ie2f14a0ed7b6d258a7f456387df44ac95fd1748c
Reviewed-on: http://gerrit.openafs.org/5820
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoafs: Only use actual connections for GetTime calls
Andrew Deason [Wed, 2 Nov 2011 15:28:35 +0000 (10:28 -0500)]
afs: Only use actual connections for GetTime calls

The for() loop that makes an RXAFS_GetTime call in afs_CheckServers
was iterating over conns and rxconns from 0 to j. However, 'j' here is
just the size of the allocated array, whereas 'nconns' is the number
of structures in the array actually initialized. So, just go up to
nconns to avoid using unitialized connections and Rx connections.

This is a 1.6-only change. On master, the -settime code has been
completely removed in change
Id291f5f88b1ad84594706f2a1a02a933dddd0cb9.

Issue reported by Sebastian Hanigk.

Change-Id: Iec782a4464899b5a7e49e193b04f79e31c6b37f2
Reviewed-on: http://gerrit.openafs.org/5788
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agomake bozo honor -rxbind correctly
Adam Megacz [Fri, 23 Mar 2007 19:14:41 +0000 (12:14 -0700)]
make bozo honor -rxbind correctly

Bozo needs to call rxInitHost() rather than rxInit() when -rxbind is
present. This patch causes it to read NetInfo/NetRestrict earlier in
the startup process so it can make that decision.

FIXES 57286

Reviewed-on: http://gerrit.openafs.org/4729
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 6260c4ae51e7a2807596ddf1bd49620f98eed94c)

Change-Id: If873686f7a7742f82fd5fadf43c6f44379448c29
Reviewed-on: http://gerrit.openafs.org/5771
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoSuppress cmp component version error messages
Andrew Deason [Wed, 13 Apr 2011 17:39:19 +0000 (12:39 -0500)]
Suppress cmp component version error messages

When we use cmp to determine whether to replace
AFS_component_version_number.c, suppress stderr in addition to stdout,
to slightly reduce output during the build.

Reviewed-on: http://gerrit.openafs.org/4471
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 21578144e08d46eeec9a2944e92e8d0d7a6dba57)

Change-Id: Ie06f293e3750abb7514ee3795c1af41a26f46642
Reviewed-on: http://gerrit.openafs.org/5770
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoviced: Check vnode length on dir ops
Andrew Deason [Tue, 15 Mar 2011 19:24:01 +0000 (14:24 -0500)]
viced: Check vnode length on dir ops

The commit aadf69eabb1962496fa93745ab560a5b48cacd61 added checks on
vnode length whenever we read or write from a vnode. Add the same
check on directory vnodes when we modify the directory (whenever
entries are added or deleted).

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

Change-Id: I105f0dc7b480f7328205ae02929f6ca187aa962a
Reviewed-on: http://gerrit.openafs.org/5769
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoviced: Check vnode length on read and write
Andrew Deason [Thu, 3 Mar 2011 22:02:47 +0000 (16:02 -0600)]
viced: Check vnode length on read and write

When reading or writing a file vnode, check that the length of the
vnode in the vnode index matches the size of the on-disk file
containing the data for the file. If it does not match, take the
volume offline (and for DAFS, demand-salvage it).

Reviewed-on: http://gerrit.openafs.org/4121
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit aadf69eabb1962496fa93745ab560a5b48cacd61)

Change-Id: I324dc79a24fc8c199825ffefcc1dd2b0097942a1
Reviewed-on: http://gerrit.openafs.org/5768
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoDAFS: DFlushVolume outside of vol glock
Andrew Deason [Wed, 16 Mar 2011 16:48:08 +0000 (11:48 -0500)]
DAFS: DFlushVolume outside of vol glock

DFlushVolume may traverse a long list of directory objects, and can
even hit the disk, so we should drop the glock for it. This should be
safe in DAFS, since we already transition the volume to an exclusive
state before doing this, and DFlushVolume only deals with structures
internal to the directory package and maintains its own locking.

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

Change-Id: I355c53c6f224c5471da70827f30511986abeac27
Reviewed-on: http://gerrit.openafs.org/5767
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoafs: Retry unlock after afs_StoreAllSegments
Andrew Deason [Fri, 1 Apr 2011 18:43:13 +0000 (13:43 -0500)]
afs: Retry unlock after afs_StoreAllSegments

HandleFlock calls afs_StoreAllSegments when unlocking an exclusive
flock lock. This can drop the write lock on avc, so we must
effectively retry the entire lock operation again, since the world may
have changed while we were waiting to reacquire the lock on avc. So,
retry once all of the lock checks up to that point, to ensure that a
lock on the file actually still exists.

FIXES 125446

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

Change-Id: Ibd215d586485d8f18f77665f5f85e6bee579e35e
Reviewed-on: http://gerrit.openafs.org/5766
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoafs: Avoid memory leak on recursive write flock
Andrew Deason [Fri, 1 Apr 2011 21:43:24 +0000 (16:43 -0500)]
afs: Avoid memory leak on recursive write flock

When a process requests an exclusive lock on a file on which it
already holds an exclusive lock, we basically form a no-op. However,
HandleFlock was allocating a new SimpleLocks and attaching it to
avc->slocks, without freeing the old SimpleLocks structure.

Since we don't need to do anything if we already hold an exclusive
lock, just break out of the loop right away when we detect that
scenario. Thus we avoid adding a new structure to avc->slocks, and we
avoid a memory leak.

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

Change-Id: I9e45a51e02774c555c6d5cb5ba9d0407b8442215
Reviewed-on: http://gerrit.openafs.org/5765
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agovol: avoid MAXINT redefinition warning in vnode.c
Jeffrey Altman [Tue, 8 Mar 2011 16:04:07 +0000 (11:04 -0500)]
vol: avoid MAXINT redefinition warning in vnode.c

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

Change-Id: I8ea833cca442c67468982da31ed1b6fe04508a34
Reviewed-on: http://gerrit.openafs.org/5764
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoDAFS: Correct FSYNC_VOL_QUERY_VOP checks
Andrew Deason [Thu, 24 Mar 2011 15:22:52 +0000 (10:22 -0500)]
DAFS: Correct FSYNC_VOL_QUERY_VOP checks

Check that the given partition matches the vp partition, and ensure
the vp is not in an exclusive state when we check the state.
Otherwise, we may return pending vol ops for a volume on a different
partition, or we may incorrectly return that there is no pending vol
op when in fact the volume does not exist at all.

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

Change-Id: I912c1d0b34fbbaae9ce4bd8edf6e3dd7f718be00
Reviewed-on: http://gerrit.openafs.org/5763
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agosalvager: Give back volumes when exiting early
Andrew Deason [Wed, 23 Mar 2011 22:25:03 +0000 (17:25 -0500)]
salvager: Give back volumes when exiting early

Sometimes the salvager exits a bit earlier than normal. For instance,
when no applicable inodes are found for a volume group, or if the
-inodes command line option was given. In these cases, we have already
checked out singleVolumeNumber from the fileserver (if we're salvaging
a single VG), so we need to give it back. So, give it back in those
instances.

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

Change-Id: Ib40ffb84fa6c40cfd692c561b913decb97268403
Reviewed-on: http://gerrit.openafs.org/5762
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoDAFS: Do not record vol ops for DELETED vols
Andrew Deason [Wed, 23 Mar 2011 21:46:47 +0000 (16:46 -0500)]
DAFS: Do not record vol ops for DELETED vols

When a volume is VOL_STATE_DELETED, it effectively does not exist, so
there is little point in recording a vp->pending_vol_op structure for
it. Just let callers checkout the volume as they would a nonexistent
volume: without recording anything about the operation.

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

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

Change-Id: Ica0c53e62ed885710210c7e1344e12b382302572
Reviewed-on: http://gerrit.openafs.org/5761
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agosalvager: Do not AskOnline nonexistent volumes
Andrew Deason [Wed, 23 Mar 2011 21:12:20 +0000 (16:12 -0500)]
salvager: Do not AskOnline nonexistent volumes

If singleVolumeNumber is not in our volume summary list, then the
singleVolumeNumber volume does not exist. So, don't try to bring it
back online. Still do try to make sure we don't have the volume
checked out, though, so issue an AskDelete, so ensure that it's not
checked out and that the fileserver does not think it exists.

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

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

Change-Id: I708c173ae6cbd3f40cc09f6fc3229a6f038baf3f
Reviewed-on: http://gerrit.openafs.org/5760
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoFix ihandle.c indents
Andrew Deason [Tue, 22 Mar 2011 21:18:17 +0000 (16:18 -0500)]
Fix ihandle.c indents

ihandle.c had some blocks that were not indented. Indent them.

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

Change-Id: I83604d19759a183fa10989596734a405515ac19c
Reviewed-on: http://gerrit.openafs.org/5759
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agovol: Handle large volume IDs in VLockFile
Andrew Deason [Thu, 10 Mar 2011 23:59:39 +0000 (17:59 -0600)]
vol: Handle large volume IDs in VLockFile

VLockVolumeByIdNB currently cannot handle volume IDs larger than
2^31-1. Fix this by using struct flock64, F_SETLKW64, and F_SETLK64 in
the VLockFile functions where possible.

Thanks to Simon Wilkinson for pointing out F_SETLK64.

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

Change-Id: Iee09a8bc4a0aabbd12fe156940fa61d6947642e8
Reviewed-on: http://gerrit.openafs.org/5758
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agovol-salvage: Fix AskOnline error message
Andrew Deason [Wed, 2 Mar 2011 20:13:25 +0000 (14:13 -0600)]
vol-salvage: Fix AskOnline error message

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

Change-Id: I7cf852d563b72c40b183b728143b59e8e4b8da7b
Reviewed-on: http://gerrit.openafs.org/5757
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoGive a default reason in *sync-debug
Andrew Deason [Wed, 2 Mar 2011 19:12:25 +0000 (13:12 -0600)]
Give a default reason in *sync-debug

If no -reason is given for fssync-debug calls, we currently just
transmit garbage to the fileserver or salvageserver. Instead, give a
default (the *_WHATEVER constant), so we do something consistent.

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

Change-Id: I27aefea0e891444e006e5d4b5ed43ed9cd492242
Reviewed-on: http://gerrit.openafs.org/5756
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoConvertROtoRW: Use old copyDate for creationDate
Andrew Deason [Thu, 3 Feb 2011 21:40:48 +0000 (15:40 -0600)]
ConvertROtoRW: Use old copyDate for creationDate

When we convert an RO volume to an RW, currently we just copy the
copyDate and creationDate from the RO metadata into the RW. But the
copyDate and creationDate fields have different meanings for RW and RO
volumes: for ROs, the creationDate is merely the last time the data
was updated from the RW during a release operation.

So, if the copyDate is older than the creationDate, use the copyDate
as the new RW creationDate instead. This will probably not match the
creationDate of the original RW, but it will be closer to it, and it
will more accurately represent the conceptual "created time" of the
new RW.

Doing this can avoid forcing an unnecessary full dump on a subsequent
release of the resultant RW volume, since the creationDate is more
accurate.

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

Change-Id: I54516a20ebb87d9c482cbc4840e0d236e7c54f8a
Reviewed-on: http://gerrit.openafs.org/5755
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agolibafs: Set tvcp->callback before BulkStatus
Andrew Deason [Thu, 12 Aug 2010 19:38:55 +0000 (14:38 -0500)]
libafs: Set tvcp->callback before BulkStatus

When we call InlineBulkStatus or BulkStatus, we currently do not touch
tvcp->callback for any of the vcaches before making the call. This can
cause us to not notice an InitCallBackState issued by the fileserver
before the BulkStatus call returns, since the InitCallBackState
handler looks at tvcp->callback to determine what vcaches to clear
callbacks for. In turn, this can cause us to think we have a callback
agreement with the fileserver on one of the BulkStatus'd files, when
the fileserver does not actually have such a callback agreement.

So, set tvcp->callback to the server we are contacting, so if we get
an InitCallBackState call from that fileserver, the CBulkFetching
state will be cleared, and we will correctly discard the callback
information for that vcache.

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

Change-Id: I85c89eff061af799a7d8f612bee9b2f182312e6f
Reviewed-on: http://gerrit.openafs.org/5754
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoubik: Log a message when we replay the trans log
Andrew Deason [Wed, 24 Nov 2010 15:03:19 +0000 (10:03 -0500)]
ubik: Log a message when we replay the trans log

It can be helpful to know that an interrupted transaction was replayed
on startup, and this should be rare. So log a message when that
happens, indicating what db version we replayed to.

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

Change-Id: Ic3c8ec68febae8b61b6d04ef4d063178dffe8d0e
Reviewed-on: http://gerrit.openafs.org/5753
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoubik: Replay the transaction log label correctly
Andrew Deason [Wed, 24 Nov 2010 14:36:05 +0000 (09:36 -0500)]
ubik: Replay the transaction log label correctly

Commit eec0d94f519b3e27f255b9b7a637df043951424e fixed the transaction
replay log code to correctly identify valid transaction logs on
little-endian systems, but missed ntohl'ing the database label read in
a LOGEND opcode. Fix that, so the database is labelled correctly when
replayed from a transaction log.

And while we're here, actually pass a struct ubik_version* to
adbase->setlabel, to make it a little more clear what's happening.

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

Change-Id: I832eff8641c339a103170f50238bbb669412bda0
Reviewed-on: http://gerrit.openafs.org/5752
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoubik: Record the last write tid in writeTidCounter
Andrew Deason [Wed, 1 Sep 2010 20:10:56 +0000 (15:10 -0500)]
ubik: Record the last write tid in writeTidCounter

ubik is currently tracking writeTidCounter for write transactions
separately from regular transactions (assigned from tidCounter).
Specifically, tidCounter is incremented twice for each transaction,
but writeTidCounter is incremented twice only for write transactions.
As a result, writeTidCounter and tidCounter tend to drift far apart.

This is a problem, since the tid for DISK_* calls uses the transaction
id of the current transaction (based on tidCounter), and VOTE_Beacon
uses writeTidCounter for its transaction id. So, in effect, the tid in
VOTE_Beacon is completely bogus and unrelated to the transaction id of
the actual current write transaction. This can cause valid write
transactions to become invalidated when tidCounter becomes negative,
since VOTE_Beacon will send a positive tid, and if there is a current
in-flight write transaction with a negative tid, SVOTE_Beacon will
deem the transactions inequal and will abort the write transaction.

So instead, record the transaction id counter for the last write
transaction in writeTidCounter. This way, when we call VOTE_Beacon, we
will use the correct transaction id counter for the current write
transaction, and SVOTE_Beacon on the remote site will not invalidate
the transaction.

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

Change-Id: Iabff9bd68db088c30c7e44ad71b7d34bcfaaf207
Reviewed-on: http://gerrit.openafs.org/5751
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoDAFS: raise vhashsize limit
Andrew Deason [Wed, 8 Sep 2010 19:32:35 +0000 (14:32 -0500)]
DAFS: raise vhashsize limit

Raise the maximum specifiable vhashsize to 28 (from 14). Specifying a
vhashsize over 14 can be reasonable if you expect to have a few
million volumes on a fileserver.

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

Change-Id: I2e2d7ca4986af417c3298c3cfff8f087d795bc53
Reviewed-on: http://gerrit.openafs.org/5750
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoDAFS: Do not ignore out-of-range -vhashsize
Andrew Deason [Thu, 2 Sep 2010 17:56:28 +0000 (12:56 -0500)]
DAFS: Do not ignore out-of-range -vhashsize

If the specified -vhashsize is out of the 6-14 range, do not just
ignore it. Instead, note the error and quit.

Reviewed-on: http://gerrit.openafs.org/2649
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 575bdaf56e8f5503513bec113653fbbe525ae228)

Change-Id: Ie0ebfcf1b5c88816ef58eab109fb05de4c7fad1e
Reviewed-on: http://gerrit.openafs.org/5749
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoTidy up uio_t meaning
Simon Wilkinson [Sun, 17 Apr 2011 20:30:39 +0000 (21:30 +0100)]
Tidy up uio_t meaning

On IRIX, uio_t is typedef'd to "struct uio".
On Darwin, uio_t is typedef'd to "struct uio *".

Reduce the confusion by just not using "uio_t" in places where it
isn't being defined for us, and avoiding it completely in cross-platform
code.

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

Change-Id: Id37d11e72d196f5008e9843d4f04c492a4017e72
Reviewed-on: http://gerrit.openafs.org/5779
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoSOLARIS: Perform daemon syscalls as kernel threads
Andrew Deason [Tue, 8 Mar 2011 22:59:32 +0000 (16:59 -0600)]
SOLARIS: Perform daemon syscalls as kernel threads

Add AFS_SUN5_ENV to the list of platforms where AFS_DAEMONOP_ENV is
defined. Implement the necessary functionality so we spawn kernel
threads when a daemon syscall is called. Remove the rxk_Listener
wrapper, since it will be called in a separate thread via the
afs_DaemonOp interface.

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

Change-Id: I6b3eb829dec3ec4338dbe8f2363ced2bdcd7dc9a
Reviewed-on: http://gerrit.openafs.org/5778
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agolibafs: Consolidate afs_DaemonOp code
Andrew Deason [Tue, 8 Mar 2011 21:37:17 +0000 (15:37 -0600)]
libafs: Consolidate afs_DaemonOp code

Create the AFS_DAEMONOP_ENV define to simplify the logic of when we
perform afs_DaemonOp-y code paths. Also create the daemonOp_common
function, to perform common pre-fork operations that are common
between platforms.

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

Change-Id: I8878b5b55871c1974b19c2af64636ea536841bff
Reviewed-on: http://gerrit.openafs.org/5777
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agolibafs: Indent afs_call.c ifdef maze
Andrew Deason [Tue, 8 Mar 2011 20:59:44 +0000 (14:59 -0600)]
libafs: Indent afs_call.c ifdef maze

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

Change-Id: I3ef7aeb5e111f9365a10d86a440ad31c4fe76902
Reviewed-on: http://gerrit.openafs.org/5776
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoFBSD: deal with kernel API rename
Ben Kaduk [Sat, 8 Oct 2011 21:16:26 +0000 (17:16 -0400)]
FBSD: deal with kernel API rename

Upstream decided to rename the kernel functions that implement
syscalls to have a sys_prefix (including afs3_syscall!).
We use a couple of them, so we need to conditionalize accordingly.
Unfortunately, __FreeBSD_version was not bumped with the change,
so we use something close to it and hope it's close enough.

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

Change-Id: I01d943398a3c15009f72f668720bfe6bc8eac63d
Reviewed-on: http://gerrit.openafs.org/5639
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoukernel: get an ip address even when dns and hosts suck
Derrick Brashear [Tue, 11 Oct 2011 19:37:57 +0000 (15:37 -0400)]
ukernel: get an ip address even when dns and hosts suck

gethostname plus gethostbyname being useless make things fun

make things less fun

(cherry picked from commit 6f59c71988d75f76750c46adb11cda7e9189d5f3)

Change-Id: Id7d9181b2d87f7a87a08991b96da664f4297604b
Reviewed-on: http://gerrit.openafs.org/5726
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoallow cloning of any volume to any volume with same parent ID
Jacob Thebault-Spieker [Tue, 19 Jul 2011 22:01:26 +0000 (15:01 -0700)]
allow cloning of any volume to any volume with same parent ID

remove checks to disallow cloning of ro volumes to rw volumes,
which allows cloning of any volume within the same parent ID
grouping, including allowing destruction of newer version of the
volumes.

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

Change-Id: Idc2575538811d278fb65be46cfc0cd4d24d90f5d
Reviewed-on: http://gerrit.openafs.org/5725
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoremove check for disallowing clones of backup or ro volumes
Jacob Thebault-Spieker [Tue, 19 Jul 2011 16:02:49 +0000 (09:02 -0700)]
remove check for disallowing clones of backup or ro volumes

removes the if-statement ensuring that the volume being cloned is
not a backup volume, nor a read-only volume. This allows clones
from any type of volume to a given volume. Parent volume meta-data
is maintained, only the cloneId value changes.

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

Change-Id: Ibda6a8a12804fc35890c99ada6d711e25a50a6c8
Reviewed-on: http://gerrit.openafs.org/5724
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agobozo: test program update
Michael Meffie [Thu, 6 Oct 2011 11:55:21 +0000 (07:55 -0400)]
bozo: test program update

Add -file option to test program to simulate program crashes.

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

Change-Id: I0cf394c881da7c01f75a7926700f896a905e8172
Reviewed-on: http://gerrit.openafs.org/5723
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoDAFS: Remove VOL_SALVAGE_INVALIDATE_HEADER
Andrew Deason [Mon, 29 Aug 2011 22:41:31 +0000 (17:41 -0500)]
DAFS: Remove VOL_SALVAGE_INVALIDATE_HEADER

Currently VRequestSalvage_r takes a flag,
VOL_SALVAGE_INVALIDATE_HEADER, which causes the header for the
specified volume to be freed (via FreeVolumeHeader). This is almost
never safe to do, since there may be other users of the specified
volume that can be accessing the volume header at the same time.

There is also no reason to invalidate the header at the time of the
VRequestSalvage_r call, since the header must be invalidated when we
detach the volume (other utilities may change header information). So,
if there are any problems in the future because we do not invalidate
the header at the time of VRequestSalvage_r, it is the fault of the
detachment/offlining logic.

So, remove VOL_SALVAGE_INVALIDATE_HEADER and all of its users. Take
this opportunity to correctly document the VRequestSalvage_r headers
in the VRequestSalvage_r comment, as it was previously missing the
VOL_SALVAGE_NO_OFFLINE flag.

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

Change-Id: Ib991ecefea2115a3c4308ed3c261af7433c9b858
Reviewed-on: http://gerrit.openafs.org/5722
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoDAFS: fssync online requires a partition name argument
Michael Meffie [Thu, 13 Oct 2011 16:23:35 +0000 (12:23 -0400)]
DAFS: fssync online requires a partition name argument

fssync-debug online silently fails when run without a partition name.
Check for the required partition name on the server side and the client
side.  Report errors back to the client when the server side fails to
pre-attach the volume.

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

Change-Id: Id8776c71cd1712ecb779c76565cfb9e685e54a19
Reviewed-on: http://gerrit.openafs.org/5721
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agovolser: Remove ExtractVolId
Andrew Deason [Tue, 11 Oct 2011 15:51:14 +0000 (10:51 -0500)]
volser: Remove ExtractVolId

volser was using its own function to extract a volume ID from a
filename string, and was using atol to do so. The ato* family of
functions can have problems with larger volume IDs, not to mention a
lack of error checking, so don't use it. Since we already have the
function VolumeNumber in the vol package to do the very same thing,
just use that instead.

Reviewed-on: http://gerrit.openafs.org/5594
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 87f969f82d12c8200ede3fd30a151e09ab0bf6ad)

Change-Id: I4f047c4141493e151db0a6b5ec21bee3af35e040
Reviewed-on: http://gerrit.openafs.org/5720
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoviced: Check for HOSTDELETED in stillborn check
Andrew Deason [Mon, 3 Oct 2011 18:10:44 +0000 (13:10 -0500)]
viced: Check for HOSTDELETED in stillborn check

h_FindClient_r checks the connection rock for a client object twice.
First it sees if we already have a client object, and if we don't, we
effectively create one (or find a suitable one). Then we check again,
to see if someone else set the rock while we were creating a client
structure.

Currently, the first check checks if client->host->hostFlags has
HOSTDELETED set, but the second check does not. So, if the host
associated with the client has been deleted by someone else, currently
we will unnecessarily log a "stillborn client" message, and we will
continue to use the deleted host. If the host continues to be held by
someone, we will run into the same situation repeatedly on future
requests until all of the host references go away.

To fix this, also ignore HOSTDELETED clients when performing the
stillborn race check.

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

Change-Id: I3fb0b01c2ef14cd077cd4db9476ed6e90c7d3c2a
Reviewed-on: http://gerrit.openafs.org/5719
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agovos offline: Bring volume back online for -busy
Andrew Deason [Fri, 14 Oct 2011 16:32:34 +0000 (11:32 -0500)]
vos offline: Bring volume back online for -busy

vos offline is supposed to bring a volume back online from "busy"
status before exiting, as volumes should not be in "busy" status for
extended periods of time. This was being enforced by required that
-sleep be specified; however, -sleep only results in the volume being
brought back online if a non-zero sleep time was specified. So, make
sure the volume is brought back online if -busy was specified.

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

Change-Id: I64aa6f297b787ca666959ff4f35d17aced6e41a7
Reviewed-on: http://gerrit.openafs.org/5718
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agobypasscache: allow arbitrary sized iovecs
Derrick Brashear [Sun, 23 Oct 2011 23:15:16 +0000 (19:15 -0400)]
bypasscache: allow arbitrary sized iovecs

instead of binding outselves to PAGE_SIZE, just fill any size

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

Change-Id: I350f4e7e0936be50960c80d115a44afe750a48fa
Reviewed-on: http://gerrit.openafs.org/5717
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agobypasscache: do errors correctly
Derrick Brashear [Thu, 6 Oct 2011 08:04:36 +0000 (04:04 -0400)]
bypasscache: do errors correctly

do set errors when we bomb out early
do not unlock and return early when we happen to do a correct zero
length read
do set errors the kernel can deal with if we're feeding a page routine

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

Change-Id: I4f2e1b50a3c0856a08281e0ffbfaa7cbb71db2c4
Reviewed-on: http://gerrit.openafs.org/5716
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agorpm: Turn on debugging
Simon Wilkinson [Sun, 23 Oct 2011 23:07:33 +0000 (19:07 -0400)]
rpm: Turn on debugging

Now that we build with a blank CFLAGS line, we need to make sure and
actually turn on debugging in the build system, so that our debuginfo
files are vaguely useful

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

Change-Id: I9384b9632efb5e7a9054b49c6b6f2f4cfc9c9376
Reviewed-on: http://gerrit.openafs.org/5715
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agorx: ackall handling
Simon Wilkinson [Wed, 12 Oct 2011 13:50:18 +0000 (09:50 -0400)]
rx: ackall handling

If we ACKALL a stream, then we're sending a hard ACK for all of the
packets in the stream. We shouldn't send that hard ACK, and then a
load of soft ACKs for packets that don't actually exist.

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

Change-Id: Ibba1d5448f2ba9315b6b9bc3e893d16d8bcdbc3c
Reviewed-on: http://gerrit.openafs.org/5714
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>