Paging Io Failed abruptly

Testing a database with my file system encryption filter driver having shadow file object design.

when large data inserted then flushviewofFile() api is called by app which Contentiously failed with error code 31 or 33.
most of the time i found the Paging I/O write FltWriteFile(…) failed with error STATUS_UNSUCCESSFUL.

Please help me to investigating this issue based on under what circumstances a Flush i.e. a paging io write can fail for MMAPED file.

can this happen because of RAM size or Out of memory issue ?

This behavior occurring on Win server 2008 R2 sp1.

Are you performing the paging write by using FltWriteFile()? If so, why?
Are you in the same thread context as the paging thread? Are you certain
this is what is failing? Taking a filespy trace to validate this would
be recommended.

There are several things that could be going wrong, without more
information it is hard to guess at what the problem could be.

Pete


Kernel Drivers
Windows File System and Device Driver Consulting
www.KernelDrivers.com http:</http:>
866.263.9295

------ Original Message ------
From: xxxxx@gmail.com
To: “Windows File Systems Devs Interest List”
Sent: 4/15/2015 11:53:36 PM
Subject: [ntfsd] Paging Io Failed abruptly

>Testing a database with my file system encryption filter driver having
>shadow file object design.
>
>when large data inserted then flushviewofFile() api is called by app
>which Contentiously failed with error code 31 or 33.
>most of the time i found the Paging I/O write FltWriteFile(…) failed
>with error STATUS_UNSUCCESSFUL.
>
>Please help me to investigating this issue based on under what
>circumstances a Flush i.e. a paging io write can fail for MMAPED file.
>
>can this happen because of RAM size or Out of memory issue ?
>
>This behavior occurring on Win server 2008 R2 sp1.
>
>—
>NTFSD is sponsored by OSR
>
>OSR is hiring!! Info at http://www.osr.com/careers
>
>For our schedule of debugging and file system seminars visit:
>http://www.osr.com/seminars
>
>To unsubscribe, visit the List Server section of OSR Online at
>http://www.osronline.com/page.cfm?name=ListServer

Thanks a lot Pete & sorry for late reply.

Yes i am in the same thread context.
FltWriteFile() failed for huge writelength with status unsuccessful.
How is it possible??
on their way down all other paging write getting succeeded without fail.

Since in paging I/O requests setting the IoStatus.Information with the
original requested size (page aligned), even truncating the actual I/O to
the current end-of-file.is it the possible problem??

Give me some pointers.

Paging Io Write is failing with status unsuccessful. :frowning:
Are all the paging Io Write operation always Synchronous???
i think CC need data immediately so paging io must not be asynchronous.
If YES i mean Paging io may be async then is there need to use workitem
For them or not?

Thanks,
Mani

STATUS_UNSUCCESSFUL is an unusual error. You may need to walk with the debugger to figure out where that’s arising.

No, paging writes can be synchronous (IRP_MJ_SYNCHRONOUS_PAGING_IO) or non-synchronous. The mapped page writer uses quite a bit of asynchronous paging write operations.

You can perform all I/O synchronously if you so choose. If you wish to do it in the background (which may improve performance) you could use worker threads, or you could have a queue and a dedicated thread (or pool) that services those asynchronous paging I/O operations. That’s entirely up to you.

Tony
OSR

> Are all the paging Io Write operation always Synchronous???

No for sure.

i think CC need data immediately so paging io must not be asynchronous.

Even reads can be async (Cc read-ahead).


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com

==>The mapped page writer uses quite a bit of asynchronous paging
write operations.

That means once CcFlushChache() called it tells Mm to flush their memory mapped cache too with MiFlushSection()?? and this Miflush is async??
In NT there is no call for flush and purge for Memory Manager??? :frowning:

thanks a lot and Tony & maxim. :slight_smile:

CcFlushCache and CcPurgeCache work. If the file has no cache but is memory mapped, Cc passes the request through to Mm.

Tony
OSR