Commit Graph

11457 Commits

Author SHA1 Message Date
Marc Dionne
dea3eb17ad viced: Add support for -config and -logfile options
Add options to the fileserver to specify alternate locations for
the log file and the config.  This will be useful for testing
purposes.

Change-Id: I3550bd993fe5fd2cd9b90425962c95cb1c7d98ea
Reviewed-on: http://gerrit.openafs.org/9830
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-06-02 05:40:20 -07:00
Marc Dionne
27ab5d92db salvaged: Clean up command line parsing
Clean up the command line parsing in the salvage daemon by making
better use of the cmd library and avoiding hard coded offsets.

Change-Id: Ia300840cfdbb5e03173936148c183ac391e11454
Reviewed-on: http://gerrit.openafs.org/9829
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-06-02 05:40:08 -07:00
Marc Dionne
11a9224267 volser: Add -config and -logfile options
Add options to specify alternate locations for the configuration
files and the log file.  This will be helpful for testing.

Change-Id: I4169bc1944719773155931860c6a6dd2fd672f53
Reviewed-on: http://gerrit.openafs.org/9828
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-06-02 05:39:55 -07:00
Marc Dionne
cd3492d063 volser: Convert command line parsing to cmd
Convert argument parsing to use the cmd library.

Change-Id: I2bf9d7ce482d49f50cec59a1660a431bae17017a
Reviewed-on: http://gerrit.openafs.org/9827
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-06-02 05:39:38 -07:00
Jeffrey Altman
dfd7469684 Windows: Protect against cm_GetVolServerList failures
In cm_Analyze, if cm_GetVolServerList() fails volServerpp will be
NULL which will trigger an exception if passed to either
cm_SetServerBusyStatus or cm_ResetServerBusyStatus.

Change-Id: I75b4b855b8c3ccfc014532b0c2eb3135807647ef
Reviewed-on: http://gerrit.openafs.org/9960
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-06-01 17:52:46 -07:00
Marc Dionne
12e2d47a1c tests: Improve afstest_UnlinkTestConfig cleanup
Make afstest_UnlinkTestConfig clean up and remove the specified
directory regardless of which files are present.  This means
the function no longer has to track the current state of which
files may be present as tests are added and modified.

A sanity check is added to prevent damage in case the function is
called for an inappropriate directory.

As before, no cleaning is done if the test is run outside of a
"make check".

Change-Id: Idd092040496aaa2566c8693496fefd7d6f247565
Reviewed-on: http://gerrit.openafs.org/9703
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-28 15:57:31 -07:00
Ben Kaduk
61caad06b7 Apply cast from cfc9b348 to the else clause
Clang on FreeBSD complains about format string mismatch as well.

Change-Id: I8bf17571807acdcac460efb94d0388b5cac4fa6c
Reviewed-on: http://gerrit.openafs.org/9855
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-28 15:57:04 -07:00
Marc Dionne
3767cf8bf4 Linux: Fix tmpfs cache support
As of kernel 3.1, tmpfs no longer has a readpage() operation in its
address space operations.  Some of the cache manager code relies on
this, causing an oops if tmpfs is used as backing store for the
cache.

As a minimal fix, detect that there is no readpage() and disable
the optimizations that depend on it.

Change-Id: I6e2236cd53f893d77a8d6568eae7e200ad8d1ac0
Reviewed-on: http://gerrit.openafs.org/9949
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-28 15:55:56 -07:00
Andrew Deason
dcd2b052b9 cacheout: Add -encrypt option
Add the -encrypt option to cacheout, for forcing communication with
servers over encrypted channels.

Change-Id: I1a2a9faf2fb72238102b018b7692a6691a7c0054
Reviewed-on: http://gerrit.openafs.org/9941
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-28 09:36:43 -07:00
Jeffrey Altman
1e8788927e Windows: cm_DumpServers "down" is string not enum
When dumping the state of the servers, "down" is a string not an
enum value.

Change-Id: I603755cf0db28515d01bc03253a4d3e6528b13aa
Reviewed-on: http://gerrit.openafs.org/9946
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-28 09:33:27 -07:00
Marc Dionne
fca4252621 Linux 3.10: Include linux/aio.h directly
This file needs bits from linux/aio.h, but gets them indirectly
from the inclusion of aio.h by sched.h.  That gets removed for
Linux 3.10.

Since this header is not of general interest elsewhere, just include
it directly here.

Change-Id: I432bde282a1c5425ba6780bca28e308bf70a79e7
Reviewed-on: http://gerrit.openafs.org/9912
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2013-05-28 09:33:04 -07:00
Jeffrey Altman
e37ec7817a vol: return VNOVNODE if vnode is not allocated
If a request for a vnode fails because the vnode is not allocated
within the volume, the error returned to the client should be VNOVNODE to
indicate that the requested FID does not exist and not VIO indicating a
transient disk i/o error or other transient internal inconsistency.

Change-Id: I2f875593d4a49b7ca8ed26a2f147a1c3c9109a6d
Reviewed-on: http://gerrit.openafs.org/9902
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-28 08:39:36 -07:00
Simon Wilkinson
68d32db60e Sort all libtool symbol lists
The original plan for the libtool symbol lists was that they be in
alphabetical order. This should make them easier to maintain, as it
becomes harder to accidentaly introduce duplicates, and makes merge
conflicts when adding new symbols less likely.

However, not all of them are properly sorted. Update the ones that
aren't. This was done with

    for A in `find . -name *.la.sym`; do sort $A -o $A; done

Change-Id: I6a3fd621098466e8275b2e42c0fe54cfb38b5128
Reviewed-on: http://gerrit.openafs.org/9900
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-28 07:26:57 -07:00
Marc Dionne
8ebe4ecac6 libafs: fix Afs_syscall definition for UKERNEL
For the UKERNEL case, Afs_syscall is prototyped and used as (void).
Make the function definition use the void keyword to avoid a warning
about an old style definition.

Change-Id: Ic22f58a6c646d6f557e5891ce2ed51fba50fba35
Reviewed-on: http://gerrit.openafs.org/9402
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-28 07:26:38 -07:00
Michael Meffie
eb7b3dac48 volser: -log restore operations
Add vos restore to the list of operations which are logged
when the volserver is running with the -log option. Example
log line:

    admin on 172.16.50.141 is executing Restore 536870969

Change-Id: Ia6eb07258831865dfe2c85d1b9df078f33c4b640
Reviewed-on: http://gerrit.openafs.org/9926
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-28 07:26:23 -07:00
Chaskiel Grundman
c4fce52a54 Remove kauth from libuafs
Remove the uafs_klog() apis from afs_usrops. Nothing uses it except
the obsolete afsweb stuff that isn't built anymore.

Stop linking in all kauth and pts components. Also remove some other
objects from libauth, rxkad, and com_err, that were only present as
dependencies of kauth and pts components

Change-Id: Idf83b3dd1098e874d90244fe72609666b13216a4
Reviewed-on: http://gerrit.openafs.org/9887
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-28 07:25:53 -07:00
Jeffrey Altman
f805569211 man-pages: build bos getrestricted / setrestricted
build missing bos man pages on windows.

Change-Id: I37ccc402487bae04a7344a4276d246bd535bf1a6
Reviewed-on: http://gerrit.openafs.org/9944
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-28 07:25:08 -07:00
Marc Dionne
9b24013426 Linux 3.10: Replace create_proc_entry() with proc_create()
Add an afs_proc_create() compat function that uses the
appropriate kernel function based on a configure test.

Change-Id: I4f3929849af032f2a483bc06bc5769f64085f1c4
Reviewed-on: http://gerrit.openafs.org/9854
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-28 07:15:06 -07:00
Marc Dionne
caa90b2d7a volser: Adjust TLV tag range
Tag values up to D_MAX cannot be used as TLV tags, as the parsing
logic assumes anything up to D_MAX is a control tag.  Adjust
MIN_TLV_TAG to 21 so that the TLV range sits just above D_MAX.

Change-Id: I8d55f536b82e209847400b5ac6689364abe44090
Reviewed-on: http://gerrit.openafs.org/9942
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-28 05:37:34 -07:00
Dan van der Ster
2290783990 linux: remove linux osi_alloc hash stats
The bucket stat vector is maintained but never read. And it is
occasionally annoying since it can flood messages with
"afs_get_hash_stats: Warning! exceeded max bucket len ..."
Remove it.

Change-Id: Ibc2101c038e40c9ff6ab0401c89fd41af75ed831
Reviewed-on: http://gerrit.openafs.org/9937
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-25 08:39:58 -07:00
Jeffrey Altman
25a0cf6fbc Windows: Return bytes_read count from cm_GetData
The existing interface for cm_GetData takes an input buffer and
a buffer size and no method by which the number of bytes read into
the buffer can be returned.  Add an output parameter to permit it.

Change-Id: I777d2fba850fb39d4323b006e3c79afa5ff4c2ff
Reviewed-on: http://gerrit.openafs.org/9930
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-23 14:36:23 -07:00
Andrew Deason
7cca447e23 DAFS: Avoid useless attach2 error message
Since commit 53230846a2, attach2 logs an
error when we force a volume to an error state due to attachment
errors. This is to ensure that we never end up with a volume in an
error state without logging a message about it.

However, while this is useful for the fileserver, for non-fileserver
programs this situation is very common for VNOVOL errors and does not
represent an actual problem. For the fileserver, nonexistent volumes
should be caught before we hit attach2 (in e.g. GetVolume when we
can't find a volume structure), so errors here can be significant and
should be rare. But for e.g. the volserver, when we try to use a given
volume id, we just try to attach it directly, so if the volume doesn't
exist, we will hit this code path.

This can happen pretty often for the volserver, since many volume
operations try to determine if a volume already exists by trying to
attach it. In those cases, this error message is pretty much useless
noise. So, get rid of it if we are non-fileserver, and the error we
got is VNOVOL. It is not as important for non-fileserver that we put a
volume in an error state, since volume states are much more transient
for non-fileserver programs, since the volume structs don't stay
around very long.

Change-Id: Ie2c221af2b55af70d725f0f52dacbb7fd8788349
Reviewed-on: http://gerrit.openafs.org/9907
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-21 14:27:58 -07:00
Michael Meffie
ccb66323a0 vldb_check: print vlentry file offsets
To aid in debugging, consistently print the vlentry database "address"
and the file offset when displaying errors for vlentries.  Print the
vlentry file offsets when printing all the entries with the -entries
option.

Change-Id: I3ef37e6654280f0cff9b2449da29aebe7c5e3aad
Reviewed-on: http://gerrit.openafs.org/9906
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-21 14:25:33 -07:00
Michael Meffie
7a89c4f944 vldb_check: cope with broken names and volids
Fix-up broken vlentry names and rw volid so entries can be looked
up in the vlserver and can be deleted with vos delentry if needed.

Change-Id: Ide4855b0ef149977b04e3f0b5c966b13dd1cf417
Reviewed-on: http://gerrit.openafs.org/9905
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-21 14:25:27 -07:00
Marc Dionne
50083ea0df linux: Fix leaked dentry reference in the revalidate op
In one error case, we exit the function without release the
reference on the parent dentry.  This dangling reference can cause
an oops when the client is shut down.

Change-Id: I1632b581f6e7a557bb54a999dc1837c31b8381bf
Reviewed-on: http://gerrit.openafs.org/9802
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-20 11:29:43 -07:00
Jeffrey Altman
cc07c8b99a roken: export rk_vasprintf
missing on windows

Change-Id: I59778e0af6ba407efcdfbcbddec5f8be6e740951
Reviewed-on: http://gerrit.openafs.org/9913
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-18 09:21:56 -07:00
Jeffrey Altman
436836d81a Windows: Protect against infinite VIO retries
Keep track of the number of VIO errors reported by the file servers.
If the count exceeds 100, abandon the request.

Change-Id: I4d18ccca732802752c94c9ca1b36ca9a827c72de
Reviewed-on: http://gerrit.openafs.org/9923
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-17 20:14:04 -07:00
Jeffrey Altman
594c97675f Windows: AFSNameArrayClone leak in AFSCommonCreate
Do not leak the AFSNameArrayClone if AFSLocateName fails.

Change-Id: I01ea5ac7261de2cd2e715e7d110cb5e09173938c
Reviewed-on: http://gerrit.openafs.org/9922
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-17 20:13:49 -07:00
Jeffrey Altman
f4b78c3eb1 Windows: remove unused and leaked uniRootFileNameClone
In AFSCommonCreate remove the allocated but never used but leaked
'uniRootFileNameClone' Unicode string.

Change-Id: I02a4a1a2383c5a85f2a939b4d18e38def4cf2687
Reviewed-on: http://gerrit.openafs.org/9920
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-16 10:29:49 -07:00
Jeffrey Altman
975c11cb35 Windows: NotifyHardLink avoid null ptr reference
In AFSNotifyHardLink, if the TargetDirectoryCB out parameter is non-NULL
but pDirNode is NULL, do not attempt to increment the
DirOpenReferenceCount because doing so will trigger an exception.

Change-Id: I9d50e05aff9a4922113f814dd3d50e115725ecca
Reviewed-on: http://gerrit.openafs.org/9903
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-13 10:39:26 -07:00
Jeffrey Altman
4a91ac6f83 Windows: Fix trace msg typo in AFSDeleteDirEntry
The name of the function in the trace messages is wrong.

Change-Id: I7a1b86765ca8fde828615069c66e51f5e5dce4ca
Reviewed-on: http://gerrit.openafs.org/9899
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-11 13:05:02 -07:00
Anders Kaseorg
ad6e31d5fe Linux: osi_TryEvictVCache: Don’t skip the first dentry if D_ALIAS_IS_HLIST
An hlist doesn’t begin with a sentinel like a list does, so the old
code would skip the first dentry or crash with a NULL dereference if
there wasn’t one.  Use the kernel’s list_for_each_entry or
hlist_for_each_entry macros instead of trying to do it manually.

Should fix a crash observed by Alex Chernyakhovsky on kernel 3.6 and
newer.

Change-Id: I6d7bd190013a0250ca896af8d5182df55a3376b0
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/9857
Reviewed-by: Alex Chernyakhovsky <achernya@mit.edu>
Tested-by: Alex Chernyakhovsky <achernya@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-11 08:43:32 -07:00
Derrick Brashear
13a3ba7ba2 pt_util: gcc warning fix
it's claimed these are not initialized before use.
squelch compiler errors. has to be in parent as otherwise
we will zero them in our loop where we potentially want the
parent group id, which is not on "this" line as we add members.

Change-Id: I3014765ad1935cbe20421560329b5bdf465db8af
Reviewed-on: http://gerrit.openafs.org/9840
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-11 08:41:40 -07:00
Derrick Brashear
00b230d693 pt_util: be admin
cheat and use the noauth flag so we pass the admin checks

Change-Id: Ie064db4fb930529fe474317d096238c915d1ef5b
Reviewed-on: http://gerrit.openafs.org/9839
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-11 08:40:47 -07:00
Jeffrey Altman
c42912d6da Windows: AFSCleanup move CCb access inside try block
A crash dump was examined which showed a deadlock due to the leak
of a SectionObjectResource in a code path in which the holding thread
could not have obtained it.  The FileObject->FsContext2 (Ccb) pointer
referred to invalid memory which may have been due to pool corruption.
The only code path in which the SectionObjectResource is held exclusive
and then the Ccb pointer is used outside of a try-except block is in
AFSCleanup().  Move this reference inside the try-except block just in
case.  If the Ccb is invalid, at least this way AFSRedirLib will catch
the exception and free the SectionObjectResource before continuing.

Change-Id: I08c9baacfc8897ae8d8b551a74976daf7effbcef
Reviewed-on: http://gerrit.openafs.org/9892
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-11 08:08:54 -07:00
Jeffrey Altman
dcae72c87e Windows: AFSClose Set FsContext* to NULL
After the Fcb OpenReferenceCount is decremented it is no longer
safe for the Fcb pointer to be referenced.  Set FsContext to NULL.

After the AFSRemoveCcb() call, it is no longer safe to reference
the Ccb pointer.  Set FsContext2 to NULL.

Change-Id: I5be1367c599222df02269bf1ed85ec89ac5d279c
Reviewed-on: http://gerrit.openafs.org/9890
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-11 08:08:03 -07:00
Jeffrey Altman
6c42bc9090 Windows: AFSClose remove dead code
Change-Id: Ia844d7e01bcf7a04a7115416e83d45bf5319d739
Reviewed-on: http://gerrit.openafs.org/9889
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-11 08:07:15 -07:00
Jeffrey Altman
d1577c80bb Windows: AFSCommonWrite do not leak SectionObjectResource
If the write request is neither an extending write nor a non-cached
write and (liStartingByte.QuadPart + ulByteCount) >=
pFcb->Header.FileSize.QuadPart, then the SectionObjectResource pointer
will be leaked.  Instead release it before retrying.

Change-Id: Id1ea7a3829a6e2be19280f366e665a11e14fba62
Reviewed-on: http://gerrit.openafs.org/9888
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-11 08:06:32 -07:00
Marc Dionne
641b2fd8d6 ubik: Avoid use of freed string
If cellName was just set to dir->cellName, afsconf_Close() will
free the string before fprintf uses it.  Just change the order
so we don't access freed memory and print garbage.

Change-Id: I66792dc50addf2d8242f71923db09fcc178cc450
Reviewed-on: http://gerrit.openafs.org/9886
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-10 12:00:44 -07:00
Jeffrey Altman
2608ce67f1 Windows: RDR_GetVolumeInfo do not always return success
If the call failed because all servers are down or all instances
of the volume are offline or busy, tell the caller.  Do not return
fake data.

Change-Id: I4e89cefba19161c7d75cfdfd04a1cf7dfc2398f4
Reviewed-on: http://gerrit.openafs.org/9882
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-08 14:22:02 -07:00
Jeffrey Altman
5342de7a58 Windows: cm_Analyze if no retry don't sleep
If error handling response is not going to result in a retry of the
call, do not sleep.

Change-Id: I12435612f94a2e6afb77b5a2975f90f66e02823a
Reviewed-on: http://gerrit.openafs.org/9881
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-08 14:21:39 -07:00
Jeffrey Altman
663f32e93e Windows: only retry ALLBUSY for five minutes
Add a volbusyCount field to cm_req_t.  Increment the count each time
CM_ERROR_ALLBUSY is processed by cm_Analyze for a given request.
Wait 15 seconds between retries and retry up to 20 times and then
fail.  This prevents requests from blocking for a volume that isn't
going to come back online for hours.

Change-Id: I25e68565700dddceebecedf552d1e04cbe39b22a
Reviewed-on: http://gerrit.openafs.org/9876
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-08 14:21:23 -07:00
Ben Kaduk
a63e6747ab FreeBSD: VOP_MMAP has been dead since 1996
Clang complains that our (K&R!) declaration of struct vop_mmap_args
will only be visible within the (empty) function.
With the kernel's CFLAGS, though, this is fatal.
Remove the dead code.

Change-Id: I8fd768b36b73f9e2f727dae4e748931f307444c8
Reviewed-on: http://gerrit.openafs.org/9856
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-08 12:32:31 -07:00
Jeffrey Altman
79c7b34afd Windows: Release Notes updates
Document ReparsePointPolicy registry value.

Document known Explorer Shell Paste bug.

Update ShortNames registry value.

Document Cygwin 1.7.18-1 support for AFS Symbolic Links.

Change-Id: Ifdcea9c71fb23d4e9cf9ad50907dd6f50c5c619e
Reviewed-on: http://gerrit.openafs.org/9869
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-07 18:52:58 -07:00
Jeffrey Altman
4cda20f3d7 Windows: AFSLibExFreePool*() macros
Introduce the AFSLibExFreePool() and AFSLibExFreePoolWithTag() macros
which simply call ExFreePool() and ExFreePoolWithTag().

The prefix AFSLib indicates that memory allocated by
AFSLibExAllocatePoolWithTag() must be freed before unloading.
AFSExFreePool*() cannot be used because that is a pointer to a
function provided by AFSRedir.sys which may not be assigned when
memory must be freed.

The only time that ExFreePool() should be used is if the memory was
allocated by a system function.

Change-Id: If56b762d2b6d857dbe415171401d64ca10a1e9ea
Reviewed-on: http://gerrit.openafs.org/9853
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-07 18:48:03 -07:00
Jeffrey Altman
b655055a26 Windows: Use AFSLibExAllocatePool for library local
If the memory allocation is for an object that must be freed before
the afsredirlib.sys driver unloads, use the AFSLibExAllocatePoolWithTag
interface.   AFSExAllocatePoolWithTag allocates the memory from
afsredir.sys which prevents Verifier from being used to detect leaks.

Change-Id: I3e384ff2da069a594d2cafe7b4b1a9bb942cbd08
Reviewed-on: http://gerrit.openafs.org/9852
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-07 18:47:51 -07:00
Jeffrey Altman
5ea6e66433 Windows: RDR_Initialize must cleanup threads on failure
If RDR_Initialize() fails after instantiating the worker thread
pool it must call RDR_ShutdownFinal() to destroy the pool before
exiting.  Otherwise, the threads will spin endlessly as each
DeviceIoControl call to the redirector fails.

Change-Id: I347a509703a44c6b8ca25a084ea10dc0df801eb9
Reviewed-on: http://gerrit.openafs.org/9860
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-07 17:44:08 -07:00
Jeffrey Altman
ff2a5fed4d Windows: IOCTL_AFS_GET_DEBUG_TRACE
Pemrit the active Debug Flags and Trace Configuration to be
queried by administrators.

Change-Id: I0c798bd2eb8f2445c81a0b45c112bbaf72d15522
Reviewed-on: http://gerrit.openafs.org/9798
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-07 17:40:11 -07:00
Jeffrey Altman
edea22524a Windows: Add IOCTL_AFS_GET_REPARSE_POLICY
Introduce IOCTL_AFS_GET_REPARSE_POLICY to permit the global
and active authgroup reparse point policies to be queried.

Change-Id: I9ec4bfd177cac1a4ed77f3b376694ec6864a479c
Reviewed-on: http://gerrit.openafs.org/9797
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-07 17:39:58 -07:00
Jeffrey Altman
aa09c83070 Windows: "ReparsePointPolicy" registry key
HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters

  DWORD "ReparsePointPolicy"

Valid values are:

 0 - No global policy set
 1 - Reparse Points to Files treated as the target File

Change-Id: Ib8f4f6a4c5c3b2faaf86a6650a4ce3ebcbbdf0e0
Reviewed-on: http://gerrit.openafs.org/9789
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-05-07 17:39:46 -07:00