Don,
I would bet that you are just not waiting around long enough to ‘see’ the
NTFS flush in FileMon. It looks as though all the user references to the
file, in your trace, are being issued so why are you not allowing the
DELETE_ON_CLOSE to proceed?
There maybe an outstanding reference but it is not a user handle reference,
it is a pointer reference. Therefore it would seem that you would allow this
delete to proceed then when you do get other requests, you can fail them
accordingly.
Pete
Kernel Drivers
Windows Filesystem and Device Driver Consulting
www.KernelDrivers.com
(303)546-0300
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don
Sent: Friday, May 20, 2005 10:13 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] What could an IFS be doing wrong to delay a close.
Ian,
I have looked carefully over the FileMon output from both file systems.
There is an interesting difference, and one that I don’t understand.
The FileMon output from NTFS shows the following:
162 11:47:25 AM ifstest.exe:856 IRP_MJ_CREATE F:\opcreatg\fopenid\fopenid.c
SUCCESS Options: Create Access: All
163 11:47:25 AM ifstest.exe:856 IRP_MJ_WRITE F:\opcreatg\fopenid\fopenid.c
SUCCESS Offset: 0 Length: 1000
165 11:47:25 AM ifstest.exe:856 IRP_MJ_CLEANUP F:\opcreatg\fopenid\fopenid.c
SUCCESS
166 11:47:25 AM ifstest.exe:856 IRP_MJ_CLOSE F:\opcreatg\fopenid\fopenid.c
SUCCESS
skip lots of events…
211 11:47:25 AM ifstest.exe:856 IRP_MJ_CREATE F:\opcreatg\fopenid\fopenid.c
SUCCESS Options: Open Access: All
212 11:47:25 AM ifstest.exe:856 IRP_MJ_SET_INFORMATION
F:\opcreatg\fopenid\fopenid.c SUCCESS FileBasicInformation
213 11:47:25 AM ifstest.exe:856 IRP_MJ_CLEANUP F:\opcreatg\fopenid\fopenid.c
SUCCESS
214 11:47:25 AM ifstest.exe:856 IRP_MJ_CLOSE F:\opcreatg\fopenid\fopenid.c
SUCCESS
From my IFS, I get the following:
134 11:46:12 AM ifstest.exe:3160 IRP_MJ_CREATE
D:\opcreatg\fopenid\fopenid.c SUCCESS Options: Create Access: All
135 11:46:12 AM ifstest.exe:3160 IRP_MJ_WRITE D:\opcreatg\fopenid\fopenid.c
SUCCESS Offset: 0 Length: 1000
136 11:46:12 AM ifstest.exe:3160 IRP_MJ_CLEANUP
D:\opcreatg\fopenid\fopenid.c SUCCESS
137 11:46:12 AM ifstest.exe:3160 IRP_MJ_WRITE* D:\opcreatg\fopenid\fopenid.c
SUCCESS Offset: 0 Length: 4096
skip lots of other events…
155 11:46:12 AM System:4 IRP_MJ_SET_INFORMATION*
D:\opcreatg\fopenid\fopenid.c SUCCESS Length: 4096
156 11:46:12 AM System:4 IRP_MJ_CLOSE D:\opcreatg\fopenid\fopenid.c SUCCESS
As you can see, there are two major differences. First, there is never a
lazy write or an unbuffed IO on the NTFS trace. Second, the NTFS traces
closes write after the cleanup, mine does not.
I don’t understand how the NTFS trace can even work without an unbuffered
write ever happening? This is really confusing to me now.
Thanks,
Don
“Ian Costello” wrote in message news:xxxxx@ntfsd…
>
>
> Don wrote:
>
>>Thanks Ian,
>>
>>Unfortunately, that is not the problem. That call is the next thing in
>>line after the code that I included.
>>
>>It is not in the test though, it is always called. So I am still looking
>>for another problem.
>>
>
> Ok, so with the filemon output that you have, are you observing paging
> io’s (lazy writes) from the system between the cleanup and close? Also
> apart from the delayed close, is there anything else that you can see is
> different with regards to the operations that are occurring during the
> equivalent NTFS vs your IFS?
>
> There are possibly a large/huge number of operations that could be
> occurring in your create/read/write/cleanup/close paths so the cleanup
> itself may not be at fault. Locks (ERESOURCES), are always a good place to
> look as well…
>
> - Ian
>
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@kerneldrivers.com
To unsubscribe send a blank email to xxxxx@lists.osr.com