]> git.michaelhowe.org Git - packages/o/openafs.git/log
packages/o/openafs.git
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>
14 years agoWindows: Build afs_shl_ext.dll with talocaleU.lib
Jeffrey Altman [Sat, 4 Dec 2010 23:03:21 +0000 (18:03 -0500)]
Windows: Build afs_shl_ext.dll with talocaleU.lib

Use the Unicode version of talocale to properly read
resource strings.

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

Change-Id: I38b4b45e6868283a7f59071f6326389dd569ea2d
Reviewed-on: http://gerrit.openafs.org/3790
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: install afs_shl_ext icon files
Jeffrey Altman [Sat, 4 Dec 2010 23:02:38 +0000 (18:02 -0500)]
Windows: install afs_shl_ext icon files

mount.ico and link.ico to dest\root.client\usr\vice\etc

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

Change-Id: I3ab7f121a937769e899dc8d7c604fc23f07ada1e
Reviewed-on: http://gerrit.openafs.org/3789
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: build a UNICODE version of talocale.lib
Jeffrey Altman [Sat, 4 Dec 2010 22:59:36 +0000 (17:59 -0500)]
Windows: build a UNICODE version of talocale.lib

Add src/WINNT/talocale_unicode that builds a UNICODE version
of talocale, talocaleU.lib

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

Change-Id: Ie298784afdbc4329b97fecea73135b4fd173a866
Reviewed-on: http://gerrit.openafs.org/3788
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: fix UNICODE build for talocale
Jeffrey Altman [Sat, 4 Dec 2010 22:56:44 +0000 (17:56 -0500)]
Windows: fix UNICODE build for talocale

src/WINNT/talocale has not been built for UNICODE in a long time.
Fix it.

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

Change-Id: I2f77de3255b229bfa00437af59d11c0da5646458
Reviewed-on: http://gerrit.openafs.org/3787
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: afs_shl_ext improve overlay handlers
Stefan Kueng [Sat, 4 Dec 2010 09:56:01 +0000 (10:56 +0100)]
Windows: afs_shl_ext improve overlay handlers

Add link.ico and mount.ico Windows icon files.
Use these images as overlays instead of extracting an image
from shell32.dll which is a bad idea.  See

http://blogs.msdn.com/b/oldnewthing/archive/2005/10/26/485133.aspx
Reviewed-on: http://gerrit.openafs.org/3445
Tested-by: BuildBot <buildbot@rampaginggeek.com>
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 3ff9c24c0e2d72dcce65fc7706dcdb1cd3090965)

Change-Id: Ifa20508a1b30ebd88e4968d76d325c2e2be51039
Reviewed-on: http://gerrit.openafs.org/3786
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: afs_shl_ext Show icon mount point overlay
Stefan Kueng [Fri, 3 Dec 2010 21:58:54 +0000 (22:58 +0100)]
Windows: afs_shl_ext Show icon mount point overlay

Reviewed-on: http://gerrit.openafs.org/3444
Tested-by: BuildBot <buildbot@rampaginggeek.com>
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 92183f4ac31f20862a992b8b3d52dcbe0ebb7eb9)

Change-Id: I966cc9bbb03a5682f3227238c635fb5634502c8c
Reviewed-on: http://gerrit.openafs.org/3785
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoevalmountdata: put back colon in .:mount syntax only if we removed it
Derrick Brashear [Mon, 31 Jan 2011 20:07:45 +0000 (15:07 -0500)]
evalmountdata: put back colon in .:mount syntax only if we removed it

we looked for a set character (not NULL) at cpos before, instead
of looking for a non-NULL pointer. fix it.

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

Change-Id: I6920aa378361c1c78285b595303f32ed3194462b
Reviewed-on: http://gerrit.openafs.org/3875
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: afs_shl_ext folder bkgrnd context menu
Stefan Kueng [Fri, 3 Dec 2010 20:24:33 +0000 (21:24 +0100)]
Windows: afs_shl_ext folder bkgrnd context menu

Make the context menu handler also work for folder backgrounds
and on Win7 for library folder backgrounds

For folder backgrounds, the shell passes the PIDL of the folder
instead of a data object.  Extract the path from that PIDL. Also
extended the register function of the dll to add the required
registry keys.

Reviewed-on: http://gerrit.openafs.org/3443
Tested-by: BuildBot <buildbot@rampaginggeek.com>
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 f8f8c0a48fbe086870a0cf35a62278c2b4ab743b)

Change-Id: If19cafed9d19ce5f6a529c64fe48a03c13cb0e03
Reviewed-on: http://gerrit.openafs.org/3784
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: Remove fallback from GetCaps to GetTime
Jeffrey Altman [Wed, 1 Dec 2010 23:47:29 +0000 (18:47 -0500)]
Windows: Remove fallback from GetCaps to GetTime

If the file server responds to RXAFS_GetCapabilities with
RXGEN_OPCODE the server is up and there is no need to fallback to
RXAFS_GetTime.  Remove the code that performs the extra work.

Reviewed-on: http://gerrit.openafs.org/3419
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 166de9ffa29244f38f1d2c1e8b0fa9a9fd1802b5)

Change-Id: I2d7424e891d728b4b0589989c8a58f15594db412
Reviewed-on: http://gerrit.openafs.org/3783
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoUnix afsd: Check for mountpoint /afs first
Christof Hanke [Sun, 28 Nov 2010 12:01:12 +0000 (13:01 +0100)]
Unix afsd: Check for mountpoint /afs first

Check for the existance of the mountpoint before trying to
start.

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

Change-Id: Ic94f1701f5d1d0d080e5751093a685e89d892b1a
Reviewed-on: http://gerrit.openafs.org/3782
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agovos: Improve release recovery on timed-out trans
Andrew Deason [Thu, 9 Sep 2010 14:41:40 +0000 (09:41 -0500)]
vos: Improve release recovery on timed-out trans

When a portion of 'vos release' takes long enough that a transaction
on one or more RO sites times out, it retries to release to those
sites. However, it does not take into account the situation where the
transaction on the original RO clone has also timed out, which it
usually will have if we took a long time to get to the ForwardMulti
stage for any reason.

Add a check to see if the clone RO transaction has timed out, and if
so, recreate the transaction on it. Check if the volume appears to
have changed at all, and if it has, bail out.

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

Change-Id: I19541800fa7d1ce1c5922b9338b4b8370151fd93
Reviewed-on: http://gerrit.openafs.org/3781
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: NSIS installer requires the architecture for CL=1400
Jeffrey Altman [Fri, 26 Nov 2010 07:55:03 +0000 (02:55 -0500)]
Windows: NSIS installer requires the architecture for CL=1400

The NSIS installer at present is 32-bit only.  Production releases
of OpenAFS have always been performed using the CL=1310 compiler
so it wasn't noticed that src/WINNT/install/NSIS/NTMakefile did
not define the ARCH (architecture) for the purpose of identifying
which redistributable runtime library installer should be
integrated into the build.  For the CL=1310 compiler there are
not prebuilt installers for OpenAFS to integrate.

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

Change-Id: I38a93f34f3cd8b71ad0f33ca700162d133b11b7a
Reviewed-on: http://gerrit.openafs.org/3780
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: make use of AFSDEV_BIN and set the PATH
Jeffrey Altman [Fri, 26 Nov 2010 07:51:16 +0000 (02:51 -0500)]
Windows: make use of AFSDEV_BIN and set the PATH

ntbuild.bat defines AFSDEV_BIN which is set to the list of
directories from which executables required for the build
process will be executed.  However, this value was never used
to modify the PATH environment variable.  Make it do so.

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

Change-Id: I2a4de2258027b0a943d0f223c7493b8d33393777
Reviewed-on: http://gerrit.openafs.org/3779
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agomerge-pod: Be more compatible with older perl
Andrew Deason [Fri, 14 Jan 2011 20:00:14 +0000 (14:00 -0600)]
merge-pod: Be more compatible with older perl

merge-pod works fine with perl 5.00503, if we eliminate the 3-argument
invocation of open(). So, replace the open() calls with their
2-argument equivalent, and relax the version requirement a bit.

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

Change-Id: Ie3945eb37628ed3bd55f9cb53dd2f4d122f3b087
Reviewed-on: http://gerrit.openafs.org/3778
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoMacOS: fix SetFile call in growlagent makefile
Derrick Brashear [Tue, 25 Jan 2011 18:32:38 +0000 (13:32 -0500)]
MacOS: fix SetFile call in growlagent makefile

somehow this got corrupted earlier. fix it to use the right arg.

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

Change-Id: Iecf2c6a5c9a7df61cd2728eda3ee0a937e2f29f9
Reviewed-on: http://gerrit.openafs.org/3757
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoFreeBSD: properly identify the rxk_Listener so that msleep() returns
Toby Burress [Thu, 20 Jan 2011 04:32:01 +0000 (23:32 -0500)]
FreeBSD: properly identify the rxk_Listener so that msleep() returns

afs_osi_Wakeup() was not being called with the proper argument,
causing afs_osi_Sleep() to fail forever while waiting for rxk_Listener
to wake up.

Change-Id: Ia2de70e1c3b9bcc25fbd6cb23c2d05eabb0a53a1
Reviewed-on: http://gerrit.openafs.org/3692
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry-picked from commit bc674908ca5100a0734069a019d9a31788dd52fb)
Reviewed-on: http://gerrit.openafs.org/3754
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoOpenBSD: Change code optimization setting
Antoine Verheijen [Wed, 19 Jan 2011 23:06:03 +0000 (16:06 -0700)]
OpenBSD: Change code optimization setting

Change the optimization level set when optimization is
enabled during build from the sytem default of '-O' to
'-O2' for OpenBSD systems.

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

14 years agoOpenBSD: Install no-NFS version of libafs
Antoine Verheijen [Wed, 19 Jan 2011 20:13:09 +0000 (13:13 -0700)]
OpenBSD: Install no-NFS version of libafs

The build process for OpenBSD builds the no-NFS version of
the kernel module but, at install time, the NFS version is
subseuquently built and installed while the no-NFS version
is ignored. The NFS version does not load and is not needed
in OpenBSD so this patch makes sure that the no-NFS version
is installed and used.

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

Change-Id: I7f37c2da40f2ecada7255c1d60e8b14a1f7e6f81
Reviewed-on: http://gerrit.openafs.org/3723
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoOpenBSD: Remove duplicate assignment of COMMON_INCLUDE in libafs
Antoine Verheijen [Fri, 3 Dec 2010 07:30:20 +0000 (00:30 -0700)]
OpenBSD: Remove duplicate assignment of COMMON_INCLUDE in libafs

When building libafs, the make file variable COMMON_INCLUDE is
assigned a value in two places: Makefile.common.in and
MakefileProto.OBSD.in. The assignment in the latter place is both
wrong and unnecessary. Remove it.

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

Change-Id: I08d46d7e9c288e6b81f8c9cf3a16f6e48ac3462f
Reviewed-on: http://gerrit.openafs.org/3722
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoOpenBSD: Don't call non-existent routines in osi_vfsops.c
Antoine Verheijen [Wed, 19 Jan 2011 20:43:21 +0000 (13:43 -0700)]
OpenBSD: Don't call non-existent routines in osi_vfsops.c

The OpenBSD version of osi_vfsops.c makes calls to routines
that do not exist in the system and aren't needed. In the
past, these calls were wrappered by an #ifdef for
AFS_DISCON_ENV which was never defined. That #ifdef is now
gone so this patch removes the calls to these routines,
which are remnants of the NBSD origins for this particular
code.

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

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