Commit Graph

10911 Commits

Author SHA1 Message Date
Nickolai Zeldovich
0e83cde60e ubik/udebug.c, vol/vol-info.c: check array index before dereferencing
Avoid out-of-bounds array accesses by first checking that the index
is in-bounds, and then dereferencing; not the other way around.

Change-Id: Ib36a28ca6181a7a7fd602de45cb5a15fad099a44
Reviewed-on: http://gerrit.openafs.org/8879
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2013-01-06 08:34:33 -08:00
Nickolai Zeldovich
5c5515a5c3 volser/vol_split.c: do not dereference known-NULL pointer
Avoid dereferencing a pointer that we just checked is NULL when printing
an error message.

Change-Id: Ibc89883977e7044cab2a844d97b7f0f7d236f4ea
Reviewed-on: http://gerrit.openafs.org/8878
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-01-05 21:40:17 -08:00
Michael Meffie
4042667388 spelling corrections in readme files
Fix spelling errors in readme files.

Change-Id: I62348372d5e226f2b2a3a7732b4a5f8c7331b2ff
Reviewed-on: http://gerrit.openafs.org/8876
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
2013-01-05 09:07:23 -08:00
Andrew Deason
81dd4878e7 SOLARIS: Look for ncurses in ncurses/ncurses.h
Solaris 11+ has ncurses.h in ncurses/ncurses.h. Look for it there.

Without this, on Solaris 11.1 we will detect libncurses automatically
(because it lives in /usr/lib), but not ncurses.h (since it is in
ncurses/ncurses.h, not ncurses.h). So, we will fall back to curses.h,
but will try to link to libncurses, which, as you might guess, fails
with various undefined symbols.

Change-Id: Ia174e2a3c97318d6db2a48a6098569aede93522c
Reviewed-on: http://gerrit.openafs.org/8874
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-01-05 06:28:22 -08:00
Andrew Deason
936c2b02bf SOLARIS: Avoid areq and auid conflict
On new Solaris (11.1), nfs/auth.h #defines areq and auid to access
some elements inside the nfsauth_arg structure more easily. We have a
lot of functions that use those names as parameters, so the compiler
throws an error (since we have a decl like "struct vrequest
*areq_u.areq").

We cannot avoid including that header, since we need some NFS-related
headers for the NFS xlator, and they pull in nfs/auth.h
unconditionally. So, work around this by undefining areq and auid
afterwards.

Change-Id: Ifd139917dfe7a1221941351f7873fe183c617159
Reviewed-on: http://gerrit.openafs.org/8873
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-01-05 06:28:04 -08:00
Andrew Deason
004e9f2563 afs: Check dv against localhero aincr
For operations that modify directories, we call afs_LocalHero to
determine if we can perform the directory modification in our local
cache, and avoid fetching the dir blob from the fileserver. Currently,
afs_LocalHero assumes that the DV received from the fileserver is
correct, and will update the cache DV as long as we have a valid
callback on the file.

If for any reason the client cache falls out of sync with what's on
the fileserver, this can cause the client to incorrectly believe its
cache is up to date. Since, the cached data will be marked with the
newest DV, even if the DV on the server has jumped to be larger than
we expected.

While the client cache should never fall out of sync with the
fileserver, in the past this has been possible due to other bugs
(fileserver idle dead processing and client VNOSERVICE handling).
Assuming that the given DV is correct is also just unnecesarily
fragile, since we can always check if it is correct, so just check it,
and add some comments helping explain what's going on here. Note that
regular file writes effectively already check this.

Note that this change makes use of the 'aincr' argument to
afs_LocalHero, which was previously unused. aincr appears to have been
used for a purpose similar to this before OpenAFS 1.0, but was
removed, possibly accidentally.

It is possible this change negatively affects, or even breaks
(unlikely), functionality with the AFS<->DFS translator. Although
nothing of the sort has been seen, it is difficult to know one way or
the other, due to the lack of available DFS translators.

Change-Id: I0e5395bac695257f66ba0cd58695a59ebdf56431
Reviewed-on: http://gerrit.openafs.org/8864
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-01-04 11:30:59 -08:00
Mark Vitale
19f424ecc2 vol: correct old conditional for IH_CONDSYNC
Two places in the vol package performed IH_CONDSYNC(vp->linkHandle)
only if AFS_NT40_ENV.  This was correct when the namei implementation
was windows only; however, this ifdef was apparently overlooked
when namei was implemented for UNIX.

Change-Id: I0cbe2c5c0a65ece0485b8c2d5a5f92eeb53725fe
Reviewed-on: http://gerrit.openafs.org/8815
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2013-01-04 06:52:00 -08:00
Russ Allbery
0a98596cd3 Make MIN/MAX code in rx/rx_packet.h more readable
Eventually all MIN/MAX code in the tree should be handled uniformly,
but until that day, make this chunk of it more readable and
document the odd exception case for Linux kernel builds.

Change-Id: I4afe5d99b63010df831943e6b82ff89733b08066
Reviewed-on: http://gerrit.openafs.org/8871
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-01-04 06:12:14 -08:00
Russ Allbery
fe2bae1c83 Ensure MIN/MAX are defined in userspace builds of rx
The include of <sys/param.h> was removed from rx_packet.h on
Linux 2.6 and later to fix kernel builds with 3.7, which doesn't
have that header in kernel space.  However, while kernel space
always provides MIN/MAX defines, userspace relied on the header.
On at least powerpc, no other include chain includes sys/param.h,
so MIN/MAX were left undefined.

Fix this by only skipping the include of <sys/param.h> on Linux
if building in kernel mode.

Change-Id: Icd2edd645ef4d18d626de8ce8b81ac07f37b1f21
Reviewed-on: http://gerrit.openafs.org/8870
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-01-04 06:11:50 -08:00
Russ Allbery
2e5ef04e24 Fix spelling error (retreive for retrieve) in strings
Caught by Lintian analysis of the compiled binaries.

Change-Id: I5d53d596d30ad8fea5d3f8f0116122a8c1aa808c
Reviewed-on: http://gerrit.openafs.org/8865
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2013-01-03 13:06:18 -08:00
Andrew Deason
f2f7ba50ed viced: initInterfaceAddr_r regardless of ICBS code
Currently we only call initInterfaceAddr_r for a host if a call to
RXAFS_InitCallBackState3 succeeds. However, this leaves the host
without a host->interface structure, which indicates that the host
does not support UUIDs, and is represented by just a single host,port
pair.

But this is not correct; the host probably does have the relevant UUID
associated with it, but it is just not responding. So, with the
current code, we create a uuid-less host structure for a host that
probably has a uuid; that host structure will probably never be used,
and will just get deleted later.

So instead, always call initInterfaceAdd_r. Do it before the ICBS
call, so the host will be findable via UUID as early as possible. If
the ICBS call fails, the host will be marked as 'down' later on.

Change-Id: I3a000af90773acbdd66fc22718e5e742619839a1
Reviewed-on: http://gerrit.openafs.org/8847
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-01-02 12:05:32 -08:00
Andrew Deason
7b642173c7 viced: Avoid dangling uuid hash table entry
Currently we add a given host to the uuid hash table, then call
RXAFS_InitCallBackState3, and then only initialize the host->interface
structure if the ICBS3 call succeeded.

If the ICBS3 call fails, we have added a host to the uuid hash table,
but the host structure does not contain that uuid. If the host is then
deleted, we will not remove the host from the uuid hash table (since
host->interface is NULL), and so the uuid hash table entry will still
point to the freed host. If that host is then later looked up via that
uuid, we can reference a freed host, which can cause all kinds of
undefined behavior.

So instead, add the host to the uuid hash table at the same time that
we initialize the host->interface structure, inside
initInterfaceAddr_r.

FIXES 131277

Change-Id: Ib2ca82cc498877ec896ab1806cf675f1271ec214
Reviewed-on: http://gerrit.openafs.org/8846
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2013-01-02 12:05:21 -08:00
Derrick Brashear
89d85da604 vol: fix everything to use volumeid type
use one type for volumeid, not 3. kill VolId, and stop
using afs_uint32 (and a few times, afs_int32)

Change-Id: Ibcbd09b5a24d8720b02a02f926e6f59dc0f529aa
Reviewed-on: http://gerrit.openafs.org/8845
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-01-02 10:29:08 -08:00
Derrick Brashear
c67d29c676 vol: use header access macros everywhere
a couple direct references to diskstuff have crept in. push them
back out

Change-Id: I66c7a157aeb326dee17012d551c0f499bae35bc7
Reviewed-on: http://gerrit.openafs.org/8807
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2013-01-02 10:03:14 -08:00
Andrew Deason
2f087dc434 afs: Add a little more info on SLVC loop panic
If we panic due to a perceived infinite loop, log a little more info
about our loop iterations.

Change-Id: Ifbb6d613aa482dbc33f7ba13dc959709e1688f15
Reviewed-on: http://gerrit.openafs.org/8850
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-12-31 06:55:09 -08:00
Andrew Deason
1cee097b5b afs: Avoid unnecessary panic in ShakeLooseVCaches
afs_vcount can change as we traverse the loop. If we successfully
evict something from the cache, afs_vcount goes down, but our loop
variable 'i' stays incremented. For example, if afs_vcount was 100 at
the start of the loop and we kicked out 50 things, by the time we
traverse the entire VLRU, we could have iterated over the loop 100
times, but afs_vcount would still be just at 50.

So, remember what afs_vcount was at the start of the loop, and use
that for our loop limit. Note that vcaches cannot be added to the VLRU
during the execution of this loop, since we're just kicking stuff out.
And nobody else can modify the VLRU but us, since we're holding
afs_xvcache, and if we drop afs_xvcache, we restart the whole eviction
process.

The bug here was introduced by commit bc6dd950, but usually did not
affect Linux until commit 696db866.

FIXES 131553

Change-Id: If30026b5b2101559e704d0e1961effe14beb915f
Reviewed-on: http://gerrit.openafs.org/8849
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-12-31 06:54:59 -08:00
Andrew Deason
36959b50e5 afs: Consolidate ShakeLooseVCaches retry init
Don't duplicate the initialization code in effectively three separate
places. Just goto the top of the loop again.

This should incur no functional change; it's just reorganization.

Change-Id: I40548919a5fa9c4e472a4de0eada8d213d034097
Reviewed-on: http://gerrit.openafs.org/8848
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-12-31 06:54:48 -08:00
Andrew Deason
370aaaeafa LINUX: Avoid infinite d_invalidate loop
In afs_linux_lookup, we try to invalidate as many dentry aliases as we
can. However, a successful d_invalidate() against a dentry does not
necessarily mean that the dentry will not show up in a later
d_find_alias() call. This is because d_invalidate() does not remove
the dentry from the d_alias list, but just removes it from the hash
chain. dput() is what removes it from the d_alias list when all of the
references go away. If a reference is grabbed between our
d_invalidate() and dput() calls, the dentry will stay on the d_alias
list.

We will then retry the loop, and we will get the same dentry back from
d_find_alias(). Running d_invalidate() on an unhashed dentry is a
no-op, so we don't change anything in the loop. We will retry again
and again, looping forever and spinning the CPU.

To avoid this, just call d_prune_aliases instead, instead of
repeatedly looping through the alias list ourselves. Note that this
does remove our check for DCACHE_DISCONNECTED in each alias' d_flags.
This should not be a problem, since we will still use any remaining
DCACHE_DISCONNECTED dentry via d_splice_alias if one still exists.

Change-Id: I8a09a922d07f2c4971269f3c681c748c33bf8e3d
Reviewed-on: http://gerrit.openafs.org/8751
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-12-28 12:05:17 -08:00
Derrick Brashear
8bfce8f278 vol: use defines for header name length
instead of randomly hardcoding numbers in several places,
use macros

Change-Id: I153cbe74d0d297496fb39449c4a71ec81d5637c5
Reviewed-on: http://gerrit.openafs.org/8806
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-27 11:19:31 -08:00
Ben Kaduk
5afe7a882b Add configure option to not install kauth
Per http://www.openafs.org/pages/no-more-des.html the kaserver
suite of utilities is deprecated and is not supposed to be built
anymore in this post-1.6 world.
Not building them at all requires some effort, but not installing
them is pretty easy.  Do the easy part for now, and leave the hard
parts for a follow-up commit.

Change-Id: I1c400a7398b8708e7c9dc6613cd183b9b67e7a7f
Reviewed-on: http://gerrit.openafs.org/8457
Reviewed-by: Michael Laß <lass@mail.uni-paderborn.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-12-26 13:48:44 -08:00
Andrew Deason
752514bd1c viced: Sanity check file link count during CoW
A few ihandle bugs in the past have caused the CopyOnWrite code to
open cached file handles for files which have been deleted. When we
CoW, both of the files we're dealing with had better actually be on
disk, so bail out and flag an error if either of them appear unlinked.

FIXES 131530

Change-Id: I478871bb1b9b43fc0161bb4a255dd7b77d2a28ae
Reviewed-on: http://gerrit.openafs.org/8839
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-12-26 11:39:45 -08:00
Andrew Deason
9cf9a0e978 ihandle: Add FDH_ISUNLINKED
Add the FDH_ISUNLINKED functionality to ihandle. This lets the caller
know if the file for the underlying file descriptor has been deleted
out from under us. This is useful for sanity checks in some callers.

Change-Id: I59d4fffba853cfa1b900a08b7b43134c29bbf844
Reviewed-on: http://gerrit.openafs.org/8838
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-12-26 11:39:40 -08:00
Andrew Deason
a04071e794 ihandle: Indent ifdef maze
According to the mesoamerican long count calendar, ifdef ladders will
destroy the world in 2012.

Change-Id: Ie9b16d600e4743eba3d934f8c3cf4d299abbf7e3
Reviewed-on: http://gerrit.openafs.org/8837
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-12-26 11:39:35 -08:00
Andrew Deason
eb938bd18d volser: Check vnode length on dump
Commit aadf69eabb adds length checks on
vnodes during fileserver read/write operations. Do the same thing when
we dump volume data from the volserver, to ensure that we don't
transmit incorrect data e.g. to other RO sites when releasing.

FIXES 131530

Change-Id: I662489d0466d38af74a9604a2c97a4a5c72525c7
Reviewed-on: http://gerrit.openafs.org/8836
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-12-26 11:36:35 -08:00
Jeffrey Altman
75d9c88281 Windows: GetResourceParent processing for \\afs
When the input name is \\afs the parent must be an empty
NETRESOURCE structure.  The null lpRemoteName field represents
no parent.

Change-Id: I779f1c3357ac74aa76e6d1ed0b755841513ac260
Reviewed-on: http://gerrit.openafs.org/8831
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-25 06:39:57 -08:00
Jeffrey Altman
5f43eb2919 Windows: Add SERVERHASINLINEBULK macros
Implement SERVERHASINLINEBULK and SET_SERVERHASINLINEBULK macros.
Apply them to cm_vnodeops.c.

Change-Id: Ib9e3ed7f745a7ad3acf03ae918d8d1ca406f19c0
Reviewed-on: http://gerrit.openafs.org/8830
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-25 06:38:30 -08:00
Jeffrey Altman
9054392cdc Windows: move SERVERHAS64BIT macros to cm_conn.h
Move the SERVERHAS64BIT and SETSERVERHASNO64BIT macros to
cm_conn.h from cm_dcache.c.

Change-Id: I1e1a332a3bd968645912b4e0caa0d793ef96358c
Reviewed-on: http://gerrit.openafs.org/8829
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-25 06:38:03 -08:00
Jeffrey Altman
b74c778bfd Windows: Fix smb_GetCallerAccess prototype
to supress warnings.

Change-Id: I7d6597457dfe3c99fe7b62621dbad5ffd2f4f0bd
Reviewed-on: http://gerrit.openafs.org/8827
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-25 06:37:01 -08:00
Jeffrey Altman
fc85e66d45 Windows: SetRenameInfo do not reference deleted name
After the Target Dirctory CB has been deleted, it is not
safe to reference the FileName component.  Use the uniTargetName
in the error log message.

Change-Id: I83e6db62ffa0cf59d666066cae8f32e93d63d815
Reviewed-on: http://gerrit.openafs.org/8825
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-23 21:42:54 -08:00
Michael Laß
df4d971ec1 Remove AFSLore from wiki URLs
The URL of the openafs wiki doesn't contain "AFSLore" anymore. Although
these old URLs still work, replace them to point users to the correct
address in the first place. Also be consistent and always use a
trailing /.

Change-Id: I9d22694249c47331b4a5cd4f02f8815742c4b86f
Reviewed-on: http://gerrit.openafs.org/8819
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-23 20:58:13 -08:00
Rod Widdowson
93d674d702 Windows: more warnings on kernel builds
This is the same sort of changes a per git commit 8a4094e9ff
but this time for the fs tree.  Again most of the work is UNREFERENCED_PARAMETER, initialize
variables where the compiler lacks the smarts and remove unused locals.

Change-Id: Id67246e8aaee292cb6f02833e9960f9545c55101
Reviewed-on: http://gerrit.openafs.org/8823
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-23 14:35:47 -08:00
Jeffrey Altman
fef0776df4 Windows: Remove unused AFSVolumeWorkerThread
The currently implmentation does all maintenance work in the
AFSPrimaryVolumeWorkerThread which is associated with the
AFSGlobalRoot volume object.   Remove AFSVolumeWorkerThread as
it is unused.

Change-Id: I2174833093b436430fc46f056e23bb272df6388f
Reviewed-on: http://gerrit.openafs.org/8793
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-22 20:16:59 -08:00
Jeffrey Altman
1726aec2b2 Windows: Wait for all worker threads to exit
The signalling mechanism for waking and shutting down worker threads
relies upon a per-queue event.  Therefore it is not guaranteed that
the worker thread that AFSShutdown*Thread() is attempting to wait
for is in fact the thread that will be woken and exit.  Modify the
code to loop waking threads until the one that is being waited for
does in fact exit.

Subsequent calls to AFSShutdown*Thread() will bypass the wait if
the thread has already exited.

Change-Id: I4555df062ac5a6161b5c55f4598d1bd34e144a2b
Reviewed-on: http://gerrit.openafs.org/8783
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-22 20:16:39 -08:00
Rod Widdowson
8a4094e9ff Windows: warnings on kernel builds
I turned some new warning (by virtue of a more modern compiler) and
threw up a few hundred.  This checked supresses them:

- Mostly remove variables which are never used
- Make unused parameters UNREFERENCED_PARAMETER
- Initialize a couple of variables which were either forgotton or
  the compiler wasn't smart enough to notice were initialized.

Also strip out some extraneous tabs which had crept in.

Change-Id: Iee261ad8a7338bb5d8fde2d7229bbbbbd5af39ae
Reviewed-on: http://gerrit.openafs.org/8812
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-22 20:11:59 -08:00
Derrick Brashear
cf150252b6 macos: avoid leaking iocount on synthetic fsevents
in certain cases we could leak an iocount. clean up even if
our event couldn't be run

Change-Id: I3a69f637c38478ac5f20a42af7db7f8a0ba7539a
Reviewed-on: http://gerrit.openafs.org/8777
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-12-19 07:05:14 -08:00
Michael Laß
986a854151 Update configure help msg to match actual defaults
The defaults for LINUX_KERNEL_PATH and LINUX_KERNEL_BUILD in
acinclude.m4 were changed in 2cfd611, 94ff565 and 3f9d982 without updating
the output of ./configure --help. Change the description of
linux-kernel-headers and linux-kernel-build to show the correct defaults.

Change-Id: I41331f4d48a555e291a45ca56e788bc418c064d3
Reviewed-on: http://gerrit.openafs.org/8759
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-12-18 17:32:18 -08:00
Stephan Wiesand
3f9d982ec2 Linux: Restructure kernel header detection
As of kernel 3.7, version.h has moved, and hence utsrelease.h was
no longer found. Loop over candidate directories and locations
within, and look for the files we're actually after.

FIXES 131525

Change-Id: I686212a283b9e0ce769b1351e3cb75e08f4b110c
Reviewed-on: http://gerrit.openafs.org/8761
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Laß <lass@mail.uni-paderborn.de>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-12-18 12:32:11 -08:00
Andrew Deason
23092acce5 ubik: Do not count votes from error'd connections
If the given connection has a connection-wide error on it, the vote we
got from that site is probably not valid, and we could easily be
interpreting an error code as a vote time. So instead, treat the host
as if we got a network error from it.

Change-Id: Ib9253bf6c24493be1c0d16b9252deecec4e43c2a
Reviewed-on: http://gerrit.openafs.org/8487
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-12-18 11:36:16 -08:00
Jeffrey Altman
fb4ae03f8d Windows: AFSLocateNameEntry Evaluate Symlink Target
Instead of validating the symlink target if both the TargetFID
and the Target Name fields are undefined, perform the validating
if either of them are undefined.

Change-Id: I609bfbf5fe574350580bd54a0b03becb82a2b45e
Reviewed-on: http://gerrit.openafs.org/8765
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-17 23:34:36 -08:00
Jeffrey Altman
1dea312bd4 Windows: AFSLocateNameEntry Absolute Symlink Cell resolution
During AFSLocateNameEntry processing of an absolute symlink the
component being searched for in the AFSGlobalRoot volume may not
be found.  In this case, use AFSCheckCell() to query the service
to resolve the name.  If the AFSGlobalRoot happens to be the
Freelance Root Volume then the service can resolve it even though
it is not present in the directory listing.

Change-Id: Ib6cfce6de5e5e9f619808e6ddbfffac00c596a23
Reviewed-on: http://gerrit.openafs.org/8764
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-17 22:28:32 -08:00
Jeffrey Altman
3bddf79051 Windows: cm_NameI Freelance Eval of Absolute Symlinks
In cm_NameI() it is possible that a symlink to an absolute path
is reached for which the component after the 'mountRoot' is not
present in the mountRoot directory.  If the mountRoot is the
Freelance root.volume then it is appropriate to attempt automatic
cell resolution.

Change-Id: I806c6d4332e5e7b76a9ce2d02977d0caef612e3c
Reviewed-on: http://gerrit.openafs.org/8763
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-17 22:28:20 -08:00
Jeffrey Altman
0d9ffd712a Windows: Set Symlink mpDV after reading target string
When a cm_scache object, symlink, has its mountPointString field
successfully populated by cm_GetData(), the mpDV field must be
assigned the current dataVersion value in order to prevent unnecessary
queries of the mountPointString from the file server.

Change-Id: I62b2341459c680d531fd9f4de64dfcc87801ec3e
Reviewed-on: http://gerrit.openafs.org/8762
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-17 22:28:07 -08:00
Jeffrey Altman
aaa217b079 Windows: If no inlinebulkstat, set the flag correctly
If RXAFS_InlineBulkStatus fails with RXGEN_OPCODE,
cm_SetServerNoInlineBulk must be called with the 'no' parameter
set to True.   Otherwise, thE cm_server object will not remember
that the RPc is not supported.

This is important for avoiding unnecessary timeouts on IBM AFS 3.6
servers.

Change-Id: Ia43b5fbd8e81d4c23ad5741e334831b5d6a4e9ce
Reviewed-on: http://gerrit.openafs.org/8756
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-17 22:27:55 -08:00
Jeffrey Altman
1e03c535da Windows: *ParseIoctlPath path has trailing slash
Make it explicit that a pioctl input path that ends in a trailing
slash is consistently interpretted as a directory.

  \\afs\cell\mp\dir\  == \\afs\cell\mp\dir\.

Change-Id: Id55638157cd69297d1a072ae04f94b968ea03b30
Reviewed-on: http://gerrit.openafs.org/8755
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-17 22:27:40 -08:00
Arne Wiebalck
83ccb62012 Update 'vos shadow' man page
Change the 'vos shadow' man page to say that updating the
VLDB with shadow volumes does only work if the VLDB entries
for the corresponding source volumes are deleted first.

Change-Id: I2764776b7a03346b5b2809f796d1deed0c32933b
Reviewed-on: http://gerrit.openafs.org/8652
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Dan van der Ster <daniel.vanderster@cern.ch>
Tested-by: Dan van der Ster <daniel.vanderster@cern.ch>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
2012-12-13 08:56:51 -08:00
Jeffrey Altman
b11ac53fff Windows: Release Notes updates
document adobe reader protected mode issues

Explain Stats, Volumes, and Cells registry values

many other minor improvements.

Change-Id: I0305fdf12d7e3d2160bab4a10d9030df32afa1ad
Reviewed-on: http://gerrit.openafs.org/8733
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-09 15:26:21 -08:00
Jeffrey Altman
0fc14fde0f Windows: Correct RDR Subsystem value overlap
AFS_SUBSYSTEM_LOAD_LIBRARY and AFS_SUBSYSTEM_PROCESS_PROCESSING
were both assigned value 0x00010000.  Ensure that all values are
unique and match the documentation.

Change-Id: I0e5e52cc84d8b6069ce6f0cd4f431f38fe8e09ac
Reviewed-on: http://gerrit.openafs.org/8732
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-09 15:26:07 -08:00
Jeffrey Altman
b454f2ef0e Windows: buf_usedCount can be 64-bit
If buf_usedCount is 64-bit, must use 64-bit Interlocked operations.
Define buf_IncrementUsedCount() and buf_DecrementUsedCount() macros
to wrap the 32-bit and 64-bit Interlocked operations as appropriate.

Change-Id: Icbcb4d20530cc33b43e3c58c3ce74251b12c1e93
Reviewed-on: http://gerrit.openafs.org/8729
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-09 13:48:55 -08:00
Jeffrey Altman
107d7ace8b Windows: RDR Dynamic root Freelance only
commit 6c708d1415 does not restrict
the AFS redirector dynamic root detection only to the Freelance
volume root directory.  This logic should not apply to arbitrary
mount point target paths.

Change-Id: Iedde41937f602895b1d5922453c93fae4a5bf5d8
Reviewed-on: http://gerrit.openafs.org/8728
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-09 13:48:34 -08:00
Jeffrey Altman
34f5193685 Windows: AFSProcessOpen !MmFlush release SectionObjectResource
Restructure the code around the MmFlushImageSection() call in
AFSProcessOpen() to ensure that the SectionObjectResource is
released even when the flush fails.

Change-Id: Ifd6b25640df796f64fba46b920fdababa5224637
Reviewed-on: http://gerrit.openafs.org/8713
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-12-07 06:54:39 -08:00