My FSD does not implement a AcquireForModWrite/ReleaseForModWrite routines.
Recently we have been testing large file copy transfers from a Windows NFS product. I’m pretty sure this product only lives in user space, listens on the typical NFS ports, and translates NFS protocols into local writes.
Come in this morning after doing a weekend long test and my writes appeared to be hung. I fired up ProcMon and I saw a ton of calls into my virtual drive from System for
FASTIO_ACQUIRE_FOR_MOD_WRITE. All of these calls were getting a CANT WAIT code and it never stopped. Reading a nice little NTInsider article, it appears we are OK since we use the standard NT locking mechanism (ExAcquireResourceXXXX on Fcb->Header.Resource) A lot of this code is duplicated from CDFS btw.
In any case, the thing I see as bizzare is the offset reported by ProcMon for FASTIO_ACQUIRE_FOR_MOD_WRITE. On 64-bit Machines, its 18,446,737,888,987,347,952 and on 32-bit Machines its 9,702,377,320,705,244,344.
Is this wrong or is MPW just saying it wants access to the whole file? Looks like a bit flipped negative to me.
If this is OK then, I can’t figure why the CANT WAIT happened. We don’t allow FAST IO for any writes, so should I just implement those callbacks and return STATUS_INVALID_DEVICE_REQUEST?