Verify I/O priority values

I am trying to set I/O priority by below methods,
In user mode:Method 1

  1. CreateFile()
  2. SetFileInformationByHandle(FileIoPriorityHintInfo)
  3. ReadFile()

In Minifilter driver: Method 2

  1. FltCreateFile()
  2. FltSetIoPriorityHintIntoFileObject()
  3. FltReadFile()

When I set priority using method 1 and analyse procmon logs,
priority values got reflected as i set in SetFileInformationByHandle() API.

When I set priority using Method 2 and analyse procmon logs,
Priority values are not shown in procmon logs.

In method 2, How do I verify that priority values given by me are reflected or not?
Why procmon not showing priority values?

Thanks in advance.

What is the altitude for your filter? Is it less than procmon’s altitude which is by default 385200 ?

>>What is the altitude for your filter? Is it less than procmon’s altitude which
is by default 385200 ?
I tried both by keeping procmon below and above my driver. In both cases I don’t see priority values.

I did below tryout,
Instead of calling FltReadFile() I tried to read file using FltPerformSynchronousIo() API.
When I set priority values using FltSetIoPriorityHintIntoCallbackData() while issuing IRP_MJ_READ using FltPerformSynchronousIo() API, this priority values gets reflected and procmon shows
that priority values.
Now I am really confused,
Why procmon not shows priority values when I set it using FltSetIoPriorityHintIntoFileObject() API?
Is procmon unable to read priority values from File Object? or priority values set in File Object are not properly convey to file system via Filter Manager?

any help would be greatly appreciated.

Anyone from Microsoft can provide inputs?

Sounds like it’s either a bug in FltMgr or a bug in Process Monitor.

I would throw in a lower filter that calls FltGetIoPriorityHint and prints
the results.

-scott
OSR
@OSRDrivers

wrote in message news:xxxxx@ntfsd…

Anyone from Microsoft can provide inputs?

Thanks a lot, Scott.
I did tryout suggested by you and in the lower filter, it shows proper priority values which I set in the upper filter.
Maybe procmon not able to read/show priority values from File Object.