How to get filename and filepath from IRP_MJ_WRITE in diskperf.sys ?

How to get filename and filepath from IRP_MJ_WRITE in diskperf.sys ?

I use DDK diskperf code , use WINDBG debug diskperf.sys , I find IRP_MJ_WRITE’s FileObject is awalys NULL , WHY ???

I want to get filepath filename ,How to do ??

> How to get filename and filepath from IRP_MJ_WRITE
Oh not again…
[How about a full path to the process’ exe… Can be a useful
discussion…]

How to get filename and filepath from IRP_MJ_WRITE in diskperf.sys ?
disperf is a disk filter and as such does not know anything about files.

----- Original Message -----
From: <pliceman_110>
To: “Windows File Systems Devs Interest List”
Sent: Wednesday, January 03, 2007 5:31 AM
Subject: [ntfsd] How to get filename and filepath from IRP_MJ_WRITE in
diskperf.sys ?

> How to get filename and filepath from IRP_MJ_WRITE in diskperf.sys ?
>
> I use DDK diskperf code , use WINDBG debug diskperf.sys , I find
> IRP_MJ_WRITE’s FileObject is awalys NULL , WHY ???
>
> I want to get filepath filename ,How to do ??
>
> —
> 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</pliceman_110>

man (policeman)!!!

disk perf is a disk filter, the concept of files doesnt exist there! below
the file system all file info are lost!

Write a file , this data is pass this Path

like it mydata->FSD->DISK

I get file info in my sfilter.sys and save it info , can’t i send it file info to below diskperf.sys , Let’s diskperf.sys receive it file info and printing out ?

>Write a file , this data is pass this Path

like it mydata->FSD->DISK

Yes, but below the FS layer, the OS need not know what a file is, after all
it is just a stream of bytes that need to b writen on a magnetic media!

I get file info in my sfilter.sys and save it info , can’t i send it file
info to below diskperf.sys , Let’s diskperf.sys receive it file info and
printing out ?

…and why wont u werite it straight out from sfilter???

what you say is do able, though I cannot comment on your design, if u want
to write info out of your disk filter it is possible, but remember, if u use
the zw* libraries, it essentially means that wht u write out of diskperf,
*WILL* go back to the IO MANAGER, and come back down again via the FS stack
and via ur driver again!!!

amitr0