标志为IRP_PAGING_IO的IRP有什么特殊的性质?

从目前的认识来看IRP_PAGING_IO是发生Page fault时从Cache Manager管理器发出的.
它具有很多不一般的特性.
 
1.此时文件系统应该避免获得任何资源(用来进行同步)
2.在处理读/写请求时绝不应该发生Page fault
3.绝不应该延迟这个请求进行异步处理
4.绝不应该因为任何原因阻塞这个请求
5.PaginIO不扩大文件
6.PagingIo读写的偏移是512 Align的
7.PagingIo读写的长度是512的整数倍
 
应该立即把这个请求交给底层设备驱动.

IRP_PAGING_IO means that the IRP is paging i/o, for example if the IRP is IRP_MJ_WRITE, then it is a paging write and since paging writes are not cached (are not wriites to file cache), IRP_PAGING_IO implies IRP_NOCACHE_IO, so to speak. IRP_NOCACHE_IO, and not IRP_PAGING_IO so to speak, means that the IRP is not paging i/o, but it is not cached. For example if the IRP is IRP_MJ_WRITE, then it is not a paging write, and it is non cached (is not a write to file cache). By way of example the user has opened the handle with CreateFile and FILE_FLAG_NO_BUFFERING. There some important differences between these two cases.
For example: in the case of paging i/o certain resources have been pre-acquired, whereas in the case of non paging i/o these resources have not been pre-acquired; paging i/o cannot extend the end of file, whereas non paging i/o can extend the end of file.

IRP_NOCACHE means "do not use the data cache" IRP_PAGING_IO means "this I/O is on behalf of the VM system" You will always see IRP_NOCACHE set if IRP_PAGING_IO is set in the IRP_MJ_READ or IRP_MJ_WRITE operation. You can see IRP_NOCACHE for a user level I/O operation that should bypass the data cache. For example, open a file and specify FILE_NO_INTERMEDIATE_BUFFERING and the I/O operations will be IRP_NOCACHE.

IRP_PAGING_IO is always IRP_NOCACHE. The reverse is not true. IRP_NOCACHE without IRP_PAGING_IO is: - allowed to grow the file - delivered to the FSD without any FCB locks already held This is the difference between it and IRP_PAGING_IO. Such a request is delivered due to WriteFile to a noncached file.


你可能感兴趣的:(职场,休闲,标志,irp,IRP_PAGING_IO)