Hi All,
I am having a problem with a file system I am developing. It basically comes
down to zeroing a buffer that is passed into the filesystem for the paging
io path. The reason for zeroing the buffer is the read is over a hole (and
no we don’t yet support the windows sparse file ioctl interface),
unfortunately when the buffer is zeroed the handler returns from the paging
request (so this file system supports holes transparently), the pages are
marked as dirty and flushed by the lazy writer at some point later.
So on filesystem block sizes greater than PAGE_SIZE, extents are allocated
(so the hole or part there of is converted) and when we read off disk
(before or past where the lazy writer flushed pages to) we get junk based on
what is on disk. So how can I zero a buffer without dirtying the pages(s)?
So the lazy writer doesn’t unnecessarily flush zeroed pages to disk.
PS I have tried using the CcPinRead API but ran into problems with
exceptions thrown due to STATUS_IN_PAGE_ERROR, I put it down to something
you don’t want to do in the fault handler (haven’t investigated that any
further as yet) my assumption was the fault handler pins the pages anyway
and calls CcSetDirtyPinnedData() or something to that effect…
Thanks,
- Ian Costello