It’s not very typical to have a paging file on the disk in this type of
driver. And by not having a paging file on your virtual disk you break the
circular dependency (i.e. you trigger a paging I/O to a different disk). I
don’t have much experience with them, but according to this article even
native boot VHDs don’t support having a paging file on them:
http://technet.microsoft.com/en-us/library/dd440865(WS.10).aspx
If you do want to support this for some reason, you have two issues:
-
Determining if a particular I/O is paging I/O or not at the volume/disk
layer. You’ll either need a file system filter assist on this or you’ll need
to keep track of the sectors that make up the paging file -
Sending paging I/Os to the FSD to deal with the paging operations (i.e.
IRP_MJ_READ requests with the IRP_PAGING_IO bit set). You can’t do this with
the Zw APIs and paging I/O has some special rules that you’ll need to figure
out and obey.
If I were you I’d spend some time researching to see if I could avoid
getting the paging file on the virtual disk. If it’s possible to hook into
whatever support they’re using for native boot you’ll be much happier.
-scott
–
Scott Noone
Consulting Associate and Chief System Problem Analyst
OSR Open Systems Resources, Inc.
http://www.osronline.com
wrote in message news:xxxxx@ntdev…
Thanks, Don.
I apologize. What I meant was that the paging I/O to my virtual disk would
have to eventually be serviced by Zw[Read|Write]File(), so I’m wondering if
anyone has a similar situation that they’ve dealt with “properly” or at
least successfully.
- Virtual disk depends on Zw[Read|Write]File()
- Zw[Read|Write]File() depends on FS drivers, filters, etc.
- One of these has a piece that gets paged out
- A time comes when that piece needs to be paged back in… From the virtual
disk
I’ll have a look at the sample you’ve recommended.