When an SMB virtual circuit is prematurely closed due to an error
condition by one thread it is possible that there are still several
other threads still using the VC which will determine that the VC
is dead shortly. As a result we maintain a dead vc list to ensure
that dead vcs are not destroyed while still in use.
With the addition of locking though this causes a problem because the
locks allocated to the virtual circuit are not freed until the vc is
destroyed.
This patch reworks the cleanup routine to make the freeing of resources
the responsibility of the release routine when the refcount hits 0
and the VC is marked dead.
Fix several issues with the afs(1) man page. Based on the patch by Jason,
but I also documented /vicepiv as the maximum, and /vicepiu as the
maximum recommended, partition.
This patch is the second stage of the Unicode conversion. In this stage
the cache manager has been converted from using 8-bit UTF8 C strings to
16-bit UTF16 C strings in the SMB, the DNLC, the B+ tree, and other
directly related modules. The cm_cell, cm_volume, cm_scache, cm_buf,
cm_dcache, and cm_dir modules are left 8-bit because their data is all
8-bit UTF8 since they work only on file server strings.
The SMB layer accepts 16-bit UTF16, the B+ tree and DNLC use normalized
strings as the key, and everything uses UTF8. Efforts have been made
to minimize the number of transitions from UTF8 to UTF16 and back.
For the most part strings are tagged with clientchar_t and normchar_t
and fschar_t types in order to distinguish between the various types of
strings that are in use.
Refactor the pioctl handling to provide a layer of abstraction
between the smb server and the actual pioctl data processing.
This will permit a redirector pioctl layer to be implemented
on top of the core cm_ioctl interfaces.
The general approach is that there is a new cm_ioctl_t object
which is embedded withing a higher level abstraction object.
This object maintains all of the pioctl state processing and
removes any notion of file descriptors or other communication
channel parameters.
The cm_ioctl module maintains just about all of the core
functional processing except for SetToken which needs further
abstraction. Path processing is now performed at the higher
layer and cm_ioctl functions accept cm_user_t, cm_scache_t,
and cm_req_t objects from the higher layer.
The smb_ioctl module performs all of the path translation
using smb server knowledge and passes the necessary objects
to the cm_ioctl module for processing.
This patch is only for the 1.5 branch and just for the afsd
directory. Remove all references to DJGPP preprocessor
symbol in order to make application of commits from head easier.
An incremental commit. This patch adds support for normalization of Unicode
but we have concluded that the normalization rules are incorrect. Normalized
strings should not be written to the file server or returned to the application.
Obtain a missing lock around a call to cm_RemoveSCacheFromHashTable().
Correct an abstraction layer violation. cm_scache_t objects should
be marked deleted in cm_Unlink() and cm_RemoveDir() and not in
smb_CloseFID(). Cleanup of deleted cm_scache_t objects should be
performed in cm_ReleaseSCache() when the reference count hits zero.
Prototype cm_AdjustScacheLRU() and re-implement it using osi_QAddH().
Prevent corruption of the cm_data.scacheHashTablep lists when removing
and then re-adding entries to the hash table. The cm_scache_t nextp
fields were not being reset to NULL which permitted loops to be created.
Add documentation of foreign realm user registration and cross-realm PTS
groups. Add documentation of missing ptserver flags. Add some additional
to-do entries for the man pages.
It is frequently the case that rx_getAllAddr() is called before
rx_Init() or rx_InitHost(). rx_getAllAddr() obtains the list of
interfaces by using rx_GetIFInfo() which in turn computes and
allocates the number of addition rx packets. Unfortunately,
rxi_MorePackets() relies on the existence of an initialized mutex
and the mutex is not initialized (on Windows) until the rx_InitHost()
call. Therefore, we must delay the rxi_MorePackets() call until
after rx_InitHost() if rx_getAllAddr() is called previously.
in rxi_MorePackets() if osi_Alloc() fails to return the requested memory
call osi_Assert() instead of permitting subsequent null pointer dereferences
to corrupt the stack.
Define new flag CM_BUF_REDIR for use with the redirector.
When set, the flag indicates that the buffer is being held by the redirector
and it should be left untouched by the cache manager.
This delta provides a fairly complete implementation of Unicode character
set support for the Windows Cache Manager and supporting tools including
fs.exe, symlink.exe, the pioctl library, and the explorer shell extension.
New Build requirements:
In order to build the Microsoft IDN Mitigation APIs SDK 1.1 is now required.
This SDK provides the normalization.h header and the redistribution
install packages required to install normaliz.dll. The AFSDEV_INCLUDE
path must be modified to point to the directory containing normalization.h.
There are no lib files for this package.
Cache Manager:
The CM SMB server has been modified to negotiate the use of UNICODE.
By default it is on. The "fs smbunicode" command can be used to disable
UNICODE at runtime.
cm_utils now contains UNICODE normalization and conversion routines built
on top of the IDN Mitigation APIs.
All input strings are normalized with UNICODE Normalization Form C.
The pioctl interface now supports UTF8 strings in addition to ANSI.
UTF8 strings are prefixed with <ESC> % 8 as per the ISO 2022 extension.
Pioctl Library:
New apps should use the pioctl_utf8() function instead of pioctl().
pioctl() is for ANSI strings and provides backward compatibility
with third party apps.
fs.exe and symlink.exe:
Converted to Unicode applications. All strings are now communicated
using UTF-8.
Explorer Shell Extension:
Converted to a Unicode DLL. All strings are now communicated using
UTF-8. Fonts on U.S. Windows distributions are not fully populated.
As a result not all of the characters can be displayed in all of the
dialog boxes.
Still to do:
1. Add Unicode normalization to AFS directory entries and mountpoint
and symlink target strings.
2. Use the Unicode version of GetCurrentDirectory in fs_utils.c
3. Update the installers to install the IDN Mitigation APIs on XP
and 2003. Vista already has them and they are not supported on
pre XP SP2 releases.
if we return leaving a non HOSTDELETED host while it does not have ALTADDR set,
a loop can happen. avoid it by simply setting ALTADDR again when we're done,
if we believe some addresses are still good this is fine.
Once we know that an attempt to stablize a buffer has failed due to
VNOVNODE, stop trying to Stablize future buffers and just invalidate
all of them belonging to the same FID.
in the event a server is "melting down" and not responding with data to RPCs
this adds the ability to time out the calls rather than letting keepalives
effectively hang the client forever. does not mark the server down since...
it's not down.
Side effect: adds similar tracking for authentication errors so tokens need
not be discarded if one server's clock has drifted.
The pthread butc crashes with SIGSEGV, when I restore to a volume
which already exists. This does happen with OpenAFS 1.4.7pre4 on
i386_linux26.
Looking into the code I think butc is using the wrong function
Lp_GetRwIndex (at volser/vsprocs.c:4394). It uses the one in the
library lib/libvosadmin.a, but should use the function defined
in volser/lockprocs.c.
Add "IdleDeadTimeout" registry value and call rx_SetConnIdleDeadTime()
with it when creating new rx connections. This forces the Rx stack
to return RX_CALL_TIMEOUT if the file server has returned VBUSY for
longer than the IdleDeadTimeout.
When RX_CALL_TIMEOUT is received, the cache manager will now attempt to
find another server for the object that might be less busy.
The install rule:
- installs the empty 'kdump-build' file instead of the binary on all
platforms except irix
- overwrites the selection script with the binary on linux and hpux
- doesn't have an alpha_linux branch
- installs the wrapper script as kdump32 and the binary as kdump on
solaris (instead of vice-versa)
The dest rule:
- overwrites the selection script with the binary on alpha_linux and hpux