When should call FltSetCallbackDataDirty()

Hi,

I have quick question to verify what I understand when should call FltSetCallbackDataDirty().
According to MSDN, "A minifilter driver’s preoperation (PFLT_PRE_OPERATION_CALLBACK) or postoperation (PFLT_POST_OPERATION_CALLBACK) callback routine can modify the contents of the callback data (FLT_CALLBACK_DATA) structure for the operation. If it does, it must then call FltSetCallbackDataDirty unless it has changed the contents of the callback data structure’s IoStatus field. ".

So, if I set IoStatus like below in Pre-Operation callback,

IoStatus.Information = 0;
IoStatus.Status = STATUS_NO_SUCH_FILE;

I don’t need to FltSetCallbackDataDirty(). Is it correct?

Regards,
Henky

That is correct, when you set the status and information fields of
IoStatus you do not need to set it to dirty. Most any other change does
require you to mark it as dirty if you want the change to persist to
drivers below you.

Pete


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

------ Original Message ------
From: xxxxx@yahoo.com
To: “Windows File Systems Devs Interest List”
Sent: 11/5/2015 11:59:48 PM
Subject: [ntfsd] When should call FltSetCallbackDataDirty()

>Hi,
>
>I have quick question to verify what I understand when should call
>FltSetCallbackDataDirty().
>According to MSDN, “A minifilter driver’s preoperation
>(PFLT_PRE_OPERATION_CALLBACK) or postoperation
>(PFLT_POST_OPERATION_CALLBACK) callback routine can modify the contents
>of the callback data (FLT_CALLBACK_DATA) structure for the operation.
>If it does, it must then call FltSetCallbackDataDirty unless it has
>changed the contents of the callback data structure’s IoStatus field.
>”.
>
>So, if I set IoStatus like below in Pre-Operation callback,
>
>IoStatus.Information = 0;
>IoStatus.Status = STATUS_NO_SUCH_FILE;
>
>I don’t need to FltSetCallbackDataDirty(). Is it correct?
>
>Regards,
>Henky
>
>—
>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