[OpenAFS-win32-devel] In need of testers
Jeffrey Altman
jaltman@secure-endpoints.com
Mon, 05 Feb 2007 09:38:02 -0500
This is a cryptographically signed message in MIME format.
--------------ms030105080302070500020602
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Over the last two weeks I have been tracking down a data corruption
error in all previous Windows clients.
Symptoms of the original report:
While appending to a file stored in AFS over a long period of time it is noticed that holes in the file filled with NULs begin to appear.
The actual bug:
CIFS Write requests are processed by the AFS SMB Server by updating the data in the local cache, then queuing a request for the data to be written to the file server by a background thread, and finally returning success to the CIFS client. The background thread will dequeue one request at a time and process it regardless of whether or not the request is successfully completed. If the volume becomes busy, is taken offline, or if the file server becomes inaccessible, the request will fail and the write operation will have been completed in the local cache but will never have been delivered to the file server.
The fix:
Modify the background thread processing to only pull requests off the queue if there is a likelihood that the request might succeed. If a request fails for any reason, do not clear the dirty flag on the buffers that were being written. If the request fails due to the volume being busy or offline, or the server being inaccessible, it is placed back on the head of the queue and it will be processed again the next time the server is marked as available.
Other Changes:
While working on the buffer management a number of other performance enhancements were implemented that will improve the response time of the cache and in particular ensure that more of the data in the cache is current. The performance of read/write operations should be significantly improved in the situation where only a single AFS client is modifying the contents of a file.
Complete list of changes since 1.5.14:
Since 1.5.14
* A reference leak was discovered in the mountpoint traversal
functionality which resulted in cm_volume_t objects not becoming
eligible for re-use. This will trigger a panic condition when
more than the maximum number of volumes is accessed.
* Fixed the success test for the "fs memdump" operation. Success
is now reported as such. Added cm_volume_t object information
to the dump file.
* A data corruption error has been fixed. Write requests
queued for background processing were not retried upon failure.
This leads to inconsistencies between the contents of the file
in the local cache and the contents of the file on the file
server.
The implemented fix is to re-queue any request that has failed
due to timeout, volume busy, volume offline, server busy, or
server offline. Requests are not processed while all servers
for a volume are inaccessible. When servers become accessible
the background request will be retried.
In addition, if a background write fails, do not mark the buffers
as clean. Failure to preserve the dirty flag prevents the buffers
from being written to the file server in the future.
This fix does not address the possibility that the credentials
necessary to perform a write request might expire between the
time the request is queued and when the request can be processed
due to server accessibility.
* The Freelance volume does not support per user ACLs. The
cm_HaveAccessRights function did not handle this special case.
Requests for privileges greater than read|lookup would result
in afsd_service.exe entering an infinite loop. ISOBuster is
known to cause this behavior.
* When deleting files, the SMB Server would attempt to obtain
the access permissions for the parent directory instead of
for the file itself. This would result in an incorrect
assessment of whether or not the file can be deleted.
* The Network Identity Manager AFS plug-in has had its string
tables updated for consistency with the language used by NIM.
All credentials are referred to as credentials instead of tokens.
* The AFS Salvager was not properly being built on Windows.
This is relevant only if the AFS servers are in use.
* The default signal handlers for the AFS servers incorrectly
processed SIGQUIT. Instead of stopping the server, an
exception was raised.
* Fix another volume refcount leak. This one was triggered by
an inability to contact the vlservers in order to update the
file server list.
* Fix checklist control used by the drive mappings tabs in
afscreds.exe and afs_control.exe.
* Improve output of "fs memdump" related to buffer management.
* Fix refcount leak of cm_buf_t objects when prefetching buffers
already in the process of being fetched.
* Improve cache performance by computing the buffer hash table
size based upon the number of buffers so that the average
number of entries in a bucket is seven.
* Improve cache performance of read/write data by locally
updating the dataVersion of all buffers associated with the
file on each StoreData or StoreStatus operation provided that
the dataVersion was incremented by one and the dataVersion of
the buffer matched the original dataVersion of the cached
status information for the file.
Daily builds containing these modifications can be found at:
/afs/athena.mit.edu/user/j/a/jaltman/Public/OpenAFS\
\\afs\athena.mit.edu\user\j\a\jaltman\Public\OpenAFS\
http://web.mit.edu/jaltman/Public/OpenAFS/
Builds labeled 1-5-20070205 or greater contain these changes.
Please report positive and negative results to this list.
Thanks.
Jeffrey Altman
--------------ms030105080302070500020602
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature
MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJeTCC
AxcwggKAoAMCAQICEBW00lKwoWJXt8wbmTl1M0kwDQYJKoZIhvcNAQ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