// ntifs.h
BOOLEAN MmIsRecursiveIoFault();
View the official Windows Driver Kit DDI referenceNo description available.
The MmIsRecursiveIoFault routine determines whether the current page fault is occurring during an I/O operation.
MmIsRecursiveIoFault returns TRUE if a file system I/O operation is in progress for the current thread, FALSE otherwise.
When a page fault occurs, the file system can call MmIsRecursiveIoFault to determine whether an I/O operation is in progress for the current thread.