A problem on STATUS_REPARSE

Hi,
I’m using STATUS_REPARSE to redirect original file c:\temp1\a.doc to
c:\temp2\b.doc.
In IRP_MJ_CREATE, I replace Irp->FileObject->FileName with new file
name buffer and free the original filename buffer. After that I
complete the IRP as follow:

Irp->IoStatus.Information = IO_REPARSE;
Irp->IoStatus.Status = STATUS_REPARSE;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_REPARSE;

The problem is after this IRP is returned to IO manager, I do not see
IO manager send new IRP with the new file name to FS driver as I expected.
The document opened is still original one: c:\temp1\a.doc not
c:\temp2\b.doc.

I can not figure our what wrong is. Do I miss something before I return
STATUS_REPARSE?

Thank you for your help

Try

??\c:\temp2\b.doc

Max

----- Original Message -----
From: “David Wu”
To: “File Systems Developers”
Sent: Sunday, July 27, 2003 10:12 PM
Subject: [ntfsd] A problem on STATUS_REPARSE

> Hi,
> I’m using STATUS_REPARSE to redirect original file c:\temp1\a.doc to
> c:\temp2\b.doc.
> In IRP_MJ_CREATE, I replace Irp->FileObject->FileName with new file
> name buffer and free the original filename buffer. After that I
> complete the IRP as follow:
>
> Irp->IoStatus.Information = IO_REPARSE;
> Irp->IoStatus.Status = STATUS_REPARSE;
> IoCompleteRequest(Irp, IO_NO_INCREMENT);
> return STATUS_REPARSE;
>
> The problem is after this IRP is returned to IO manager, I do not see
> IO manager send new IRP with the new file name to FS driver as I expected.
> The document opened is still original one: c:\temp1\a.doc not
> c:\temp2\b.doc.
>
> I can not figure our what wrong is. Do I miss something before I return
> STATUS_REPARSE?
>
> Thank you for your help
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

It works. Thanks Max.
I still have one problem on document saving. During document saving,
I can see two rename steps. One is from doc file to tmp file. Other is
from a new tmp file to doc file. But after those two renames, MS Word
give an error message “Word can not complete the saving due to a file
permission error”. Where is the problme?

Thanks again for your help.

Try

??\c:\temp2\b.doc

Max

----- Original Message -----
From: “David Wu”
> To: “File Systems Developers”
> Sent: Sunday, July 27, 2003 10:12 PM
> Subject: [ntfsd] A problem on STATUS_REPARSE
>
>
> > Hi,
> > I’m using STATUS_REPARSE to redirect original file c:\temp1\a.doc to
> > c:\temp2\b.doc.
> > In IRP_MJ_CREATE, I replace Irp->FileObject->FileName with new file
> > name buffer and free the original filename buffer. After that I
> > complete the IRP as follow:
> >
> > Irp->IoStatus.Information = IO_REPARSE;
> > Irp->IoStatus.Status = STATUS_REPARSE;
> > IoCompleteRequest(Irp, IO_NO_INCREMENT);
> > return STATUS_REPARSE;
> >
> > The problem is after this IRP is returned to IO manager, I do not see
> > IO manager send new IRP with the new file name to FS driver as I expected.
> > The document opened is still original one: c:\temp1\a.doc not
> > c:\temp2\b.doc.
> >
> > I can not figure our what wrong is. Do I miss something before I return
> > STATUS_REPARSE?
> >
> > Thank you for your help
> >
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com