not everything should be under the rx_stats_mutex. doing so
results in too much lock contention. add new mutexes:
rx_quota_mutex, rx_waiting_mutex, rx_pthread_mutex, and rx_packets_mutex.
Each new mutex protects an associated group of variables.
if the socket buffer size specified by the configuration is too large
to be applied, do not drop down immediately to 32766 bytes. Instead
try increasingly smaller values trying to find the largest one that
works. use the same value for the send buf size as well.
Throughout rx_rdwr.c functions allocate a register variable 'cp'
which is used to optimize access to call->currentPacket.
Unfortunately, if the call->lock is dropped (for example, CV_WAIT)
the synchronization between the two is lost. This delta re-syncs
'cp' and call->currentPacket after each location where the call->lock
may be dropped.
Ensure that the input string is nul terminated and then instruct
WideCharToMultiByte to compute the length itself instead of passing
in a value that is very likely to be wrong.
1. Add functions cm_FreelanceFetchMountPointString and
cm_FreelanceFetchFileType to cm_freelance.c. These functions
permit the MountPointString and FileType to be obtained within
cm_GetSCache without requiring knowledge of data structures
that should be private to cm_freelance.c
2. Enforce the rule that odd vnode values are directory objects.
The root directory is 1 and everything else must be a multiple
of two.
3. Use the unique field as an index into the localMountPoints
array.
4. Fix cm_GetCallback to process freelance data refreshes on
all objects in the freelance volume not just the root directory.
If this is not done, an access to \\afs\foo prior to \\afs\all
being evaluated will cause an unnecessary attempt to send a
fetch status request to a file server and produce an alldown
error.
reverse change from 20081226. removing the auto-generated manifest
removes the manifest binding to the run time library. The reason
two manifests are specified is that we are merging them.
Validating the state of the rx library is hard. This patch makes it
a bit easier to validate from within crash dumps (or on Windows in
"fs memdump" output) whether rx packets and calls are in a sane state.
When the library is compiled with -DDEBUG the rx_call and rx_packet
data structures are extended to include a linked list of all allocated
objects and counters are added to track the number of packets on each
of the transmit, receive, and iovec queues.
This compliments the tracking of packet states via RX_PKTFLAGs.
For Windows, rx_DumpCalls and rx_DumpPackets functions are added
that will dump the state of all allocated calls and packets (in Checked
build) in response to a "fs memdump" command. These functions are
exported from afsrpc.dll.
adds ATTR_* constants for UKERNEL code, and makes use
of them. Without this in some cases updating file metadata will also
update unrelated metadata (e.g. truncating a file changes the mode
bits).
adds threadsafe positional i/o calls to
afs_usrops.c: uafs_pwrite and uafs_pread, allowing for threadsafe
libuafs i/o.
changes the types of some fs-related
variables to be more "correct", I think (off_t for offsets, mode_t for
file mode, etc), it fixes a bug where nDaemons is not correctly set from
the uafs_Init parameter, fixes a segfault in uafs_open when O_CREAT is
specified, initializes a couple of static vars, "#if 0"s out code that
copies tokens from kernel-space to user-space (doesn't seem to work from
what I've seen, and the current code crashes on clientless Solaris
machines from being killed by SIGSYS)
even though the docs for FILE_FS_ATTRIBUTE_INFORMATION state
that the MaximumComponentNameLength field is in bytes, it turns
out that Windows SMB servers return the value in characters.
Pointed out by jason edgecombe. the AFS SMB server failed to report
the FILE_UNICODE_ON_DISK characteristic when responding to
TRANS2_QUERY_FS_INFORMATION.
when performing a lookup operation it is acceptable for the data version
of the btree to be greater than the data version of the cm_dirOp_t
under which the operation is being performed. No change to the btree
can take place and the result of the lookup will maintain consistency
without requiring an additional restart of the directory operation.
when prefetching the directory buffers do not call cm_FlushFile to
discard locally modified buffers. Instead just set the cm_scache_t
bufDataVersionLow to the current version. out of date buffers will
therefore be ignored without requiring that locks be dropped and
reacquired and without searching all of the buffers associated with
the directory.
Do not permit cm_Rename() to rename an existing object such that it
creates a case-insensitive name collision with another object.
This change in behavior is consistent with the restrictions when
creating new objects. This change prevents the explorer shell from
getting confused when it creates a new folder.
GetDriveType() will return "REMOTE" for drive letters that are mapped
to network devices via the SUBST command. Recursively check drive letters
for the final substitution before checking to see if the drive letter
is in fact an AFS device.
Change the mapping of CM_ERROR_WOULDBLOCK from
STATUS_LOCK_NOT_GRANTED to STATUS_CANT_WAIT.
STATUS_LOCK_NOT_GRANTED is used to indicate
CM_ERROR_LOCK_NOT_GRANTED.
drive letters mapped to \\afs by the global auto mapper do not show
up as mapped drives. Add a check for the drive mapping based upon
the registry configuration.
Examination of dump shows that smb_IsMask is being called on a
non-8.3 input buffer. Separate smb_IsMask() into smb_Is8Dot3Mask()
for 8.3 input buffers and smb_IsMask() for non-8.3 input buffers.
====================
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.
====================
LICENSE MIT
cm_DirPrefetchBuffers() did not properly drop and regain the appropriate
lock type y
====================
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.
====================
LICENSE MIT
Various file server man page updates: number of partitions, partition size
limits, directory file name block size, and a reference to the IBM manual
set.
kfw referrals logic broke the logic for automated configuration of
the workstation cell with a new identity. Now if a referrals
response is returned, assume the cell belongs with the new identity.
In the long term, we need to change the logic as follows:
1. if realm indicates referrals, try to obtain the krb5 service ticket
but do not generate a token
2. if the service ticket can be obtained and
a. if the cell is not bound to any other identities,
then bind it to this one
b. if the cell is bound to another identity, prompt the user to ask
which identity (or both) should this cell be bound to and follow
the user's instruction
The code has long contained a backing_dev_info structure, but it
was never attached to anything. Initialize its use properly with
bdi_init, and attach it to i_mapping for every newly filled inode.
bdi_init and bdi_destroy are needed for proper initialization of
some percpu counters, otherwise we get some oopses.
When loading the afsdhook.dll require that it be in the same directory
as afsd_service.exe. This prevents LoadLibrary() from searching the PATH
environment variable if it cannot be found. If the PATH environment
variable contains a path in AFS, the library will fail to load and take
a very long time doing so.
The Windows code base was implemented ignorant of linked cells as
defined in the src/auth/cellconfig.h struct afsconf_cell. The code
that made use of the afsconf_cell objects would leak the memory from
the linkedCell field if is non-NULL.
Add cm_SearchCellFileEx which is an extended version of cm_SearchCellFile
capable of returning a linked cell obtained from the CellServDB file.
Update GetCellConfig to populate the linkedCell field of the afsconf_cell
structure.
Modify cm_cell_t to support a linked cell name.
Modify cm_GetCell_Gen() to populate the cm_cell_t linked cell and enforce
that two cells are linked to each other.
Modify cm_GetVolumeByID() and cm_GetVolumeByName() to perform fallback
to the linked cell if the response is CM_ERROR_NOSUCHVOLUME.