fix issue where gcc 4.2 compiled kernel modules were breaking on linux
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
with fix from Hans-Werner Pulsen
====================
with fix from Hans-Werner Pulsen
pioctl commands were failing with CM_ERROR_NOSUCHCELL because the
Freelance cell object was not being added to the Cell Name and ID
hash tables.
ParseIoctlPath was not consistently returning the FID of the specified
symlink or mount point object. The was still one more case in which
CM_FLAG_FOLLOW was being specified left over from
windows-parse-ioctl-path-20070629. Changed the use of CM_FLAG_FOLLOW
into a 'follow' variable to ease testing and permit easy migration to
adding a 'follow' parameter to the function.
RXAFS_GetVolumeStatus is always going to fail for Freelance volumes.
Fake the response data.
UpdateVolume() was performing the wrong test for Freelance volumes.
Freelance volumes should not be marked offline even though they have
no servers.
FIXES 72759
This patch removes use of the non-Public ILL structures by OpenAFS to
gather network interface information in order to make RX packet size
and server locality decisions.
Attempts to rename by case only would fail when there are more than
one ambiguous matches. The list of data nodes would be corrupted
and future tree manipulations could result in a crash.
Some cells have a large number of servers listed in the vldb that
no longer exist and/or do not have PTR records in DNS. The algorithm
used to obtain the "server names" from IP addresses involves opening
a cell handle, creating an iterator of all servers, and then iterating
over them until a match is found for the IP address. This is done for
every server reference. Each time the iterator was constructed the
vldb would be queried and gethostbyaddr() would be called on every listed
ip address.
This patch stores a copy of the server list in the cell handle along with
an expiration time generated from a 10 minute TTL. This significant
reduces but does not eliminate the number of times that the caller is
blocked on reverse dns lookups.
FIXES 71397
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.