Many of the OpenAFS binaries that are installed on end user machines
did not have version information. This is problematic as it is impossible
to determine which version of a binary the crash report was filed against
when a report is received by Microsoft Windows Error Reporting service.
Discovered another case where VNOVNODE errors were not being handled.
If there are dirty buffers and a VNOVNODE error is received while
writing the buffer, the buffer would be left in the dirty buffers queue.
This caused a couple problems:
(1) any attempt to flush the file, volume, or cache would fail because
there were unflushed dirty buffers that could not be flushed.
(2) shutdown of the service would hang because the buffers could not
be flushed.
In addition, while a VNOVNODE error would result in the cm_scache_t
being marked CM_SCACHEFLAG_DELETED, this state was not being checked
at the SMB layer. As a result, if a smb_fid_t was allocated and it
referenced the deleted cm_scache_t, the SMB operations would continue
to be processed and report success even if the actual file or directory
no longer existed.
We now clear the dirty state on buffers which cannot be written due to
VNOVNODE errors. We also check the cm_scache_t for deletion prior to
use whenever a smb_fid_t is looked up. If the cm_scache_t is deleted,
the smb_fid_t is closed and the error CM_ERROR_NOSUCHFILE is returned
for files or CM_ERROR_NOSUCHPATH for directories.
Mark afs_config.exe via a manifest with
requestedExecutionLevel = HighestAvailable
This will ensure that when Vista UAC is active, that a member of the
Administrators group must run the AFS Control Panel with Administrators
privileges.
When a file name does not conform to 8.3 notation, an 8.3 notation
alias is generated for it. This short name form must be searchable
in the B+ tree.
This commit adds a longname field to the data node which is used both
to identify the real name associated with the short name as well as
whether or not the short name is in fact an alias. Being able to
determine whether or not a data node is an alias will be important
when we support using the B+ tree for directory enumeration.
For insertion, if the name does not conform to 8.3 notation, a second
entry is inserted into the B+ tree using the shortname as the key and
the longname stored in the data.
For deletion, we lookup the data node for the provided key. If there
is a longname we remove the longname entry first and then the shortname
entry. If the key is a longname, we lookup the data node so we can
acquire the FID and then use that to compute the shortname. We then
remove both the shortname and longname entries from the B+ tree.
don't hold the cm_scache_t mutex across calls to cm_GetCell() since
cm_GetCell() can block in an RPC call. If that cm_scache_t must be
accessed to revoke a callback, it can result in a deadlock.
This code defines a new service parameter "PrefetchExecutableExtensions"
of type REG_MULTI_SZ. By default it is undefined and does nothing. If
it is defined, files that match the extensions will be prefetched in
their entirety.
All of the prefetch functions now pay attention to the length parameters.
Previously, length parameters were specified on some functions in the
chain but they were ignored. The reality was that the chunksize was
used regardless of what was indicated.
Prefetching is still optional. If the prefetch fails during the initial
attempt you lose. Otherwise, as many buffers as are required to satisfy
the requested prefetch length will be requested from the file server in
chunksize units. If buffers have already been acquired, they are skipped
during the prefetch operation.
when suspending only clear callbacks for servers that are in an up state.
if they were in a down state, then we couldn't send the clear callbacks
message but more importantly, we need to leave the callback info current
because the callbacks should not be cleared until the server is once again
reachable.
Do not attempt to obtain a write lock on a directory
if we already know that we aren't going to perform any
local directory updates.
Add the CM_ERROR_BPLUS_NOMATCH error which has the same
meaning as CM_ERROR_NOSUCHFILE except that it indicates
that we came to that conclusion as the result of a bplus
search. This provides us the ability to short circuit
additional directory searches since we know the answer
is final.
Disable the use of krb524, leash, and ms2mit (because it depends on leash)
for 64-bit builds. We will need to implement our own replacement for the
ms2mit functionality.
make the afs network identity provider compatible with FILE:
credential caches. this is mostly of importance to 64-bit
Windows users since there is no CCAPI implementation for
64-bit KFW.
Windows uses case-insensitive file name pattern matching
but AFS is a case sensitive file system. The AFS3 directory
format is block based, uses network byte order and
includes a hash table for fast case sensitive lookups.
This causes several problems for the Windows AFS client.
(1) Traversing the directory blocks is cpu expensive
(2) A hash table miss does not indicate that the desired
entry does not exist.
(3) Determining whether a non-ambiguous inexact match or
the entry does not exist requires a linear traversal
of the entire directory.
These issues often result in 100% CPU utilization.
These issues are addressed by building a modified B+ tree for
each directory and then using the B+ tree for searches.
Further improvements can be made by using the B+ tree leaf
nodes for directory enumeration.
for . and .. find the last time we saw the fid in the list
instead of moving back a fixed count since the parent might
be a symlink or a mount point or both
New registry value "BlockSize" can be used to specify an alternative
block size. The default is 4K. A larger blocksize will be needed if
you want to support a 6TB cache.
Also extend the service startup timeout hint to two minutes to give
the AFS client service more time to startup successfully when the
cache is really large.
(1) fixes a bug that could cause a 'host' structure to not be removed
from the global host list if the 'host' did not possess an interface
list. This would happen with older AFS clients that do not support the
WhoAreYou family of RPCs. Windows clients older than 1.3.80 and old
Transarc UNIX clients.
(2) fixes a bug which could result in ViceLog being called with an
uninitialized 'hoststr' buffer as a parameter.
(3) ensures that only addresses known to belong to the 'host' are
added to the address hash table. The list of addresses provided by
the client are stored as alternates and are only used when searching
for a client that is no longer accessible on the primary address.
These addresses are not stored in the address hash table within
initInterfaceAddr_r().
The addresses provided by the client should not be added to the hash
table because they have not been verified as belonging to the 'host'
that provided them. The contents of the list may in fact be completely
unreliable. Consider the existing UNIX clients that generate the list
at startup and never alter it even after the client has migrated to a
different network. If two client's both claim the same address,
lookups by address may fail to find the correct one.
a. The client list might contain private address ranges which
are likely to be re-used by many clients allocated addresses
by a NAT.
b. The client list will not include any public addresses that
are hidden by a NAT.
c. Private address ranges that are exposed to the server will
be obtained from the rx connections that use them.
d. Lists provided by the client are not necessarily truthful.
Many existing clients (UNIX) do not refresh the IP address
list as the actual assigned addresses change. The end result
is that they report the initial address list for the lifetime
of the process. In other words, a client can report addresses
that they are in fact not using. Adding these addresses to
the host interface list without verification is not only
pointless, it is downright dangerous.
e. The reported addresses do not include port numbers and
guessing that the port number is 7001 does not work when
port mapping devices such as NATs or some VPNs are in
use.
(4) improves logging to ensure that all references to a 'host' structure
report both a memory address and the IP address/port. this will avoid
confusion *if* more than one 'host' structure is assigned the same
primary address.
(5) logs the UUID along with the client addresses when initializing the
host's interface list. (level 125)
(6) saves memory by using a smaller structure for the UUID hash table
MultiProbeAlternateAddress_r badly indexes the list of interfaces for
clients with multiple IP interfaces, resulting in peers with IP
address 0 port 0 to be created. This in turn results in rxi_sendmsg
errors (on systems where caught early, as on Linux, on others it may
pass unnoticed).
Add a new fs newalias man page. Add -help to the synopsis and options of
the other new man pages. Add additional missing links in the fs man page.
Fix some wording in the CellAlias man page.
Complete the documentation of the afsd flags and update a few things like
-settime and -nosettime. Add man pages for fs setcrypt, fs getcrypt, and
CellAlias. Based on work by Jason Edgecombe and then extensively edited,
so any errors I probably introduced.