NTFS doesn’t really store an IRP in the ETHREAD->TopLevelIrp field
(which is what is returned from IoGetTopLevelIrp). It stores a data
structure in which it keeps track of thread specific data. Think of the
TopLevelIrp field as a piece of file-system owned thread local storage.
The assert is NTFS telling you that some invariant of its internal
operations has been violated. My guess is that its locking is an issue.
You say “this happens in a pre-write callback”. I suspect if you dig a
bit deeper (try “kv” in WinDBG) you’ll see that this pre-write is itself
further embedded within the processing of some OTHER call. I have no
idea how Filter Manager is buffering you from these issues…
My suggestion: write to your log file from a different thread. In other
words, POST this to a worker thread and have it written from that worker
thread. That way you don’t worry about the state issues from
re-entrant calls.
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Hahn
Sent: Monday, April 11, 2005 5:56 PM
To: ntfsd redirect
Subject: [ntfsd] FltWrite in pagingio pre-write
Has anyone seen an assertion like this before in FltWrite?
*** Assertion failed: IrpContext->TopLevelIrpContext->CleanupStructure
NULL
*** Source File: d:\xpsprtm\base\fs\ntfs\write.c, line 1127
This happens in a pre-write callback where I am writing to a separate
write
data log file I am maintaining, before passing on the data for the
originally requested operation. This error happens in paging io
pre-write
callbacks but does not happen in cached io callbacks. Does anyone know
what
causes this or how to fix it? Nothing in the docs says anything about
top-level-irps being a problem for FltWrite.
I checked and IoGetTopLevelIrp() is returning a pointer to an Irp so
this
call is initiated by the file system (NTFS). What kind of operation is
the
file system doing in this type of call? I’m not really familiar with
top-level-irps.
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com