Found the cause of the problem. The problem was neither in handling Fast-I/O requests nor in how my device was attached to the target one.
As discovered, eventually I didn't include one I/O dispatch handler in the driver dispatch table. That is, my code was:
for (UINT i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
pDriverObject->MajorFunction[i] = Dispatch;
Whereas it should has been:
for (UINT i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
pDriverObject->MajorFunction[i] = Dispatch;
The function I missed was IRP_MJ_PNP
- the Plug-and-Play manager request handler. Which is required by file system drivers. After fixing the code the problem has disappeared.
Thanks to all who worried :)