If I open a file with ZwOpenFile() and don’t specify
FILE_SYNCHRONOUS_IO_XXXXX, is it possible for ZwQueryInformationFile() to
return STATUS_PENDING ?
My first guess is “no”, because there’s no way to specify an event handle to
be signalled upon eventual completion. On the other hand, the underlying
IRP could certainly be processed asynchronously.
Thanks,
Carl Appellof
No you should never get STATUS_PENDING from a ZwQueryINformationFile().
This API is synchronous - it waits (alertable, so yes, this won’t hang
the thread if the thread is trying to terminate), until the query
finishes.
File systems /filters etc. return STATUS_PENDING has nothing to do
really with respect to an API being synchronous. Drivers should be able
to return STATUS_PENDING on practically every IRP (though it does take
on an enhanced meaning for certain kinds of IRPs, such as the oplock
FSCTLs, all of this has been discussed before on NTFSD & is probably in
Tony’s FAQ somewhere).
For the IRP_MJ_QUERY_INFORMATION - yes it’s perfectly legal for
filters/filesystems to return STATUS_PENDING.
Ravi
This posting is provided “AS IS” with no warranties, and confers no
rights.
-----Original Message-----
From: Carl Appellof [mailto:xxxxx@nospam.veritas.com]
Sent: Thursday, May 02, 2002 3:31 PM
To: File Systems Developers
Subject: [ntfsd] Is ZwQueryInformationFile always synchronous?
If I open a file with ZwOpenFile() and don’t specify
FILE_SYNCHRONOUS_IO_XXXXX, is it possible for ZwQueryInformationFile()
to return STATUS_PENDING ?
My first guess is “no”, because there’s no way to specify an event
handle to be signalled upon eventual completion. On the other hand, the
underlying IRP could certainly be processed asynchronously.
Thanks,
Carl Appellof
You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to %%email.unsub%%