]> git.michaelhowe.org Git - packages/o/openafs.git/log
packages/o/openafs.git
14 years agoLinux: 2.6.38: deal with dcache_lock removal
Marc Dionne [Sat, 29 Jan 2011 01:59:17 +0000 (20:59 -0500)]
Linux: 2.6.38: deal with dcache_lock removal

dcache_lock is gone in 2.6.38, and some of the vfs locking rules
have changed.

Of interest for openafs:
- inode->i_lock protects the d_alias list
- dentry->d_lock protects d_unhashed()

Add a new configure test for dcache_lock, and replace its use by
the appropriate new lock(s).

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

Change-Id: Ic6cff1884a55aeb2ab29518e8d160000c6254fc5
Reviewed-on: http://gerrit.openafs.org/3918
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoLinux: 2.6.38: Adjust for permission inode operation changes
Marc Dionne [Sat, 29 Jan 2011 00:41:32 +0000 (19:41 -0500)]
Linux: 2.6.38: Adjust for permission inode operation changes

The permission i_op has a new signature with a flags argument, and
must now deal with RCU path walking.
- Fix existing configure test for this i_op, it succeeds when it
shouldn't
- Add a new configure test for the new signature
- Make our permission i_op "RCU-walk aware" - return ECHILD if
called in that mode

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

Change-Id: Ia47dfe390ea317925acfca709dbd637b68e94ca8
Reviewed-on: http://gerrit.openafs.org/3917
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoLinux: allow compile flags to be passed to AC_CHECK_LINUX_BUILD
Marc Dionne [Sat, 29 Jan 2011 00:03:39 +0000 (19:03 -0500)]
Linux: allow compile flags to be passed to AC_CHECK_LINUX_BUILD

Some linux autoconf tests require particular compile flags such as
-Werror.  Add a parameter to the AC_CHECK_LINUX_BUILD macro that
lets the caller pass in any needed special flags.

Adapt a few existing tests that were still using AC_TRY_KBUILD
directly.

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

Change-Id: I421c95f4f4f0b001ac1eab400dfbabfd2008e7a5
Reviewed-on: http://gerrit.openafs.org/3916
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: correct pthread_xxx_init semantics
Jeffrey Altman [Mon, 7 Feb 2011 21:44:09 +0000 (16:44 -0500)]
Windows: correct pthread_xxx_init semantics

pthread lock and conditional initialization semantics
do not require that the lock structure be zeroed before
pthread_xxxx_init() functions are called.  Since the Windows
CriticalSection initialization does require that the memory
be zeroed, the pthread_xxxx_init() functions must zero the
memory just in case before performing the CriticalSection
initialization.

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

Change-Id: I71092131183daa0627c21c328bd5e5bf182a0fc2
Reviewed-on: http://gerrit.openafs.org/3915
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: remove duplicate advapi32.lib references
Jeffrey Altman [Thu, 3 Feb 2011 00:24:00 +0000 (19:24 -0500)]
Windows: remove duplicate advapi32.lib references

advapi32.lib is included in the conlibsdll macro.
No need to include it in the link list twice.

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

Change-Id: Ibcd82014ca28e8ba0bec6e184bc5ae276a0eea90
Reviewed-on: http://gerrit.openafs.org/3914
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agospelling/grammar fixes for manpages
Ken Dreyer [Thu, 3 Feb 2011 20:22:02 +0000 (15:22 -0500)]
spelling/grammar fixes for manpages

Several small fixes for spelling and grammar.

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

Change-Id: Id7a937572a1806f0ef812b8d7089ed5d3c5dabd9
Reviewed-on: http://gerrit.openafs.org/3913
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agospelling/grammar fixes for vos_clone manpage
Ken Dreyer [Wed, 2 Feb 2011 16:49:31 +0000 (11:49 -0500)]
spelling/grammar fixes for vos_clone manpage

Small spelling/grammar fixes for the vos_clone manpage.

Reviewed-on: http://gerrit.openafs.org/3879
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit ad05600d86d6737f55d7b785bc7c503c4a45be00)

Change-Id: I112899208f1b556a84d20d9ea2f2542f030cbfdc
Reviewed-on: http://gerrit.openafs.org/3912
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: No NCBRESET when probing Loopback after start
Jeffrey Altman [Mon, 31 Jan 2011 16:43:39 +0000 (11:43 -0500)]
Windows: No NCBRESET when probing Loopback after start

The Netbios NCBRESET command resets all of the Netbios state
associated with the LAN adapter including the name bindings.
In response to a detected LAN adapter IP address change, the
smb_LanAdapterChange() function is called to determine if any
Netbios LAN adapter bindings that were in use or should be in
use by afsd_service were altered.  As part of the check,
lana_GetUncServerNameEx() is called which in turn calls
lana_FindLoopback() which in turn issued a lana_IsLoopback()
for each LAN adapter with the 'reset adapter' flag set to TRUE.

Calling lana_IsLoopback() with 'reset' equal TRUE was fine
when lana_GetUncServerNameEx() was only called from smb_Init(),
but it is not fine when called after the service is processing
calls.  By resetting the adapter the binding of the netbios name
"AFS" (or "<MACHINE>-AFS") is removed and all outstanding calls
are canceled.  If the SMB redirector attempts a reconnect during
the window before NCBADDNAM is called to re-bind the name, a
negative cache entry will be placed in the netbios name lookup
table that will prevent the SMB redirector from connecting to
the client for several minutes.

If the environment is one in which frequent IP address change
events are triggered, it is possible that the SMB redirector
will never be able to reconnect to the service.

This patchset adds a flag, LANA_NETBIOS_NO_RESET, to the
lana_GetUncServerEx interface which permits smb_LanAdapterChange()
to avoid the undesirable reset.  This negative flag was selected
in order to avoid changing the current default behavior as the
lanahelper library is used by out of tree installers and it
is preferred that OpenAFS avoid breaking them unnecessarily.

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

Change-Id: Ice4380550fec8c1ac2c2c5ec76e1b73f23cd4829
Reviewed-on: http://gerrit.openafs.org/3911
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: cleanup preprocessor definition namespace
Jeffrey Altman [Mon, 27 Dec 2010 22:57:59 +0000 (17:57 -0500)]
Windows: cleanup preprocessor definition namespace

Do not use reserved preprocessor symbol names.  Instead
use OPENAFS_<PATH>_<HEADER>_H formatted names where <PATH>
is the subdirectory path from src/ in which the header
file originates in the repository.

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

Change-Id: Ic99253b74d3d88712b1959757d294b31ad590ba0
Reviewed-on: http://gerrit.openafs.org/3806
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agonamei: Limit traversal when removing data dirs
Andrew Deason [Thu, 2 Sep 2010 20:05:21 +0000 (15:05 -0500)]
namei: Limit traversal when removing data dirs

namei_RemoveDataDirectories currently calls delTree with 'tree'
pointing to the part of the path immediately following n_base (i.e.
starting at the beginning of n_voldir1). This causes delTree to
traverse all of n_voldir1, trying to delete every directory it finds.

Since we are typically only trying to remove a single volume when
calling namei_RemoveDataDirectories, instead call delTree with 'tree'
pointing to immediately after n_voldir1, and beginning at n_voldir2
and try to just rmdir n_voldir1 afterwards. This way, we do not
traverse a large fraction of the entire partition when just trying to
delete a single volume, and so can significantly speed up volume
removals.

(cherry picked from commit 1ca0a24775794ba2e645854a3bbaa656f2fc8086)
Reviewed-on: http://gerrit.openafs.org/2651
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: Iadae1e231b533695af615a231e42ad8204674fe4
Reviewed-on: http://gerrit.openafs.org/3908
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agonamei: Do not remove n_voldir1
Andrew Deason [Thu, 9 Sep 2010 19:10:01 +0000 (14:10 -0500)]
namei: Do not remove n_voldir1

When removing data directories in namei_RemoveDataDirectories, do not
remove the n_voldir1 directory (directory X in /vicepa/AFSIDat/X).
Removing this directory can race against the creation of an entirely
unrelated volume, causing the create op to fail (since it tries to
create a directory in a directory that no longer exists).

We don't currently have the necessary locking to make this safe, and
since the overhead of n_voldir1 existing is pretty negligible, just
leave it there. Also add some comments briefly justifying this.

Note that other similar races probably exist for directories under
n_voldir1, but they would only be between volumes in the same VG, and
so are much less likely to occur.

(cherry picked from commit f2df207274c65b4fa8c24419150e9084a4d17fca)
Reviewed-on: http://gerrit.openafs.org/2727
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I2df4b73dd5125da0a2de52c3011ba167dc036a8b
Reviewed-on: http://gerrit.openafs.org/3907
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoRemove unreached lines
Andrew Deason [Mon, 22 Nov 2010 02:29:11 +0000 (21:29 -0500)]
Remove unreached lines

Fix some macros to eliminate unreached trailing empty statements (such
as: "{code = foo; goto error;};"), and other oddities causing
"statement not reached" warnings. Also eliminate a couple of code
blocks that were never reached.

(cherry picked from commit 1c45cc746e7484e72191fc8d010640692e90bc82)
Reviewed-on: http://gerrit.openafs.org/3368
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: Ibe9a94c64d38fe102fdf4fb9c182a5eb3b2adaa5
Reviewed-on: http://gerrit.openafs.org/3906
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: Always use INVALID_FD to indicate an invalid fd
Jeffrey Altman [Thu, 28 Oct 2010 04:40:32 +0000 (00:40 -0400)]
vol: Always use INVALID_FD to indicate an invalid fd

file descriptors on Windows are not ints and therefore
cannot be safely compared against -1.  Always use INVALID_FD
which is -1 on UNIX and INVALID_HANDLE_VALUE on Windows.

Reviewed-on: http://gerrit.openafs.org/3178
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit d21dd16789458c07e63abe021f93f656dba4e52c)

Change-Id: I99e0ef2f0c1ff23817ffb13b270bc0f04bcf12a4
Reviewed-on: http://gerrit.openafs.org/3905
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: Add VInit cond var and remove busywaits
Andrew Deason [Thu, 2 Sep 2010 16:25:27 +0000 (11:25 -0500)]
vol: Add VInit cond var and remove busywaits

In DAFS, FSYNC_sync was waiting for VInit to reach at least 2 by
looping around pthread_yield(). For a server with a large number of
volumes, it can take a while for volumes to preattach, and so we are
effectively busy-waiting for preattach to finish. This can slow
fileserver startup and peg the cpu.

So instead, add a condition variable for when VInit changes, and wait
on that. Also modify other checkers of VInit to use the cond var.

(cherry picked from commit 31bb2e5eb5feb9c8e84d17b49fe70268127cdd43)
Reviewed-on: http://gerrit.openafs.org/2648
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I773ab01095bb0c101a34146ef9bf201946ebcf8b
Reviewed-on: http://gerrit.openafs.org/3887
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoAvoid thread-unsafe PrintInode in threaded code
Andrew Deason [Mon, 12 Jul 2010 20:47:15 +0000 (15:47 -0500)]
Avoid thread-unsafe PrintInode in threaded code

Some potentially-threaded callers were calling PrintInode with a NULL
first argument, which is not threadsafe. Alter them to use local
storage.

(cherry picked from commit 38cf31463e3f3c675de727c1e793e117a90e6d20)
Reviewed-on: http://gerrit.openafs.org/2593
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I4b6e0f8c41180c017739dbfdb4f2ecbce96df8ec
Reviewed-on: http://gerrit.openafs.org/3886
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: Use OSI_NULLSOCKET and not -1 to indicate invalid fssync fd
Jeffrey Altman [Thu, 28 Oct 2010 04:43:26 +0000 (00:43 -0400)]
vol: Use OSI_NULLSOCKET and not -1 to indicate invalid fssync fd

The FSync file descriptor is an osi_socket which has an invalid
value of OSI_NULLSOCKET which is not necessarily -1.  Be sure to
compare against OSI_NULLSOCKET and not -1 when checking an invalid
value.

Reviewed-on: http://gerrit.openafs.org/3179
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit e8991ff8286f151d109bb4f98d885a583e198f83)

Change-Id: I1627ce0b78d10626b7d375546b400459ff1724ca
Reviewed-on: http://gerrit.openafs.org/3885
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoRx: Do not stop keepalives on ACKALL receipt
Andrew Deason [Mon, 31 Jan 2011 21:00:09 +0000 (15:00 -0600)]
Rx: Do not stop keepalives on ACKALL receipt

We need to still keep sending periodic keepalives after receiving an
ACKALL, since the call is not done yet. ACKALLs can be received when
the peer has received all data from us, well before the call has
finished. This is particularly noticeable for long-lived calls that
have little data transfer, such as AFSVolForward and
AFSVolForwardMultiple.

This reverts commit b1549f29a9515de09d4a64bfb28bf5afdfee2615, which
was intended to be part of a fix for RT 20727.

FIXES 128848

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

Change-Id: I9a2edb819ba052786ec9f4c9d15d11ea48905af3
Reviewed-on: http://gerrit.openafs.org/3878
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: out of order locks cm_CheckCBExpiration
Jeffrey Altman [Sun, 30 Jan 2011 04:24:16 +0000 (23:24 -0500)]
Windows: out of order locks cm_CheckCBExpiration

The recent refactoring of cm_CheckCBExpiration introduced
a lock ordering error between the cm_scache_t rw lock and the
cm_scacheLock.  This patchset fixes the error by dropping the
cm_scacheLock as each cm_scache_t is being processed.

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

Change-Id: I14e57ca1b6b2f86bee585bc6fa86bdf0b7d77d44
Reviewed-on: http://gerrit.openafs.org/3872
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoDo not compare an FD_t < 0
Rod Widdowson [Fri, 28 Jan 2011 16:49:03 +0000 (16:49 +0000)]
Do not compare an FD_t < 0

FD_t is an abstract type.  Invalid file decriptors are == INVALID_FD.
In most places this module does the right thing.  Fix the last
stragglers where it is testing as less than zero.

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

Change-Id: I8f676c45794ecf53af65e9b3089c7b2d075089bb
Reviewed-on: http://gerrit.openafs.org/3871
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agolinux: 2.6.38: Make d_revalidate RCU-walk aware
Marc Dionne [Tue, 25 Jan 2011 23:18:56 +0000 (18:18 -0500)]
linux: 2.6.38: Make d_revalidate RCU-walk aware

Signal to the vfs that we don't support path RCU walk in
d_revalidate.  It will call back in non-RCU mode.

(cherry picked from commit 52556d50298e4a636f07e9a3cf0b6557c882c82d)
Reviewed-on: http://gerrit.openafs.org/3759
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I44d8577feba382a193d1f1735a05db74c3151df0
Reviewed-on: http://gerrit.openafs.org/3870
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agolinux: 2.6.38: New d_op handling
Marc Dionne [Tue, 25 Jan 2011 22:17:21 +0000 (17:17 -0500)]
linux: 2.6.38: New d_op handling

In 2.6.38, the super block structure has a new field to hold the
default dentry ops.  The vfs will automatically set it for new
dentries in most cases.

Set s_d_op to our set of operations, and omit setting the dentry
ops where the vfs will already do it (and where new locking rules
prohibit it).

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

Change-Id: Ia108e8c7c624521965bdbddd7a37ebf281eb7967
Reviewed-on: http://gerrit.openafs.org/3869
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoRX: Avoid retrying calls on busy channels
Andrew Deason [Thu, 2 Dec 2010 23:13:17 +0000 (17:13 -0600)]
RX: Avoid retrying calls on busy channels

When we receive an RX_PACKET_TYPE_BUSY packet, we currently ignore it.
This is a problem when the server has a long-running call on that same
call channel that we don't know about, since we will then keep
retrying the call on the same channel and keep getting
RX_PACKET_TYPE_BUSY responses.

Try to avoid this by returning the RX_CALL_TIMEOUT error when we get a
BUSY packet and there are other free call channels available on the
conn. When the application gets the error and retries the call, we
avoid using the same call channel again where possible. When all of
the call channels appear busy, we revert to effectively the old
behavior of retrying the call on the same channel until we get an
RX_CALL_DEAD (or similar) error.

FIXES 128671

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

Change-Id: I098c482a6a5b9f34907e9f8f40913df40c5b5d4b
Reviewed-on: http://gerrit.openafs.org/3763
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: Correct cm_volume locking
Jeffrey Altman [Thu, 27 Jan 2011 01:10:57 +0000 (20:10 -0500)]
Windows: Correct cm_volume locking

cm_volume_t flags was used for two categories of flags.  The first
protected by the cm_volume_t->rw lock.  The second protected by
the global cm_volumeLock.  Separate the flags field into two
afs_uint16 fields and break the flag space into FLAG and QFLAG.

Add assertions to the volume LRU functions to ensure that they
are always called with cm_volumeLock write-locked.

Correct two locations where cm_AdjustVolumeLRU() was called
read-locked instead of write-locked.

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

Change-Id: I6c60dd770057f665f66bf3cea2d653bbe2524979
Reviewed-on: http://gerrit.openafs.org/3867
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovol-salvage: Only delete bad vnodes during !check
Andrew Deason [Tue, 25 Jan 2011 16:46:38 +0000 (10:46 -0600)]
vol-salvage: Only delete bad vnodes during !check

In SalvageIndex, if check is true, we're only supposed to check for
consistency and not actually change anything (this is enforced by an
assert later on). The check for vnode magic consistency breaks this
assumption, and just always fixes the vnode.

Change this so we just error out if check is set, and the vnode magic
is wrong.

Reviewed-on: http://gerrit.openafs.org/3756
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 5817a13b84496c087b350be50c17a8b0f9aac9d5)

Change-Id: I1b12c56d680111ba71b611ab9bbb6159a35dd14e
Reviewed-on: http://gerrit.openafs.org/3866
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: cm_GiveUpAllCallBacksAllServersMulti()
Jeffrey Altman [Thu, 2 Dec 2010 05:36:58 +0000 (00:36 -0500)]
Windows: cm_GiveUpAllCallBacksAllServersMulti()

Implement a multi_RXAFS_GiveUpAllCallBacks version of
cm_GiveUpAllCallBacksAllServers() and use it in place of
the non-multi version.

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

Change-Id: I99660917d9f658cb95be6655aa9fb30cdf73b164
Reviewed-on: http://gerrit.openafs.org/3865
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: fix parameters and return value from nt_seek
Rod Widdowson [Sun, 23 Jan 2011 14:29:51 +0000 (14:29 +0000)]
Windows: fix parameters and return value from nt_seek

SetFilePointerEx takes specific values
(FILE_BEGIN/FILE_CURRENT/FILE_END) whilse fseek requires SEEK_SET,
SEK_END, SEEK_CUR.  It turns out that these overlap, but we should
not let that pass unchallenged.

SetFilePointerEx returns nonzero for success zero for failure. fseek
returns the other way around.

Neither of these changes currently matter, but we should fix them.

Reviewed-on: http://gerrit.openafs.org/3746
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 4f838b03bbf9ea0e1ede8a188ea6dde3efb4e231)

Change-Id: I295d172e8f14bc50facf38f08e3dc3af02b7404b
Reviewed-on: http://gerrit.openafs.org/3864
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: read and write take void* buffers, open takes a const char*
Rod Widdowson [Sun, 23 Jan 2011 10:59:28 +0000 (10:59 +0000)]
Windows: read and write take void* buffers, open takes a const char*

nt_read and nt_write were defined to take a char* buffer which was
then cast to a void *.  Meantime every call of OS_READ and
OS_WRITE were casting to a char*.

Equally every call of OS_OPEN was passing down a const char*,
causing warnings.

This checkin fixes this:
 nt_read : char* to void*
 nt_write: char* to const void*
 nt_open char*  to const char*

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

Change-Id: Ib07ea6d1e0dad935717810c1279cc7f38645e229
Reviewed-on: http://gerrit.openafs.org/3863
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoOpenBSD: Eliminate complaint about built-in malloc.
Antoine Verheijen [Mon, 24 Jan 2011 07:38:03 +0000 (00:38 -0700)]
OpenBSD: Eliminate complaint about built-in malloc.

With OpenBSD 4.8, OpenBSD now uses gcc 4. With its new
defaults, the OpenAFS compile of the kernel module now
complains incessantly about the conflict between the
built-in malloc versus the kernel version (which has
extra parameters). Therefore, set -fno-builtin-malloc
when compiling the kernel module to remove the noise
since the differences can't be reconciled otherwise.

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

Change-Id: I311d9c642d6272acd229a64a6a72eedf7dd39018
Reviewed-on: http://gerrit.openafs.org/3862
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoOpenBSD: Remove user.h from dir.c for OpenBSD 4.8
Antoine Verheijen [Mon, 24 Jan 2011 07:34:56 +0000 (00:34 -0700)]
OpenBSD: Remove user.h from dir.c for OpenBSD 4.8

OpenBSD 4.8 no longer needs to include h/user.h in dir.c
and it's presence now gets in the way of the compile so
remove it.

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

Change-Id: I7f46c816f6fcd8ce6018f5e93f2ea0044b221b51
Reviewed-on: http://gerrit.openafs.org/3861
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: remove unused label in ntops.c
Rod Widdowson [Sun, 23 Jan 2011 14:32:04 +0000 (14:32 +0000)]
Windows: remove unused label in ntops.c

The label 'retry' in nt_open is not used and was causing a warning.  Remove it.

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

Change-Id: I7887e4ba31556b2bf6b1e2a4867aecd1e8b41297
Reviewed-on: http://gerrit.openafs.org/3860
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: remove faulty assumptions about device names in vol-salvage
Rod Widdowson [Sun, 23 Jan 2011 12:04:59 +0000 (12:04 +0000)]
Windows: remove faulty assumptions about device names in vol-salvage

The implementation has an assumption that all disk volumes have an
object name of \Device\HarddiskXXX (where XXX is a number).  This is
wrong since the name is purely a convention and since about WXP they
have been called \Device\HarddiskVolumeXXX.

Either way it is spurious to assume the format and then try to compare
the XXX.  This change just compares the strings.  This is done in a
case insenstive manner which is the safer option.  It is quite
feasible, but very unlikely that someone will uses 'case sensitively
different' object names.

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

Change-Id: I3f69c2a8f76d073afcfe626eec45be9942bf4042
Reviewed-on: http://gerrit.openafs.org/3859
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: more exports afsauthent.dll
Jeffrey Altman [Sat, 22 Jan 2011 01:13:45 +0000 (20:13 -0500)]
Windows: more exports afsauthent.dll

pr_SIdToName
afsconf_GetExtendedCellInfo
afsconf_UpToDate

required for new Explorer Shell functionality

(cherry picked from commit f60bca943f7bc6352a5f7beedbb7ca47559f3513)
Reviewed-on: http://gerrit.openafs.org/3739
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stefan Kueng <tortoisesvn@gmail.com>
Tested-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I0363885c915a9c97bb6f290b5a16d184b244b0b3
Reviewed-on: http://gerrit.openafs.org/3858
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: log and invalidate invalid dir pages
Jeffrey Altman [Sat, 22 Jan 2011 17:15:03 +0000 (12:15 -0500)]
Windows: log and invalidate invalid dir pages

If when parsing a directory page in cm_ApplyDir the consistency
checks fail, log a message and invalidate the page in case
it was a transient failure.

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

Change-Id: I76cd2738df31b1609d0065ac2706a86f75d8a269
Reviewed-on: http://gerrit.openafs.org/3857
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: fix CreateFile params nt_unlink and nt_open
Jeffrey Altman [Thu, 20 Jan 2011 07:15:18 +0000 (02:15 -0500)]
vol: fix CreateFile params nt_unlink and nt_open

nt_unlink: when opening a file handle to assign delete on close
status the caller must request DELETE permission.

nt_open: make sure that DELETE permission along with FILE_SHARE_DELETE
is requested if we wish to permit another CreateFile call in the future
to assign delete on close.

Reviewed-on: http://gerrit.openafs.org/3711
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 5fdc2679dc973fa45bf4b3bc7f21a527492868db)

Change-Id: I63855a65c5e209dc7b601e5b5b67ccb21bfb653c
Reviewed-on: http://gerrit.openafs.org/3856
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: namei_ops improve readability; fix namei_create on Windows
Jeffrey Altman [Thu, 20 Jan 2011 07:19:03 +0000 (02:19 -0500)]
vol: namei_ops improve readability; fix namei_create on Windows

use NAMEI_SPECDIRC, NAMEI_INODESPECIAL, INVALID_FD and other
preprocessor symbols in place of numeric constants.

namei_create() on Windows must call namei_CreateDataDirectories()
and retry if the afs_open() call fails with either ENOTDIR or
ENOENT.

modify namei_HandleToName() on Windows to make its decision
process clearer.

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

Change-Id: I4d55a7e3e8d0f942058d568c8f2f9f1ae1855044
Reviewed-on: http://gerrit.openafs.org/3855
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: add comment nt_unlink cannot with fopen handles
Jeffrey Altman [Thu, 20 Jan 2011 07:06:12 +0000 (02:06 -0500)]
vol: add comment nt_unlink cannot with fopen handles

On Windows, files opened via the CRT fopen or open
POSIX compatibility functions cannot be marked for delete
on close.  Add a comment until such time as the use of
fopen and open on Windows can be replaced.

Reviewed-on: http://gerrit.openafs.org/3707
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
(cherry picked from commit eb6f3a89a3f4da6d3de2d4ae34743014e4eb0fb2)

Change-Id: I6d66617b53f46e832d72ac8ed9a41730fafca521
Reviewed-on: http://gerrit.openafs.org/3854
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: remove potential data loss warnings in vol-salvage.c
Jeffrey Altman [Thu, 20 Jan 2011 07:03:56 +0000 (02:03 -0500)]
vol: remove potential data loss warnings in vol-salvage.c

afs_sfsize_t is not always the same size as 'int'.
Avoid warnings by using afs_sfsize_t in the appropriate locations.

Change-Id: If77379b17fa984e3dacd2740726b7309a0e640dd
Reviewed-on: http://gerrit.openafs.org/3706
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-on: http://gerrit.openafs.org/3853

14 years agoUse afs_foff_t for file offsets
Andrew Deason [Wed, 10 Nov 2010 15:11:47 +0000 (09:11 -0600)]
Use afs_foff_t for file offsets

Some callers in vol and volser were not using afs_foff_t for file
offsets for calls to STREAM_ASEEK, FDH_TRUNC, FDH_PREAD, or
FDH_PWRITE. Most notably, in code for volume cloning, purging, and
dumping operations. Fix them to use afs_foff_t to prevent errors when
dealing with large special files.

Reviewed-on: http://gerrit.openafs.org/3289
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 ef8c3db90ae9ec25705027c609a1bae5f186c4f1)

Change-Id: I17910490484efcd812f45dfeef1a99d6e450f5fa
Reviewed-on: http://gerrit.openafs.org/3894
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: use OS_UNLINK instead of unlink
Jeffrey Altman [Thu, 20 Jan 2011 06:59:46 +0000 (01:59 -0500)]
vol: use OS_UNLINK instead of unlink

Use OS_UNLINK in order to ensure that platform specific
unlink functions are called.  OS_UNLINK is unlink on Unix.

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

Change-Id: Ib3207b7c365b9ede5299bdbc7626e63450198ad7
Reviewed-on: http://gerrit.openafs.org/3851
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: fix namei_ListAFSSubDirs on Windows
Jeffrey Altman [Thu, 20 Jan 2011 06:56:33 +0000 (01:56 -0500)]
vol: fix namei_ListAFSSubDirs on Windows

The directory level represented by 'dirp2' does not exist on
Windows.  Do not attempt to close the DIR object that was
never opened.

Remove unnecessary function prototypes.

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

Change-Id: I640d834f0bfd6490cf43183843d771f792f7fc06
Reviewed-on: http://gerrit.openafs.org/3850
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: use correct file name base for temporary file
Jeffrey Altman [Thu, 20 Jan 2011 07:01:38 +0000 (02:01 -0500)]
vol: use correct file name base for temporary file

Inconsistent use of temporary file name bases resulted in
the temporary files never being deleted.

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

Change-Id: Ia66d30fec2633bc2fbb8a6fcc5fd42a9fc9cace0
Reviewed-on: http://gerrit.openafs.org/3852
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: use OS_DIRSEP in many more places
Jeffrey Altman [Thu, 20 Jan 2011 06:51:26 +0000 (01:51 -0500)]
vol: use OS_DIRSEP in many more places

For consistency use OS_DIRSEP and OS_DIRSEPC throughout the
package.

(cherry picked from commit 259a0e886a29874420010544e33a789cac1692c1)
Reviewed-on: http://gerrit.openafs.org/3702
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Change-Id: Id18bbe7759bc96f83c7a00a0a8698a868fc54c2a
Reviewed-on: http://gerrit.openafs.org/3900
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: nt_open should not create missing directories
Jeffrey Altman [Thu, 20 Jan 2011 07:11:57 +0000 (02:11 -0500)]
vol: nt_open should not create missing directories

Revert the prior change that added directory creation
to nt_open().  nt_open() should fail and the caller should
create the directories.  Failure to do so results in an
incomplete tree which confuses the salvager.

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

Change-Id: I4669ee27bd5c3d9100f3e7fc880d6c32e990493f
Reviewed-on: http://gerrit.openafs.org/3844
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: Make ntops functions 64-bit capable
Jeffrey Altman [Thu, 20 Jan 2011 07:09:44 +0000 (02:09 -0500)]
vol: Make ntops functions 64-bit capable

Add 64-bit offset and length support to ntops functions.

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

Change-Id: I5a39e1c255cf5a28e53e9f96d4faf8a6a7e7ebf6
Reviewed-on: http://gerrit.openafs.org/3843
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: avoid defining unused struct on windows
Jeffrey Altman [Thu, 20 Jan 2011 06:33:27 +0000 (01:33 -0500)]
vol: avoid defining unused struct on windows

namei_ogm_t is not used on Windows.  There is no equivalent
to owner/group mode.

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

Change-Id: I6f7c5dc22e45f4da45ebc391512e4a296fe4b2ca
Reviewed-on: http://gerrit.openafs.org/3842
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: indent cpp definitions; add NAMEI_SPECDIRC
Jeffrey Altman [Thu, 20 Jan 2011 06:31:41 +0000 (01:31 -0500)]
vol: indent cpp definitions; add NAMEI_SPECDIRC

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

Change-Id: I7ab38f6df8892ca6c6e238e22847efdbaec45242
Reviewed-on: http://gerrit.openafs.org/3841
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: remove [UN]LOCKFILE data loss warnings on Windows
Jeffrey Altman [Thu, 20 Jan 2011 06:20:05 +0000 (01:20 -0500)]
vol: remove [UN]LOCKFILE data loss warnings on Windows

Cast to DWORD since the results of the mask and shift
are guaranteed to be 32-bit.  This avoids sixteen warnings.

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

Change-Id: Ic9a17074ce76d1676bb7d83e2e17d7c50e1c45a0
Reviewed-on: http://gerrit.openafs.org/3840
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: fix _namei_examine_reg DELETE_ZLC usage
Jeffrey Altman [Thu, 20 Jan 2011 06:45:29 +0000 (01:45 -0500)]
vol: fix _namei_examine_reg DELETE_ZLC usage

replace 'i' with 'dirl' and assign the new variable a value
before using it.

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

Change-Id: I9c7bb592516f609174fbf2a7b3bb6b5e0e81ba72
Reviewed-on: http://gerrit.openafs.org/3848
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: make it clearer that SetOGM is not impl on Windows
Jeffrey Altman [Thu, 20 Jan 2011 06:39:11 +0000 (01:39 -0500)]
vol: make it clearer that SetOGM is not impl on Windows

Separate the SetOGM function into two implementations to
match the other OGM functions.  Implement the Windows version
as returning -1 always.

In the future, the OGM functions could be renamed to express
their purpose: saving and restoring the volume id and tag
associated with a file.   Windows currently encodes this
information using the CreationDate and the file name but
in the future this information might be stored in an alternate
data stream.

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

Change-Id: I347fb7b135c6fccb941ca4e34b3fb4f080f5b09c
Reviewed-on: http://gerrit.openafs.org/3847
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: avoid double dir separators from addtoname
Jeffrey Altman [Thu, 20 Jan 2011 06:35:08 +0000 (01:35 -0500)]
vol: avoid double dir separators from addtoname

The manner in which addtoname() is used can often result
in double dir separators in path names.  Check for it and
avoid doubling the separator in addtoname()

Reviewed-on: http://gerrit.openafs.org/3699
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 959a892afcc1f33871489912a8ea183fc7fca6c2)

Change-Id: Ic9942f08af4ce45310bfffae5922c67a0655774d
Reviewed-on: http://gerrit.openafs.org/3846
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: clear ih_synced before dropping lock
Jeffrey Altman [Thu, 20 Jan 2011 06:23:37 +0000 (01:23 -0500)]
vol: clear ih_synced before dropping lock

in ih_reallyclose() clear ihP->ih_synced before dropped
the IH_LOCK.  ih_reallyclose() is already committed to
performing the OS_SYNC() call.  Failing to clear the ih_synced
flag before dropping the lock permits another thread, the ih_sync_all()
thread for example, to also conclude that it must sync the
file.

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

Change-Id: I18baf1e1cd409a108845c2db2cb38144593016c8
Reviewed-on: http://gerrit.openafs.org/3845
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoMacOS: panic decoder should check for unloaded kexts
Derrick Brashear [Wed, 19 Jan 2011 19:58:59 +0000 (14:58 -0500)]
MacOS: panic decoder should check for unloaded kexts

if the openafs kext was unloaded from under us, try to handle that.

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

Change-Id: Iaa0ac75de42424411ea66f04afdf0e8303aa4adc
Reviewed-on: http://gerrit.openafs.org/3839
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovolser: select() cannot be used to sleep on windows
Jeffrey Altman [Sun, 16 Jan 2011 21:42:15 +0000 (16:42 -0500)]
volser: select() cannot be used to sleep on windows

On Windows must use Sleep() instead of select() with no
fd_set parameters.

Reviewed-on: http://gerrit.openafs.org/3675
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
(cherry picked from commit 26f0ddd0cd3c7c34880e8717d59ee1d653036455)

Change-Id: I14ee3664bc247a432e8b350f78c7b7e56b8232b2
Reviewed-on: http://gerrit.openafs.org/3838
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: refactor cm_CheckCBExpiration multihomed
Jeffrey Altman [Sun, 16 Jan 2011 20:49:02 +0000 (15:49 -0500)]
Windows: refactor cm_CheckCBExpiration multihomed

cm_CheckCBExpiration() is refactored to make it easier
to read the decision process.  cm_CheckCBExpiration()
determines when a callback is no longer usable and as a
result the object status info should be discarded.

The windows cache manager preserves status info past
callback expiration if all of the sources of a volume
became inaccessible prior to the callback expiration
time.  The cache manager was improperly preserving the
status info for objects when the callback was issued by
a multi-homed file server when only the interface that
issued the callback is down.

A separate cm_server_t object is used to represent
each file server interface.  When one interface goes
down and others are left up, the cache manager will
now replace the down cm_server_t reference for one that
is up.  This substitution is performed as a side effect
of computing the effective downTime in cm_CBServersDownTime().

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

Change-Id: I43e05dde3d2f12d2130b34125a6103b22f0259e9
Reviewed-on: http://gerrit.openafs.org/3837
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: use cm_ServerEqual() in cm_Analyze()
Jeffrey Altman [Fri, 14 Jan 2011 05:22:39 +0000 (00:22 -0500)]
Windows: use cm_ServerEqual() in cm_Analyze()

In cm_Analyze() when processing VNOVOL, VMOVED or VOFFLINE errors
do not use pointer equivalence as the test to determine if a
server is affected by the error.  Use cm_ServerEqual() instead.

Fix cm_ServerEqual() to work even when both cm_server_t objects
are not UUID aware.

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

Change-Id: Iabebbb0e620c42898b428352ea2ec3cb64de8d74
Reviewed-on: http://gerrit.openafs.org/3836
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: Windows requires binary fmode for salvaged
Andrew Deason [Mon, 17 Jan 2011 18:35:46 +0000 (12:35 -0600)]
vol: Windows requires binary fmode for salvaged

Same as 98f633c60d20834cee0bbc0770a3146b06642a59, but for the
salvageserver.

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

Change-Id: I953a780f61ce377179829d4e42e9aab76b3a8f4d
Reviewed-on: http://gerrit.openafs.org/3835
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: use OS_UNLINK() instead of unlink()
Jeffrey Altman [Sat, 15 Jan 2011 16:49:54 +0000 (11:49 -0500)]
vol: use OS_UNLINK() instead of unlink()

OS_UNLINK provides the platform specific mechanism
for unlinking objects.

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

Change-Id: I58a6acbe7328faa1d0118073f24321ead378efe4
Reviewed-on: http://gerrit.openafs.org/3834
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: construct proper VolDir path on Windows
Jeffrey Altman [Sat, 15 Jan 2011 16:54:40 +0000 (11:54 -0500)]
vol: construct proper VolDir path on Windows

namei_HandleToInodeDir initializes the path name with
the nt_drive value.  Therefore calling addtoname(name, name->n_drive)
produces the invalid path "D:\D:\\Vol_.....".  Remove the unnecessary
addtoname() call.

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

Change-Id: Icd7c6225b80d77184e6a15df0dbb4fd0dfcd0506
Reviewed-on: http://gerrit.openafs.org/3833
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: fdHandleAllocateChunk should init all fields
Jeffrey Altman [Sat, 15 Jan 2011 16:52:45 +0000 (11:52 -0500)]
vol: fdHandleAllocateChunk should init all fields

fdHandleAllocateChunk() failed to initialize the fd_ihnext
and fd_ihprev fields.

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

Change-Id: I9fa401cb4ddec886a3f39ddfb926ce0be8cfa96e
Reviewed-on: http://gerrit.openafs.org/3832
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: use OS_DIRSEP when constructing paths
Jeffrey Altman [Sat, 15 Jan 2011 16:47:47 +0000 (11:47 -0500)]
vol: use OS_DIRSEP when constructing paths

Do not assume that / is the directory separator when constructing
paths for internal consumption or log messages.  Use OS_DIRSEP
or OS_DIRSEPC as appropriate.

(cherry picked from commit 47e2149335066883450cb2a751bd057dcd1af79d)
Reviewed-on: http://gerrit.openafs.org/3669
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Change-Id: Ic6fbe73ec112994079816942b3456fe95c193200
Reviewed-on: http://gerrit.openafs.org/3831
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: make namei_ListAFSSubDirs deal with multiple/bad linktables
Tom Keiser [Thu, 14 Oct 2010 05:24:03 +0000 (01:24 -0400)]
vol: make namei_ListAFSSubDirs deal with multiple/bad linktables

The salvager ends up deadlocking when multiple linktables exist
in the same volume group special directory.  The issue is that we
open and flock all discovered linktables, but only close out the
last one found.  Consequently, when our child scans the linktables
again, we deadlock against the locked and leaked descriptor(s) our
parent left around before forking.

While we have so far been unable to root-cause the actual creation
of spurious linktables, this patch will at least stop the salvager
from deadlocking against itself when this occurs.

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

Change-Id: Ifd81e41258b1974b4b6e0df893fa37387bc48757
Reviewed-on: http://gerrit.openafs.org/3889
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovolser: use OS_CLOSE() instead of close()
Jeffrey Altman [Sat, 15 Jan 2011 16:44:08 +0000 (11:44 -0500)]
volser: use OS_CLOSE() instead of close()

Use OS_CLOSE() instead of close() when closing vol package
allocated file descriptors.  On Windows, close() != nt_close().

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

Change-Id: I40114c0cf071a18612bb1ed29d18ab145f466dec
Reviewed-on: http://gerrit.openafs.org/3830
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: initialize FdHandle_t stack objects
Jeffrey Altman [Sat, 15 Jan 2011 16:39:39 +0000 (11:39 -0500)]
vol: initialize FdHandle_t stack objects

In namei_create() a temporary FdHandle_t is allocated on
the stack but was never initialized.  Depending on what
prior data was on the stack the FdHandle_t could result
in subsequent operations failing in unpredictable ways.

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

Change-Id: I44913419e09b36a3581320cd169bbc4774cd0208
Reviewed-on: http://gerrit.openafs.org/3829
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: Fix ntops to provide expected semantics
Jeffrey Altman [Sat, 15 Jan 2011 16:07:19 +0000 (11:07 -0500)]
vol: Fix ntops to provide expected semantics

nt_open() can be asked to open a file with a path containing
directory components that do not yet exist.  Modify nt_open()
to automatically create directories if necessary.

nt_read() and nt_pread() should not treat partial reads due
to reaching EOF as an error.  Instead, return the bytes read.

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

Change-Id: I4a4c8a4894aa25bec883154cb73d1ee24986ba15
Reviewed-on: http://gerrit.openafs.org/3828
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agomerge ntops and namei
Derrick Brashear [Thu, 28 Oct 2010 05:03:49 +0000 (01:03 -0400)]
merge ntops and namei

instead of having 2 implementations of nearly the same thing,
merge what we can. this can get closer, probably, but this is
a start.

(cherry picked from commit a8d1fe61f4a0d906d4086b71c88b0a3ab278b12c)
Reviewed-on: http://gerrit.openafs.org/3180
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Change-Id: Ieaf8b87862a692559971b2a54882a485590a715d
Reviewed-on: http://gerrit.openafs.org/3827
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoParallel I/O extensions to namei backend
Andrew Deason [Thu, 11 Mar 2010 18:19:47 +0000 (12:19 -0600)]
Parallel I/O extensions to namei backend

This adds the ability for certain namei operations (currently only
ListViceInodes) to occur across multiple different threads in
parallel. Currently this is only enabled when built with the
not-yet-existant AFS_SALSRV_ENV.

Originally written by Tom Keiser.

(cherry picked from commit 0a4a03ae68bea51a74a4ef496d50a800bd3e0cbd)
Reviewed-on: http://gerrit.openafs.org/1864
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I2fa3aa60a13c81e0a0bc7ffb5b323ec7580f560f
Reviewed-on: http://gerrit.openafs.org/3826
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoihandle positional read and write
Michael Meffie [Mon, 15 Mar 2010 17:42:23 +0000 (12:42 -0500)]
ihandle positional read and write

When available, use POSIX positional read and write
calls in the ihandle package. Originally written
by Derrick Brashear and Andrew Deason.

(cherry picked from commit 335ccb4082657b7d0e4e9af1076356cf115642d2)
Reviewed-on: http://gerrit.openafs.org/1562
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I6616a8f7ba04410c57097fb6fa687258b847ac4e
Reviewed-on: http://gerrit.openafs.org/3884
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agowindows: native versions of ih_pread and ih_pwrite
Rod Widdowson [Wed, 27 Oct 2010 22:20:30 +0000 (00:20 +0200)]
windows: native versions of ih_pread and ih_pwrite

Separate the windows code out in ihandle.c to reduce dependency on ntops.

As an aid to future threading issues, pass the offset in an OVERLAP
rather than doing a separate SetFilePointerEx.

Reviewed-on: http://gerrit.openafs.org/3176
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 50b6a116a1c412d0e6d7442d13d6e92c9dbb35ee)

Change-Id: Iaa340515bf36d249d4f2160b55c3fbb267bb90ee
Reviewed-on: http://gerrit.openafs.org/3825
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: Windows requires binary fmode for salvager
Jeffrey Altman [Sat, 15 Jan 2011 16:04:48 +0000 (11:04 -0500)]
vol: Windows requires binary fmode for salvager

In order for salvager to work properly it must read and
write data in binary mode.  On Windows, this is accomplished
by calling _set_fmode(_O_BINARY) to set the default mode for
fopen(), etc.

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

Change-Id: Ibfdbcb9e2da6216f31f7a73d42acafa59b651350
Reviewed-on: http://gerrit.openafs.org/3824
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol: fix OS_LOCKFILE/OS_UNLOCKFILE for Windows
Jeffrey Altman [Sat, 15 Jan 2011 16:01:55 +0000 (11:01 -0500)]
vol: fix OS_LOCKFILE/OS_UNLOCKFILE for Windows

On UNIX the OS_LOCKFILE and OS_UNLOCKFILE macros return zero
on success.  Since Windows LockFile() and UnlockFile() return
non-zero (TRUE) on success, negate the return value as part
of the macro definition.

(cherry picked from commit e8e69d5b2c611df249fd613ed068fc030a0e30d1)
Reviewed-on: http://gerrit.openafs.org/3664
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Change-Id: Ifc9f7efcafee5a17fcf112556184be0072deb108
Reviewed-on: http://gerrit.openafs.org/3823
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: fixup gettmpdir()
Jeffrey Altman [Fri, 14 Jan 2011 05:15:10 +0000 (00:15 -0500)]
Windows: fixup gettmpdir()

Use InterlockedCompareExchangePointer for hostparse()
instead of fudging it and leaking memory.

If the max path length is MAX_PATH must allocate MAX_PATH+1.

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

Change-Id: I2183cd52298ea1d1204102fee66dea4755de3b41
Reviewed-on: http://gerrit.openafs.org/3820
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: osilog param size is size_t
Jeffrey Altman [Fri, 14 Jan 2011 05:13:49 +0000 (00:13 -0500)]
Windows: osilog param size is size_t

The parameter size is size_t which permits pointers to be stored
on 32-bit and 64-bit systems.  Make sure we store it as size_t
instead of truncating to long.

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

Change-Id: Ifff3cc8d9424c74d39a792f83b838965af95faea
Reviewed-on: http://gerrit.openafs.org/3819
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agorpm: don't package files twice
Stephan Wiesand [Sat, 8 Jan 2011 16:13:27 +0000 (17:13 +0100)]
rpm: don't package files twice

The LICENSE and two manpages were included in the main
package as well as one of the others. Remove duplicate entries.

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

Change-Id: I4120181c4384aa0f3f6f4c016c594d45cf037921
Reviewed-on: http://gerrit.openafs.org/3818
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agogit-version: Do not specify --ignore-submodules
Andrew Deason [Sat, 8 Jan 2011 01:48:18 +0000 (20:48 -0500)]
git-version: Do not specify --ignore-submodules

Only new git versions reognize the --ignore-submodules option to
diff-index and diff-files. Do not pass this, to make git-version more
likely to work across different versions, as we don't have any
submodules in the tree anyway.

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

Change-Id: Iae527081b431863fa1eae418b8468741f75f3f2e
Reviewed-on: http://gerrit.openafs.org/3817
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: refactor buf_Get() to improve readability
Jeffrey Altman [Sat, 8 Jan 2011 17:21:23 +0000 (12:21 -0500)]
Windows: refactor buf_Get() to improve readability

Refactor buf_Get() by using a switch() instead of a jumble
of if() conditionals.

Improve comments to make it clear that given the current
use and implementation of cm_BufRead() from cm_dcache.c
that created buffer pages will never be populated with
actual data.

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

Change-Id: I32ff33df359fb7794e9cf47c2027eb48363c80eb
Reviewed-on: http://gerrit.openafs.org/3816
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: remove all refs to unused buf_GetNew()
Jeffrey Altman [Sat, 8 Jan 2011 17:19:07 +0000 (12:19 -0500)]
Windows: remove all refs to unused buf_GetNew()

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

Change-Id: Ideb8532a8de53152aa902834d7dd012a464ad000
Reviewed-on: http://gerrit.openafs.org/3815
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: remove unused vars from cm_server.c
Jeffrey Altman [Tue, 4 Jan 2011 16:18:25 +0000 (11:18 -0500)]
Windows: remove unused vars from cm_server.c

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

Change-Id: Ie0afcd7a98520b06830ef919377630a7e9526036
Reviewed-on: http://gerrit.openafs.org/3814
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: permit clean when switching platforms
Jeffrey Altman [Tue, 4 Jan 2011 02:07:10 +0000 (21:07 -0500)]
Windows: permit clean when switching platforms

When switching between i386 and amd64 in the same build tree
the "clean" make directive would fail due to NTLang.bat not
having been built in the new platform's destination directory.
Force NTLang.bat to be built as a dependency of cleanup and
delete it at the end along with the version files.

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

Change-Id: Ia215c34f06976dee588292fccb7396a49ab98035
Reviewed-on: http://gerrit.openafs.org/3813
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoAdd "brief" option to rxgen
Simon Wilkinson [Sun, 14 Feb 2010 10:01:14 +0000 (10:01 +0000)]
Add "brief" option to rxgen

Add a new -b option to rxgen that turns on "brief" output. This makes a
number of changes to the data definitions produced by rxgen so they can
be more easily used by the calling code.

The changes are:
   *) Use the new struct rx_opaque structure for all opaque data
      definitions, rather than defining each as a unique structure.
      This permits moving opaque data between rxgen structures to be
      performed by simple assignment.
   *) Use anonymous structures for internal definitions. Currently
      rxgen also uses the field name as the structure name, which
      prevents the use of a field name more than once within a
      source file.
   *) Don't embed the structure name within the names of the elements
      within the structure. This significantly reduces the length of
      assignment code, and makes for more readable callers.

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

Change-Id: I03adce371f17c8865b469b9b5cb94209395261c2
Reviewed-on: http://gerrit.openafs.org/3812
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: MIT license applies to parsemode()
Vincent Archer [Thu, 30 Dec 2010 16:34:28 +0000 (11:34 -0500)]
Windows: MIT license applies to parsemode()

Vincent Archer grants permission to OpenAFS to re-license
his MINIX contributions under the MIT license.  A copy of the
e-mail granting permission is located in OpenAFS RT issue 128805.

FIXES 128805

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

Change-Id: I4ccd8e976185b98536e061a20be43805db619a4a
Reviewed-on: http://gerrit.openafs.org/3811
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: buf_CleanAsync scp->fid == bp->fid
Jeffrey Altman [Wed, 29 Dec 2010 16:35:17 +0000 (11:35 -0500)]
Windows: buf_CleanAsync scp->fid == bp->fid

If buf_CleanAsync or buf_CleanAsyncLocked are called
with a non-NULL cm_scache_t parameter, that status object's
fid must be the same as the associated cm_buf_t object.
If not, the wrong locks will be held.

If the cm_scache_t parameter is NULL and cm_FindSCache()
returns NULL, it means that the cm_scache_t object associated
with the bp->fid has been flushed from the cache.  cm_GetSCache()
must therefore be called to allocate a new status object for the
FID.  If the status object cannot be allocated, then any dirty
data stored in the buffer will be discarded.

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

Change-Id: I41b190d15bff93be656c6f844a740cce9812ae04
Reviewed-on: http://gerrit.openafs.org/3810
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: fs checkserver skip multi-homed up server
Jeffrey Altman [Tue, 28 Dec 2010 19:39:47 +0000 (14:39 -0500)]
Windows: fs checkserver skip multi-homed up server

Multi-homed file servers can be detected by comparing the
uuid for the cm_server_t entries.  If a server has at least
one up interface, do not list it as being down in the "fs checkserver"
response list.

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

Change-Id: Idc6ae445bc9fad467dede51d5885646bb610c0ef
Reviewed-on: http://gerrit.openafs.org/3809
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: fs checkservers should list vldb as well
Jeffrey Altman [Thu, 23 Dec 2010 04:23:48 +0000 (23:23 -0500)]
Windows: fs checkservers should list vldb as well

The Windows fs checkservers has only listed offline
file servers.  Include vldb as well to match the Unix
cache manager.

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

Change-Id: Ic8053f7307ee937add5e0d5b9e35c03cf8ccb302
Reviewed-on: http://gerrit.openafs.org/3808
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovos: do not mix memory allocation methods
Jeffrey Altman [Tue, 28 Dec 2010 00:34:14 +0000 (19:34 -0500)]
vos: do not mix memory allocation methods

ListVLDB mixed memory allocated with xdr_alloc() and memory
allocated with malloc().  This is not safe to do since it is
possible on some platforms for xdr_alloc() to allocated memory
using a method other than the malloc() linked to the vos
executable.

Instead of stealing the xdr_alloc()'d buffer, allocate a new
buffer and copy the contents.

Reviewed-on: http://gerrit.openafs.org/3600
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 463b045b9fe4a412877c2a65f5deafb1442c1bf1)

Change-Id: I64f43459a212ceb1b4f89e45a9827fc7b981ff6e
Reviewed-on: http://gerrit.openafs.org/3807
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: separate parsemode from fs into own file
Jeffrey Altman [Fri, 24 Dec 2010 18:36:51 +0000 (13:36 -0500)]
Windows: separate parsemode from fs into own file

Separate parsemode() from fs.c into parsemode.c.

Restructure the function prototypes and the fs.h header
to permit building fs.exe from multiple source files.

Reviewed-on: http://gerrit.openafs.org/3591
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 683747b9c4b3d9d77fb8c68df09a59807d027a42)

Change-Id: I3ed5f647631bdd6983a53f4e6a2193aaddf37e0f
Reviewed-on: http://gerrit.openafs.org/3805
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: fs chmod and display mode in fs examine
Jeffrey Altman [Sat, 18 Dec 2010 23:39:07 +0000 (18:39 -0500)]
Windows: fs chmod and display mode in fs examine

Make use of the new pioctl VIOC_GETUNIXMODE and VIOC_SETUNIXMODE
operations to display the current mode in fs examine and permit
setting the mode with "fs chmod".   The mode string parsing makes
use of Vincent Archer's code from Minix.  The required copyright
statement and license is attached to parsemode().

afsconfig-windows.h gains definitions for various mode symbols
that are not defined by Visual Studio runtime headers.

(cherry picked from commit afef1712f28a1c83cfb732d1c4fde7faec4811fc)
Reviewed-on: http://gerrit.openafs.org/3546
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Change-Id: Iaaa70fbef86524df82bc04754276836fff643357
Reviewed-on: http://gerrit.openafs.org/3804
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoafsd: Do not check for /afs if -nomount
Andrew Deason [Mon, 31 Jan 2011 17:18:39 +0000 (11:18 -0600)]
afsd: Do not check for /afs if -nomount

If -nomount was passed, we don't try to mount /afs. So, there is no
reason to require its existence.

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

Change-Id: I58f4a600fe976703412b76d7aeba1e316e08d05b
Reviewed-on: http://gerrit.openafs.org/3877
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: clear mountPointStringp on status change
Jeffrey Altman [Mon, 20 Dec 2010 14:59:43 +0000 (09:59 -0500)]
Windows: clear mountPointStringp on status change

If the data version of the cm_scache_t changes, we must clear
the mountPointString.  Otherwise, if the object is a mountpoint
or symlink, cm_HandleLink() will not attempt to build the new
target string.   The Windows CM never updates the contents of
a mountpoint or symlink.  It always destroys the old and creates
a new one.  However, the Unix CM simply updates the link data.
Apparently, the Windows clients have never noticed.

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

Change-Id: Icabba0b9bb6a1484d3ee3bc21dc6a39343e5491c
Reviewed-on: http://gerrit.openafs.org/3803
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agoWindows: Add VIOC_GETUNIXMODE and VIOC_SETUNIXMODE
Jeffrey Altman [Sat, 18 Dec 2010 23:36:18 +0000 (18:36 -0500)]
Windows: Add VIOC_GETUNIXMODE and VIOC_SETUNIXMODE

Add pioctls to get and set the UNIX mode bits for an
object in AFS.

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

Change-Id: Id80cb41732a6daffa2f03a4313ef3cb9f94b87ea
Reviewed-on: http://gerrit.openafs.org/3802
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: log error code for smb lan thread fail
Jeffrey Altman [Sun, 12 Dec 2010 04:28:02 +0000 (23:28 -0500)]
Windows: log error code for smb lan thread fail

When creation of the smb_LanAdapterChangeThread fails
log the error code as part of the panic message.

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

Change-Id: Ibeb735922101dd89c998746f06f9c56354533506
Reviewed-on: http://gerrit.openafs.org/3801
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: PerformanceTuningInterval Merge error
Jeffrey Altman [Sat, 11 Dec 2010 12:19:54 +0000 (06:19 -0600)]
Windows: PerformanceTuningInterval Merge error

Due to a merge error, if RankServerInterval was set via the
registry, its value would also be used for the
PerformanceTuningInterval.  Fix it.

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

Change-Id: I7ed0ffbffc88c25e6b586d927c8422711d2bd7b8
Reviewed-on: http://gerrit.openafs.org/3800
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoDAFS: Avoid logging harmless LEAVE_OFF failures
Andrew Deason [Wed, 8 Dec 2010 20:57:13 +0000 (14:57 -0600)]
DAFS: Avoid logging harmless LEAVE_OFF failures

The DAFS volserver can create temporary destroyMe volumes, which it
then tells the fileserver to keep offline with an FSYNC_VOL_LEAVE_OFF
message. When the fileserver doesn't know that the volume exists,
currently it responds with SYNC_DENIED, which causes the volserver to
log the error with a "negative response on circuit FSSYNC" message.

These are harmless, though, since leaving a volume offline that the
fileserver does not know about is a no-op. So return the SYNC_FAILED
code instead, which does not get logged, and is more consistent with
some other FSYNC handlers like FSYNC_VOL_DONE.

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

Change-Id: Ib3956cf1035b8d9dbcc985877304837a52f9d760
Reviewed-on: http://gerrit.openafs.org/3799
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoDAFS: Fix VOL_QUERY_VOP error codes
Andrew Deason [Wed, 8 Dec 2010 18:41:44 +0000 (12:41 -0600)]
DAFS: Fix VOL_QUERY_VOP error codes

Volumes in the VOL_STATE_DELETED state effectively do not exist. So,
when receiving an FSYNC_VOL_QUERY_VOP request for a volume, report
FSYNC_UNKNOWN_VOLID for a volume in the VOL_STATE_DELETED state.
Similarly, if the volume exists but on a different partition, we
should return the FSYNC_WRONG_PART reason code.

This allows volumes to be usable by the volume server in some corner
cases. For example, when a volume X exists on partitions A and B, and
the volserver deletes X on B. The fileserver then puts volume X in the
DELETED state, allowing checkouts over fsync, but FSYNC_VOL_QUERY_VOP
reports that no vop exists.

With this change, FSYNC_VOL_QUERY_VOP will instead report that the
volume does not exist, and so FSYNC_VerifyCheckout can succeed for
such volumes.

Reviewed-on: http://gerrit.openafs.org/3493
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 95fc9ece507d3c5bd7914afadaaae9456eea9b7a)

Change-Id: I37e2740af4ad257398325007a1d1e1e4ba3bae45
Reviewed-on: http://gerrit.openafs.org/3798
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoFix AUD_HOST callers
Andrew Deason [Wed, 8 Dec 2010 17:40:24 +0000 (11:40 -0600)]
Fix AUD_HOST callers

Servers using the AUD_HOST audit message should give the host IP in
network-byte order, as that is how the auditing code interprets it.
Fix the users of AUD_HOST that do not do so.

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

Change-Id: I5d8b8059101b147583f006bcdd4abd301721be62
Reviewed-on: http://gerrit.openafs.org/3797
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agotvolser: Link libafsrpc after libusd
Andrew Deason [Tue, 7 Dec 2010 19:49:47 +0000 (13:49 -0600)]
tvolser: Link libafsrpc after libusd

libusd can contain a reference to AssertionFailed, which is in
libafsrpc. So link libafsrpc after libusd, so it gets resolved when
building e.g. vos.

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

Change-Id: I1a4325364e650fb82600e0c2c6ec64fd42912b23
Reviewed-on: http://gerrit.openafs.org/3796
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoDAFS: make FSYNC_VOL_QUERY_VOP DAFS-only
Derrick Brashear [Wed, 8 Dec 2010 02:08:51 +0000 (21:08 -0500)]
DAFS: make FSYNC_VOL_QUERY_VOP DAFS-only

all the support code handles this only for DAFS. the
case statement should treat as unknown if it is.

Reviewed-on: http://gerrit.openafs.org/3485
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 7b7cd95ec0adc2c58b0387a5ff788251127f504e)

Change-Id: I74bf87d251663404e830f30fcbf47275b1aa468a
Reviewed-on: http://gerrit.openafs.org/3795
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoDAFS: fix ifdef
Derrick Brashear [Wed, 8 Dec 2010 01:43:55 +0000 (20:43 -0500)]
DAFS: fix ifdef

there's no DEMAND_ATTACH_ENV ifdef. don't use it.

Reviewed-on: http://gerrit.openafs.org/3484
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit fea0ee62ab854148a354c1aa9ebc5f042448210e)

Change-Id: Ib032930c53b8025e82819e0f82e994b5bdf6c5ba
Reviewed-on: http://gerrit.openafs.org/3794
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: test for path in afs before symlink test
Jeffrey Altman [Tue, 7 Dec 2010 05:02:33 +0000 (00:02 -0500)]
Windows: test for path in afs before symlink test

Check that the path is in afs before testing to see
if it is a symlink

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

Change-Id: I34191b8b67277f5cc8421323a1293c8ebd60c213
Reviewed-on: http://gerrit.openafs.org/3793
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovol_split: Recover from stream open failure
Andrew Deason [Mon, 6 Dec 2010 22:11:24 +0000 (16:11 -0600)]
vol_split: Recover from stream open failure

Make sure we go through the error recovery code when we can't create a
stream, instead of just returning without cleaning up.

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

Change-Id: Iff1053a2ed1789f2a5047a59b8df4fad94e9062c
Reviewed-on: http://gerrit.openafs.org/3792
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: fix checked UNICODE build of talocale
Stefan Kueng [Sun, 5 Dec 2010 17:48:56 +0000 (18:48 +0100)]
Windows: fix checked UNICODE build of talocale

src/WINNT/talocale failed to build/link for checked builds. Fix it.

Reviewed-on: http://gerrit.openafs.org/3446
Tested-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit a433f750ad7f0a3c0adbf4c5d6221b7517c0eedb)

Change-Id: Ie7e2e7778efd0c6d9724f1eb65adf8942141a47e
Reviewed-on: http://gerrit.openafs.org/3791
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>