1 /*++
2 
3   Copyright (c) Microsoft Corporation
4 
5   Module Name:
6 
7   FxIoQueueKm.hpp
8 
9   Abstract:
10 
11   This module implements km specific functions for FxIoQueue.
12 
13   Author:
14 
15 
16 
17   Environment:
18 
19   Kernel mode only
20 
21   Revision History:
22 
23   --*/
24 
25 #ifndef _FXIOQUEUEKM_HPP_
26 #define _FXIOQUEUEKM_HPP_
27 
28 __inline
29 BOOLEAN
30 FxIoQueue::IsPagingIo(
31     __in MdIrp Irp
32     )
33 /*++
34 
35   Routine Description:
36   Paging IO is treated especially depending on what Forward Progress policy
37   was set on the Queue
38   --*/
39 {
40     //
41     // NOTE: IRP_INPUT_OPERATION has the same value as IRP_SYNCHRONOUS_PAGING_IO
42     // and IRP_MOUNT_COMPLETION the same as  IRP_PAGING_IO  so how does one know if
43     // the IO is a paging IO ?
44     //
45 
46     // One can assume that if IRP_PAGING_IO is set and the MJ code is not
47     // FILE_SYSTEM_CONTROL then it is a paging I/O.
48     //
49     if (Irp->Flags & IRP_PAGING_IO) {
50       if (IoGetCurrentIrpStackLocation(Irp)->MajorFunction
51     != IRP_MJ_FILE_SYSTEM_CONTROL) {
52         return  TRUE;
53       }
54     }
55 
56     return FALSE;
57 }
58 
59 #endif // _FXIOQUEUEKM_HPP
60