7152 Commits

Author SHA1 Message Date
Simon Wilkinson
20d08fb0ec Linux: Don't roll our own llseek
llseek is a little more complex than just setting the pos field of
the file structure.

Where vfs_llseek is available to us (it has been since 2.6.8) use that
directly. If vfs_llseek isn't available, then use either the
filesystem's llseek method, or default_llseek (available since 2.6.0),
to ensure we get the proper locking.

Change-Id: I26bcbff984c7164be1724eee7a46cbe6e02bc510
Reviewed-on: http://gerrit.openafs.org/1816
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-25 21:04:13 -07:00
Derrick Brashear
5afa2965b2 cachemgr store file too big error exit via usual path
have just one path for exiting on errors so we do everything

this means we will EndCall, instead of not, in the EFBIG case

Change-Id: I2df025eee4bd5173ed4f80a73f9a9a347e7257d2
Reviewed-on: http://gerrit.openafs.org/1827
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-25 21:00:43 -07:00
Simon Wilkinson
fbbfb51e7d Move rxkad/domestic/* into rxkad/ directory proper
Historically, the fcrypt code lived in its own directory, named
'domestic', so that ACLs could be used to prevent nasty foreigners
from getting access to it. Now that those days are gone, having the
domestic directory just complicates builds. Remove it, and reunite
fcrypt with the rest of the tree.

Change-Id: I2d1f66463121bbb391260b613913d76c27931429
Reviewed-on: http://gerrit.openafs.org/1836
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-25 20:55:03 -07:00
Simon Wilkinson
37d2e8bfa8 Improve shared library building support
This change removes the need to maintain two forms of symbol export
lists, instead generating the simpler lists required by AIX and Mac OS X
from the more complex Linux and Solaris mapfile. It can only handle
simple mapfiles at present, any more complex files (for example, those
which contain versioning information) will require changes to the
translation script. The now unused .exp files are removed, and a
dependency on the .map file added to the library build line.

This change adds support for export lists to Darwin for the first time.
Doing so identified a number of symbols in libafsrpc that are required
by libafsauthent, which were not being exported. Export these symbols,
and bump the minor revision of the shared library.

Change-Id: Ibd1d02bb89b85500dc2a010e6cde1f4b81efe050
Reviewed-on: http://gerrit.openafs.org/1831
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-25 20:49:19 -07:00
Simon Wilkinson
0d7197f925 Linux: Remove prototype warning inhibition
The Linux kernel builds used to add -Wno-strict-prototypes to the
CFLAGS. Now that we've got prototypes for pretty much everything,
remove this line so we can see any real warnings that might occur.

Change-Id: I71b97bd3d19259f6ec6a55cfe095f5f4bf1ab78f
Reviewed-on: http://gerrit.openafs.org/1830
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-25 19:05:19 -07:00
Simon Wilkinson
36ea3e1ffe Fix make clean and make distclean
Fix these make targets so they actually clean the tree. Reorder the list
of file deletions in distclean so that it exactly mirrors the creation
order in configure.in, which should hopefully make it easier to keep
this all in sync in future. Add all of the missing files in packaging,
and the shared library build tools, to this list.

Make kauth and vol clean remove ka-forwarder and fssync-debug,
respectively.

Change-Id: Iae13419f1cb21058882c0b0e0c283e3c947e33c9
Reviewed-on: http://gerrit.openafs.org/1829
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-25 19:03:02 -07:00
Simon Wilkinson
1a0912ffc2 Really kill des_stub
Some bits of des_stub were lingering on. Get rid of it completely.

Change-Id: I853135621a757c78cdb50117500f056ade0e6ab5
Reviewed-on: http://gerrit.openafs.org/1835
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-25 19:02:35 -07:00
Simon Wilkinson
d77c69504b Fix objdir builds
Change f2db78a346112f5320efc6f0b6b9fe4ae0d893d3 included hard
references to compilation sources with no srcdir prefix, and so
broke objdir builds. Fix this so that we can build outside the
source tree again.

Change-Id: Iaae2d4a1047cc2ac0f5f4aae92cadc1f2a0d09e2
Reviewed-on: http://gerrit.openafs.org/1826
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-24 10:20:14 -07:00
Derrick Brashear
bf53b0882b macos growl agent warning parser fix
warnings start at offset 5, not 6 (warn is shorter than fetch or store)

Change-Id: Ibaa1239b0f9797da149cb05b3f871611b13833c8
Reviewed-on: http://gerrit.openafs.org/1825
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-23 11:52:59 -07:00
Derrick Brashear
8b0164cd9e openafs 1.5.74.1
so it can be tagged and non-unversioned builds of the mac client changes can
be seeded for testing

Change-Id: Ibaa231d356bf667b13e271c9868c6ce0182bd2a6
Reviewed-on: http://gerrit.openafs.org/1814
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
openafs-devel-1_5_74_1
2010-04-23 09:00:42 -07:00
Derrick Brashear
f5086e3892 macos launchd be more patient
right now we would wait 20 seconds for shutdown (the default),
get impatient and be useless.

be less useless.

Change-Id: I8c6bc9b7546352cfa73d461b7cdddd2b5b5d7889
Reviewed-on: http://gerrit.openafs.org/1813
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-23 08:54:06 -07:00
Simon Wilkinson
d4e66ef219 Unix: Modify disk cache versioning
This change increments the disk cache version number, and adds a
structure size record to the disk cache header. All old disk caches
will be replaced when the client is started.

With the various changes made to unify our file handles, and to
support large file handles on Linux, the size of the 'fcache'
structure was modified earlier in the 1.5 series. However, fcache
is also the building block of the CacheItems file, so these changes
inadvertently broke users upgrading from 1.4. In addition, as the
disk cache inode is now a union of many different structures, the
structure size is now potentially volatile across both kernel, and
OpenAFS revisions.

Up the version number so old disk caches are invalidated and won't
crash users who are upgrading. Also take the opportunity to add an
item to the header which stores the size of struct fcache used
by the disk cache. If the size on disk doesn't match that expected
by the kernel module, truncate the cache and start again.

Change-Id: I2ee8863d0bfaaaba34272c9e139638e17669a53e
Reviewed-on: http://gerrit.openafs.org/1811
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-23 05:50:18 -07:00
Marc Dionne
cfc9b34856 Warning fix: cast to expected type
Cast argument to match the expected type from the format string.

Change-Id: Iddec912ff8a27f46d872fc3101677913adfb537a
Reviewed-on: http://gerrit.openafs.org/1812
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-23 05:48:53 -07:00
Andrew Deason
30f2dded73 Update nextVnodeUnique before checking inUse
When attaching a volume, update the nextVnodeUnique field for the
volume, before we do any checks on the volume; for example, checking
inUse, which may result in a demand-salvage if we are running DAFS.

If we do not do this, we can schedule a demand-salvage without setting
nextVnodeUnique, and VUpdateVolume_r will update the volume header
uniquifier to nextVnodeUnique+200, when nextVnodeUnique is not set.
So, we will always set the uniquifier to 200. Fortunately, the salvage
should usually fix the uniquifer anyway.

So, set nextVnodeUnique before doing any of those checks, to avoid
screwing up the uniquifier when taking the volume offline.

Change-Id: Ib211bbf5e93efbebcb679259944e7abf211aa6e1
Reviewed-on: http://gerrit.openafs.org/1809
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-04-22 12:30:10 -07:00
Andrew Deason
3a0e2a7253 Prefer EndCall errors in StoreMini
Partially revert b1eb6a7a3f80500f0187cc6a1dd2013e1a5e154a, so we do
not mask the rx_EndCall error with a EndRXAFS_StoreData error (for
example, if EndRXAFS_StoreData returns RXGEN_CC_UNMARSHAL, and
rx_EndCall returns VBUSY). We need to agree on how to do this
throughout the tree, but for now, just fix StoreMini.

Change-Id: I4913946089fd0857506d9186f85c5c8115a5b95d
Reviewed-on: http://gerrit.openafs.org/1808
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-04-22 11:53:07 -07:00
Simon Wilkinson
77468e3a08 Linux: Tidy up packaging
Remove the fuzz setting - we're no longer patching the build, so
we don't need it.

Change-Id: Ic56b4d9efed40aedb425d9852018907736ef957f
Reviewed-on: http://gerrit.openafs.org/1807
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-22 11:15:59 -07:00
Simon Wilkinson
0d0e7699c9 Linux: RedHat packaging updates for RHEL6
Update our bundled spec file and related tools so they can be used
to build OpenAFS on the RHEL6 beta.

- Make kmodtool recognise el6 as having "modern" kernel naming
  conventions
- Replace %{PACKAGE_VERSION} (which seems to have disappeared)
  with the standard %{version} macro

Thanks to billings and phalenor on IRC for their testing efforts.

Change-Id: I6538af56f365952b98c2dcbafb1c043435449e63
Reviewed-on: http://gerrit.openafs.org/1806
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-22 11:15:46 -07:00
Andrew Deason
219276bab0 Resolve symlinks for 'fs rmmount'
'fs rmmount' is the only 'fs' command that does not resolve symlinks
for its pioctls for some reason. Make it resolve symlinks.

Thanks to Arne Wiebalck.

Change-Id: Ifb6bdf0b381abd2e157d93d7eea4d853e1b3a689
Reviewed-on: http://gerrit.openafs.org/1805
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-22 09:37:16 -07:00
Derrick Brashear
7d9e6dbbf1 byte-range lock warning should include pid
is is the same pid cmdebug would print. just include it in the logged
byte-range lock warning.

FIXES 126438

Change-Id: Idd83a4c4a56edf43ab257b3a7f08e1bbb774f04a
Reviewed-on: http://gerrit.openafs.org/1333
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-21 21:57:23 -07:00
sanket
2a8c554a45 Adding osi_procname macro to different platforms
osi_procname(procname, size) is added to different platforms to obtain
the processname in the string procname( preallocated ) with size size

Change-Id: Iab8fed3e99839cee7c07a2de6144af9b09af3a57
Change-Id: Ib4e45564ae942e74c331444969a462427f5e7cf3
Reviewed-on: http://gerrit.openafs.org/1771
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-21 21:43:17 -07:00
Derrick Brashear
3239cb8300 macos bulkstat again
revamp this to avoid various issues with vnode references,
and to avoid potentially finding CVInit vcaches but not reclaiming

Change-Id: I6cb8d73b66c449a104799082259c97ede7e32e9b
Reviewed-on: http://gerrit.openafs.org/1802
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-21 16:15:09 -07:00
Russ Allbery
54226e9ad4 Fix UCONTEXT detection on ppc_linux26 via include order
param.linux26.h defines USE_UCONTEXT for all Linux platforms for
glibc 2.4 and higher, but it does this by testing __GLIBC__ and
__GLIBC_MINOR__.  These are defined by features.h, which is included
by any system header.  At least one system header must be included
before those are defined.  lwp/process.c was including <afsconfig.h>
and <afs/param.h> before any other headers, leading to those macros
being undefined.  Most of the Linux architectures either have their
own implementation or were explicitly defining USE_UCONTEXT in the
per-architecture param file, but ppc_linux26 was relying on the
default.

Fix this by reordering the includes to include the various system
headers before <afs/param.h> and add a comment explaining why.

This previously worked in earlier versions because the old
param.ppc_linux26.h file included <afs/afs_sysnames.h>, which
included "stds.h", which included a system header prior to the check
for ucontext.  The new generic param file reverses that order.

Change-Id: I214e54f684afdef07e6e2dec5b6e6e4d255ab4ec
Reviewed-on: http://gerrit.openafs.org/1791
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-21 16:09:04 -07:00
Andrew Deason
80f0547342 Recover from afs_GetVolSlot errors
afs_GetVolSlot can panic in a few different ways, such as failing to
read from or write to VolumeInfo. Instead of panic'ing, return an
error to the application. Adjust callers to deal with getting a NULL
volume returned.

Based on a patch by Mike Meffie.

Change-Id: Ibb301fed795ee9ee5906b8e7973945a06218b8f1
Reviewed-on: http://gerrit.openafs.org/1801
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-21 16:08:49 -07:00
Russ Allbery
6bde63c465 Add RFC 5864 to the protocol documentation directory
Add a copy of RFC 5864 (DNS SRV Resource Records for AFS) to the
protocol documentation directory for reference.  As permitted by
the IETF Trust License Policy section 3(e), I release this document
under the MIT/X Consortium license included in this copy of the
document.

LICENSE MIT

Change-Id: I8e22aac07b4cedbe18b8375213a7866cf98a1386
Reviewed-on: http://gerrit.openafs.org/1799
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-04-21 05:59:31 -07:00
Russ Allbery
e8d6d9dfd7 Install afsd.fuse and man page if built
If --enable-fuse-client is passed to configure and afsd.fuse is built,
install it into the same directory as afsd and install afsd.fuse.8 as a
symlink to the afsd.8 man page.  Add documentation of afsd.fuse to the
afsd man page.

Change-Id: I7d0cd3992a8466e626af2191c713e5623cc40d84
Reviewed-on: http://gerrit.openafs.org/1792
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-21 05:59:05 -07:00
Anders Kaseorg
f3fc021808 Add src/afsd/afsd.fuse and src/libuafs/afsd to .gitignore
Change-Id: I4b7e5261d92944ed871a1113b0f4a651357f9fcf
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/1800
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-21 05:58:34 -07:00
Andrew Deason
7321493788 Add documentation for fs callback xstats
Change I572ff682de4cc7ef27bb46dd028d3d797b873841 added the fileserver
callback xstats collection to afsmonitor. Provide some documentation
for these fields, along with the other fields displayed by afsmonitor.

Change-Id: I21618047519fbb28f6707ff9ba95a17fe27e0f3c
Reviewed-on: http://gerrit.openafs.org/1783
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-04-21 05:55:40 -07:00
Derrick Brashear
0428e5fd95 kauth admin tools ubik prototyping
kill off ubik_Call (but not CallIter, yet)

Change-Id: I7af515b4e1c55c493c304a8ffd5c74cb96cd3b97
Reviewed-on: http://gerrit.openafs.org/1793
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-04-20 18:17:37 -07:00
Jonathan Billings
1662aa04d7 Updated dkms.conf to remove MPS=$SMP from make
* Removed the logic to set $SMP based on CONFIG_SMP from
  /boot/config-$kernelver
* When using --with-linux-kernel-packaging in the configure line, dkms
  no longer needs MPS=$SMP in the make line.

Change-Id: Ib65782050cae9f439ad5fed5c7bbbc403e556b4f
Reviewed-on: http://gerrit.openafs.org/1798
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-20 13:18:44 -07:00
Jonathan Billings
9ab56bb0c8 Added explanatory comments for restorevol move
Since restorevol is placed in %{_prefix}/afs/bin by make dest, we
need to fix it so it ends up in %{_bindir} to be used in the base
package.

Change-Id: I31f2602868230416525a84a9d716230f08cb34ab
Reviewed-on: http://gerrit.openafs.org/1796
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-04-20 09:22:49 -07:00
Jonathan Billings
8cca2e64ef Fixed more locations to reflect recent changes
Moved restorevol man page to base package
Moved state_analyzer man page to server package

Change-Id: I714dd6eca86def48fefc0206c93038ae71415cc9
Reviewed-on: http://gerrit.openafs.org/1795
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-04-20 09:22:36 -07:00
Jonathan Billings
8f952a3ebd Fixed RedHat SPEC file to reflect updates in code
Moved the restorevol binary from /usr/afs/bin to /usr/bin
Added the new state_analyzer.8.gz man page

Change-Id: Ibf4133034b1945d58843162cb45bdd485e8c34a1
Reviewed-on: http://gerrit.openafs.org/1794
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-04-20 09:22:26 -07:00
Russ Allbery
d80382efc5 Remove special-case call sequence for KAM_SetPassword on s390
For Linux s390 (but not s390x), an additional argument was passed
to KAM_SetPassword between the kvno and the encryption key.  This
doesn't seem to match the rest of the code and is now, with stricter
prototyping, preventing the code from compiling.  Remove it and use
the same call sequence on s390 as everywhere else.

Change-Id: I750f64212e80d4bed4500e316ad7d354608866d7
Reviewed-on: http://gerrit.openafs.org/1790
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-20 08:53:26 -07:00
Andrew Deason
63b6bb1ee7 Use AC_PREREQ
We use AC_USE_SYSTEM_EXTENSIONS, which was introduced in autoconf
2.60. To allow for less confusion and perhaps a more clear error
message, specify that we require using at least that version.

Change-Id: I42a3f4e889ad443d8d8cd3ba0c085c67606b8be3
Reviewed-on: http://gerrit.openafs.org/1784
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
2010-04-19 22:24:14 -07:00
Russ Allbery
e6f6c3493e Fixes and clarifications to vos setaddrs man page
Add a caution explaining how the file server addresses are registered
and pointing users at NetInfo and NetRestrict plus restarting the file
server for the normal case.

Mention what version of OpenAFS introduced this command.  Drop the note
about the version of OpenAFS that added the -encrypt flag, since the
whole command is newer than that.

Reference vos listaddrs -printuuid specifically to get the UUID.

General formatting and wording cleanup: use terminology more consistently,
continue a long example line, wrap long lines, fix a spelling error, and
add cross-references to NetInfo and NetRestrict.

Change-Id: Idd6175339dc0feb1b777963bbb09731e42b83522
Reviewed-on: http://gerrit.openafs.org/1787
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-19 20:24:11 -07:00
Russ Allbery
1a29506a2c Update Debian packaging for 1.5.74
Include the Debian changelog entry for 1.5.74-1 and install the new
vos setaddrs man page.

Change-Id: I4cc9e0590cb47d0ae885d7116f5bafd469f43cae
Reviewed-on: http://gerrit.openafs.org/1788
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-19 20:23:11 -07:00
Derrick Brashear
fe48d1777f macos disable bulkstat
there's still a bug

Change-Id: I23e02f9a05e001f0082b757c4a1dd78186fe6977
Reviewed-on: http://gerrit.openafs.org/1782
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
openafs-devel-1_5_74
2010-04-19 11:07:54 -07:00
Derrick Brashear
5df92c083e macos bulkstat don't double reget refs
if another code path already got back the refs from finalizevnode,
don't do it again

Change-Id: I7e06ceeb2c7e71b1be94fd0fccb6e28c37457b24
Reviewed-on: http://gerrit.openafs.org/1776
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-04-19 11:07:49 -07:00
Derrick Brashear
b64a0af473 bulkstat restore bulkfetching state for reused vcaches
when i introduced NewBulkVCache I elided this case. Set it here.

Change-Id: Id88425b0ee662ecc23dd43cf7fa253ab61b02945
Reviewed-on: http://gerrit.openafs.org/1775
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-18 11:07:53 -07:00
Jeffrey Altman
6c49c21f97 Windows: Preserve volume location info in case of comm fail
The cache manager refreshes volume location information every
two hours. If during a refresh the communication with the
vldb server fails, the previously known volume location information
should continue to be used.

The previous behavior in which the volume location information
is discarded first and then the update is performed can result
in unnecessary client failures when a temporary disruption in
communication with the vldb server occurs.  Instead, wait until
we have a successful response from the vldb server before the
previous server list is discarded.

LICENSE MIT

Change-Id: I7c63c4f673a7a1360a74611c356329f31f9ceec3
Reviewed-on: http://gerrit.openafs.org/1769
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-04-18 10:53:33 -07:00
Jeffrey Altman
91bef849e5 Windows: correct locking in cm_FreeServerList
The cm_serverLock must be held when checking the state
of the list head.

LICENSE MIT

Change-Id: I1134a6617d4c1e38b95512b1fdc41c5f5857ea7a
Reviewed-on: http://gerrit.openafs.org/1774
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-04-18 10:53:07 -07:00
Jeffrey Altman
2beda68d4a Windows: prevent infinite idle error response
The idle error value (if any) is stored in the cm_req_t object.
Since the value is never cleared, the same value can be returned
for all requests that make use of the same cm_req_t object.

Change the behavior to only return an idle error once and then
clear it.

LICENSE MIT

Change-Id: Iac9ff8e56e856c2f0e440a34ac39ccd68de37c77
Reviewed-on: http://gerrit.openafs.org/1773
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-04-18 10:52:38 -07:00
Jeffrey Altman
1239acfb44 Windows: Increase the memory map version
Since the cm_buf_t data structure changed, update
the memory map version number so that the cache will
not be reused.

LICENSE MIT

Change-Id: If01997ebd90c8f004d7cf4ba92f46fe4b9f570bf
Reviewed-on: http://gerrit.openafs.org/1772
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-04-17 12:24:33 -07:00
Derrick Brashear
690b5c814e openafs 1.5.74
make 1.5.74 versions

Change-Id: I320cdbab2961dcf2a17bb71e8d4283aaf38941ce
Reviewed-on: http://gerrit.openafs.org/1768
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-04-17 08:47:25 -07:00
Jeffrey Altman
a9018b3132 Windows: 1.5.74 change log
Important changes affecting the Windows distribution for 1.5.74

Change-Id: I980a66a2ab4a90c580249641fc22e3c7a91097dc
Reviewed-on: http://gerrit.openafs.org/1770
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-04-17 08:45:14 -07:00
Jeffrey Altman
3ad9c55838 Rx: make conn_call_lock and conn_data_lock usage consistent
The rx_connection.flags field is protected by the conn_data_lock
but the conn_data_lock is not held everywhere the conn flags
field is altered.  This produces a race that can result in a
deadlock when waiter flags are inadvertently prevented from being
cleared.

The conn_call_lock usage in rx_EndCall which was removed in
Change e169708681eb1bbbb31951b95f68e861a4b01c7e must be restored.
If rx_EndCall never obtains the conn_call_lock it can't ensure
that the thread in rx_NewCall actively checking the calls will
not end up blocking when there is now a call channel that can
be reused.  This usage of conn_call_lock can be removed only
if a true producer/consumer model is implemented.

Change-Id: Id093fd6c4a42afb833c775411be0cd406abf4ef7
Reviewed-on: http://gerrit.openafs.org/1766
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-17 07:09:29 -07:00
Jeffrey Altman
f6d2a279b9 Windows: cm_UpdateCell must hold cell lock across server random
cm_UpdateCell fails to hold the cell lock across the server
randomization.  As a result the vlserver list can be destroyed
while randomization is taking place.

LICENSE MIT

Change-Id: I7753e7e9f8a7d536ce0e2082aaca7b62ab745504
Reviewed-on: http://gerrit.openafs.org/1767
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-04-16 20:10:03 -07:00
Jeffrey Altman
249f80fe74 Windows: CM_SCACHESYNC_STOREDATA for non-files have no buffers
Do not add QData objects with null cm_buf_t pointers to the
cm_scache_t bufWritep queue when synchronizing directory changes.
If a callback is required while the directory change is being
pushed it can result in a deadlock.

LICENSE MIT

Change-Id: Id66c52ed794ceec44011167659e41a0b61898625
Reviewed-on: http://gerrit.openafs.org/1761
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-04-16 20:09:15 -07:00
Jeffrey Altman
168f69db19 Windows: define new event log messages for cm_Analyze VBUSY, VRESTARTING, etc.
Add MSG_SERVER_REPORTS_VBUSY, MSG_SERVER_REPORTS_VRESTARTING,
MSG_ALL_SERVERS_BUSY, MSG_ALL_SERVERS_OFFLINE,
and MSG_ALL_SERVERS_DOWN.

Add event message throttling.  Only permit one copy of a message
to be generated every five seconds if the message will duplicate
the prior message.  This often occurs when a server or volume becomes
inaccessible and there were a large number of requests queued on it.

Integrate these new messages into cm_Analyze processing for VBUSY,
VRESTARTING, ALLDOWN, ALLOFFLINE, and ALLBUSY errors.

LICENSE MIT

Change-Id: Ib30595ded23724810e294133fa75873e20ffbf0b
Reviewed-on: http://gerrit.openafs.org/1762
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-04-16 20:06:14 -07:00
Jeffrey Altman
5a253b1911 Windows: wait for I/O on buffers to complete in cm_SetupStoreBIOD
cm_SetupStoreBIOD constructs a list of dirty buffers for a file
that are to be written to the file server.  When constructing
the list, if when determining the first dirty buffer we come across
a buffer that is already actively involved in an I/O operation,
call buf_WaitIO() to wait until the buffer is no longer busy before
continuing.  This reduces lock contention and synchronization
conflicts.

LICENSE MIT

Change-Id: Icd79b9578b7411b138f14257bcb885249960eab0
Reviewed-on: http://gerrit.openafs.org/1760
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-04-16 20:05:17 -07:00