I am trying to access the NTFS cluster details in the minifilter driver. I am trying to send IOCTL calls from the given sample minispy filter driver code. I have added following code in the post-operation callbacks function.
if (!NT_SUCCESS( status )) {
DbgPrint(“FltCreateFile failed ! ntSts=0x%x.\n”, status);
}
… (some more code)
However FltCreateFile function is failing and giving the following error,
FltCreateFile failed ! ntSts=0xc0000054
It means “A requested read/write cannot be granted due to a conflicting file lock”.
Does I am missing any thing? if not then how to solve this issue. Please help me.
AFAICS you have done a volume open with an implied read lock. You have said “Don’t allow this open unless when you retuirn you can guarantee that noone has a write or delete handle to it”.
This is fine if you know that the volume is quiescent. Otherwise it is likely to fail (although LOCK_CONFLICT seems odd).
You can test what I’m saying by adding FILE_SHARE_WRITE and FILE_SHARE_DELETE to the sharing parameters - but bear in mind that at that stage your clusters can and will move around.
Also search the archives. I’m pretty sure that this has been discussed a whole bunch.
I have tried the same but still getting the same error. Also I have searched on the internet and tried some hints like enabling the IRP_PAGING_IO flag in the IRP. But unable to solve the issue. Please let me if I am doing any thing wrong here.
Sorry for last reply. it looks like something is wired. some times works while some times not…don’t know whats’ wrong with it. Is there any other way to get NTFS cluster information.
Sorry for last reply. it looks like something is wired. some times works
while some times not…don’t know whats’ wrong with it. Is there any other
way to get NTFS cluster information.
Thanks,
Ganesh
NTFSD is sponsored by OSR
For our schedule of debugging and file system seminars (including our new fs
mini-filter seminar) visit: http://www.osr.com/seminars