Hi All,
We have a HSM filter driver which was running for a few years.
Recently we found an issue in a customer site, here the configuration of the customer.
One Windows 2008 R2 which install our filter driver, names it as computer A, and one is Windows 2008 SP2, names computer B, both are x64 bit.
In computer A, there are some empty sparse files with the reparse point set, when the users try to read these files, our filter driver will intercept it and replace the read buffer with our own data.
The customer found an issue, when they tried to run “copy” or “robocopy” in the DOS prompt to copy the sparse file in computer A from computer B via UNC path, it will get back the empty content. But if they copy&paste the sparse file in Windows explorer, there are no any issue.
So we run the filespy in computer A, we found that the copy will trigger FASTIO_MDL_READ, in this case our filter driver will disable this fast IO, then there are IRP_MJ_READ/IRP_MN_MDL comes in, our filter driver will create an MDL for that and copy the data to buffer. Here is some output of file spy:
15:49:14.520 System FASTIO_MDL_READ FFFFF8A01D4C2920 F:\test.tar STATUS_UNSUCCESSFUL Offset: 00000000-000B4000 ToRead: F000 Read: 0
29 15:49:14.520 109 System IRP_MJ_READ/IRP_MN_MDL 00000004 FFFFF8A01D4C2920 f:\test.tar STATUS_SUCCESS Offset: 00000000-000B4000 ToRead: F000 Read: F000
30 15:49:14.629 System FASTIO_MDL_READ_COMPLETE FFFFF8A01D4C2920 f:\test.tar STATUS_SUCCESS
31 15:49:14.645 System FASTIO_MDL_READ FFFFF8A01D4C2920 f:\test.tar STATUS_UNSUCCESSFUL Offset: 00000000-000C3000 ToRead: F000 Read: 0
32 15:49:14.645 System IRP_MJ_READ/IRP_MN_MDL 00000004 FFFFF8A01D4C2920 f:\test.tar STATUS_SUCCESS Offset: 00000000-000C3000 ToRead: F000 Read: F000
33 15:49:14.645 System FASTIO_MDL_READ FFFFF8A01D4C2920 f:\test.tar STATUS_UNSUCCESSFUL Offset: 00000000-000D2000 ToRead: F000 Read: 0
34 15:49:14.645 System IRP_MJ_READ/IRP_MN_MDL 00000004 FFFFF8A01D4C2920 f:\test.tar STATUS_SUCCESS Offset: 00000000-000D2000 ToRead: F000 Read: F000
35 15:49:14.645 System FASTIO_MDL_READ_COMPLETE FFFFF8A01D4C2920 f:\test.tar STATUS_SUCCESS
From the filespy output, we saw that read data is not 0, all the MDL read returns the not NULL data.
Both Windows explorer copy and DOS copy we saw the same IO behaviour which comes with MDL read. So we can’t understand why the copy from DOS prompt didn’t get back the correct data instead of null data.
We are much appreciate if anyone can give us suggestions.
Thanks
Tsang