Reuse or build another IRP for STATUS_REPARSE?

Hi,

To explain the situation, I have a fileA that is a reparse point file and
points to a target file - fileB.
When fileA is deleted, its target file - fileB needs also be deleted.

My filter needs to delete two files on a request after STATUS_REPARSE is
returned from the lower driver.
I can reissue the IRP to the lower driver by setting FILE_OPEN_REPARSE_POINT
to delete the main file - fileA. But I also want to return STATUS_REPARSE
(the file name of FileObject will be set to the target file - fileB) to I/O
Manager and let the operating system delete it gracefully.
My question is: how can I duplicate ( clone ) the current IRP and change
some values of the new IRP, then send the IRP to the lower driver? Because I
want to keep the current IRP and set its IoStatus as STATUS_REPARSE.

Thank you very much,

Shangwu

it seems like u r actually trying to develop a driver which keeps
backups in a one drive and actual copy in another
drive…anyways…my suggestion would be once u come to know that u
r gonna delete a file…u just store in a list the corresponding file
to be deleted…and in a worker thread check for new entries in the
list and delete the backup file there…and thsi worker trhead can be
preferably triggered from the files IRP_MJ_CLOSE…where we can
actually confirm (by querying) whether the file will be deleted or not

-Vikhram

On Mon, 7 Mar 2005 14:57:57 -0500, Shangwu wrote:
> Hi,
>
> To explain the situation, I have a fileA that is a reparse point file and
> points to a target file - fileB.
> When fileA is deleted, its target file - fileB needs also be deleted.
>
> My filter needs to delete two files on a request after STATUS_REPARSE is
> returned from the lower driver.
> I can reissue the IRP to the lower driver by setting FILE_OPEN_REPARSE_POINT
> to delete the main file - fileA. But I also want to return STATUS_REPARSE
> (the file name of FileObject will be set to the target file - fileB) to I/O
> Manager and let the operating system delete it gracefully.
> My question is: how can I duplicate ( clone ) the current IRP and change
> some values of the new IRP, then send the IRP to the lower driver? Because I
> want to keep the current IRP and set its IoStatus as STATUS_REPARSE.
>
> Thank you very much,
>
> Shangwu
>
> —
> Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>


The reasonable man adapts himself to the world;
The unreasonable one persists in trying to adapt the world to himself.
Therefore all progress depends on the unreasonable man.
–George Bernard Shaw