unable to reliably get remote client CreateFile IRP in file filter driver

Hi all,

My filesystem filter driver handle IRP_MJ_CREATE. In order to automate the
test, I tried to call CreateFile API from a remote client that map a local
disk protected by the filter driver. Immediately after that I use
CloseHandle to close it. This process is repeated for several different
files. Then it repeat itself again.

I noticed that I was unable to get the IRP_MJ_CREATE reliably except the
first loop. I tried to apply different flags e.g. FILE_FLAG_NO_BUFFERING |
FILE_FLAG_WRITE_THROUGH that do not seems help. Even restart the process
does not guarantee that the local filter get the IRP.

I do know that if I use explorer from remote client to open the file, I get
the IRP every time.

I know there is no problem when do the test locally.

I guess network redirector play some trick to reduce the network traffic.
Can anyone explain how this work and if there is workaround to get around
the problem. I want to use CreateFile because it allows me to specified the
exact access mode so that I can invoke the right policy in my filter
driver.

Thanks,

Jack Cheng