FLT_PREOP_SYNCHRONIZE and File Names

If the PreOp returns Synchronize, does that mean the PostOp callback
would only need to call FltGetFileNameInformation and not
FltGetTunneledName since the operation has already been performed?
Also, is it safe to call FltGetFileNameInformation from non-synced
PostOp?

Performance wise, is is better to remember the name in the stream
context rather than calling FltGetFileNameInformation in each operation

  • i.e. does the Filter manager cache the FLT_FILE_NAME_INFORMATION
    structures, without reallocating and reparsing them or would assuming so
    be a performance hit?


Kind regards, Dejan M.
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32
developers.
Alfa File Monitor - File monitoring library for Win32 developers.

FLT_PREOP_SYNCHRONIZE has nothing to do with the operation of
FltGetTunneledName or FltGetFileNameInformation.

You must call FltGetFileNameInformation in the pre-op and FltGetTunneledName
in the post-op, passing the pointer you got from the pre-op call. Note that
FltGetTunneledName is only needed for create, hard-link, and rename
operations.

You can call FltGetFileNameInformation in the post-op with the exceptions
noted in the documentation. However, it is not always guaranteed to be
valid or available. For example, I’ve never seen a valid one in a
IRP_MJ_FAST_IO_CHECK_IF_POSSIBLE callback.

For this reason, you should call it once (probably in Create) and save it in
the context. The Filter Manager caches the information, but it’s still more
efficient to keep it in your context.

Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Dejan Maksimovic
Sent: Saturday, July 30, 2005 11:53 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] FLT_PREOP_SYNCHRONIZE and File Names

If the PreOp returns Synchronize, does that mean the PostOp callback
would only need to call FltGetFileNameInformation and not
FltGetTunneledName since the operation has already been performed?
Also, is it safe to call FltGetFileNameInformation from non-synced
PostOp?

Performance wise, is is better to remember the name in the stream
context rather than calling FltGetFileNameInformation in each operation

  • i.e. does the Filter manager cache the FLT_FILE_NAME_INFORMATION
    structures, without reallocating and reparsing them or would assuming so
    be a performance hit?


Kind regards, Dejan M.
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32
developers.
Alfa File Monitor - File monitoring library for Win32 developers.


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@comcast.net
To unsubscribe send a blank email to xxxxx@lists.osr.com