Andrew Deason [Tue, 15 Feb 2011 23:21:49 +0000 (17:21 -0600)]
vol: Restore inode OS_READ/WRITE
Commit 335ccb4082657b7d0e4e9af1076356cf115642d2 removed the OS_READ
and OS_WRITE definitions for non-namei code. We need those definitions
to build the pread/pwrite emulation functions, so put them back in.
This allows us to build the inode fileserver backend when we do not
have native positional I/O.
Andrew Deason [Mon, 14 Feb 2011 19:53:11 +0000 (13:53 -0600)]
HPUX: Disable positional I/O
Some versions of HP-UX have the pread() and pwrite() functions, but
they behave in odd ways; most notably, ignoring the offset argument
when _FILE_OFFSET_BITS is defined to 64.
This is noted in recent gnulib documentation
<http://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/posix-functions/pwrite.texi>,
and slightly less clear references to pread() being broken can be
found on the development mailing list for git itself.
It is not completely clear what specific HP-UX versions are affected
by this. An autoconf run-time test may also be insufficient, because
the same binaries should be usable on machines with broken and
non-broken pread() implementations. So, to be safe, disable positional
I/O on HP-UX unconditionally.
Derrick Brashear [Thu, 20 Jan 2011 03:56:12 +0000 (22:56 -0500)]
MacOS: don't allow krb5 at login when AD plugin authenticates
if AD is being used to verify authentication (e.g. via builtin)
don't allow get krb5 at login to succeed. since a helper does this we can't
grey the option, but we can decline to act on it.
Andrew Deason [Fri, 12 Nov 2010 16:32:57 +0000 (10:32 -0600)]
doc: Do not process .in files for html
We do not want to process .pod.in files when generating HTML versions
of the man pages. Change the filename filtering logic to only accept
.pod files, so we'll also skip over all other stuff we don't want,
like CVS or fragments directories.
Jeffrey Altman [Sat, 12 Feb 2011 16:52:12 +0000 (11:52 -0500)]
Windows: Fix GetIoctlHandle path construction
GetIoctlHandle() is used to construct the magic pioctl file
path used to initiate pioctl operations with the cache manager.
The first error introduced double directory separators. The
second error was testing an uninitialized value which could
have resulted in a missing directory separator.
Jeffrey Altman [Sat, 12 Feb 2011 16:45:15 +0000 (11:45 -0500)]
Windows: Fix symlink and mount point make \\afs\xxx handling
When processing a request to make a symlink or a mount point
in the afs root volume (\\AFS) the smb redirector will fail
the request because a server name by itself is not a valid path.
Therefore, we insert the "all" share component to refer to the
root volume as a valid path. \\AFS\foobar becomes \\AFS\all\foobar.
A recent change stripped the trailing slash from the string
returned by Parent(). This broke the test that determines
whether or not the provided path that failed the IsAFS() test
is in fact referring to the \\AFS server and requires the insertion
of the "all" share name.
This patchset permits the test to work with \\AFS or \\AFS\
and removes extraneous directory separators from the generated
path containing the "all" share.
OpenBSD: Make OpenBSD 4.7 param headers consistent
OpenBSD follows the policy of using a separate common
param file (post 1.4.x). However, when introducing support
for i386 OpenBSD 4.7, this was not done and a single param
config header file was created instead. This patch changes
the param files for OpenBSD 4.7 so that they are
consistent with the other OpenBSD versions by using a
separate common param header file.
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
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.
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.
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.
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.
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.
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.
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.
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)
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.
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)
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.
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.
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)
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.
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.
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.
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)
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*
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.
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.
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)
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)
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.
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.
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.
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)
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.
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().
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.