|
From: Hartmut B. <har...@te...> - 2001-11-05 09:27:03
|
> -----Ursprungliche Nachricht----- > Von: Phillip Susi [SMTP:ps...@cf...] > Gesendet am: Montag, 5. November 2001 03:14 > An: ros...@re... > Betreff: [ros-kernel] Recent changes to vfatfs broken > > It seems that the recent changes to vfatfs to allow async IO are > broken. When attempting to mount the filesystem, VfatBuildRequest() calls > FsRtlEnterFileSystem() which is a #define to KeEnterCriticalRegion, which > disables APCs. This causes VfatFileSystemControl to be called with APCs > disabled, which prevents the read IO issued to read the boot sector to not > complete. > > What is the purpose of calling FsRtlEnterFileSystem(), and I seem to > remember reading that IO completions use special APCs that can not be > disabled, so the APC should be delivered anyway. Is it then the case that > we need to use these special APCs to allow delivery even though APCs have > been disabled for some reason? Only the the fast i/o routines must be encapsulate within FsRtlEnterFile System()/FsRtlExitFileSystem(). This is a bug. I remove the calls. There are also other things broken. The kernel doesn't wait for the completion of the cleanup call. But Vfat must handle this call asynchronous, when if it is possible, that previous calls was asynchronous and can wait in the work queue. There is an other problem with asynchronous calls. I've written a litle test program. It creates 50 threads and each thread does in a loop 10 write calls to the same file and waits after each call for completion of the write request. Vfatfs crashs after some write requests with this message: Page fault at high IRQL was 2 Page Fault Exception: 14(3) Processor: 0 CS:EIP 8:c0008dc6 <ntoskrnl.exe 8dc6> .... Frames: <ntoskrnl.exe: 8f5a><ntoskrnl.exe: 3a83> The entries from ntoskrnl points to _KiDispatchException (8d1c), _NtRaiseException (8f20) and new_serviceInRange (3afc). The last is within the int 2e handler. I can't see, from where the page fault comes. I have added many checkpoints to vfatfs. It seems, that in ExQueueWorkItem occures the crash. The last visible checkpoint is in VfatQueueRequest before the call and then comes the nice crash dump. The checkpoint after the call isn't visible. What's wrong in ExQueueWorkItem? The crash occures only at one pc, never in bochs and never at my other pc. When the crash occures there are many requests in the work queue (>20). At some times, there are up to 40 requests in the queue. When I reduce the speed from 100MHz to 50MHz or when I enable many of the debug messages in vfatfs, the crash doesn't occures. In this two situations, there are some requests (<10) in the queue. Is there a problem with the work queue or within the worker threads? - Hartmut ==================================================== = To remove yourself from this mailing list, go to = = http://www.reactos.com/home/mailing.html = ==================================================== |