Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results
The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.
Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/
Hi Folks,
I am getting a hang in my minifilter when I try to Delete a file in the PostCleanup. The hang occurs as the thread is waiting for an oplock.
From the dump the oplock is shared RH .
So I was think of ways I need to handle the deletion for the file.
1.Post it to the Worker thread and purge the File cache, so that oplocks on the file are gone.
2.Wait of Oplock break notify to start deletion of the file .
Any inputs on the pros and cons of these approaches ?
Regards,
Mehtab
@Symantec
Upcoming OSR Seminars | ||
---|---|---|
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead! | ||
Writing WDF Drivers | 7 Dec 2020 | LIVE ONLINE |
Internals & Software Drivers | 25 Jan 2021 | LIVE ONLINE |
Developing Minifilters | 8 March 2021 | LIVE ONLINE |
Comments
Why did you choose PostCleanup and how are you trying to delete the file? If you’re sending a SetDisposition on the cleaned up File Object then you’re pretty much doomed.
-scott
OSR
We monitor file copy scenarios. We need to read the file content of the file and check if it contains data of interest. So cleanup provides a place to analyze and delete the file in the PostCleanup.
Yes we are using SetDisposition , however we are rolling our own create on the file to delete the file. If that fails we try DeleteOnClose.
Regards,
Mehtab
@Symantec
Are you opening in the PostCleanup callback or doing it in a worker thread? Also, who owns the oplock when you’re stuck? !fltmgr.oplock should tell you.
-scott
OSR