STATUS_REPARSED and Callback

Hello,

In my minifilter I need to return a

Data->IoStatus.Status = STATUS_REPARSE;

Data->IoStatus.Information = IO_REPARSE;

and with a callback, cache the resulting FileObject (Redirected’s
fileobject)

But, if I return from the PreOpCreateFile the
FLT_PREOP_SUCCESS_WITH_CALLBACK,

in the post op I get an Invalid Parameter in the Data->IoStatus.Status.

There is a way to:

  1. [PreOp] inform the IoManager to reparse the Create IRP.

  2. [PostOp] get the resulting redirected fileobject

Thank’s

In Vista you can use the new Extra Create Parameters
to know that a create is a result of a reparse you did
earlier.

On previous OSs there is no good way. The only thing
that you will see in the new create that you return to
the IO manager is the path. You can tweak the path so
that you’ll recognize it, but it needs to still be
valid so that filters above you can use it.

— Gian-luca Tenti
wrote:

> Hello,
>
>
>
> In my minifilter I need to return a
>
>
>
> Data->IoStatus.Status = STATUS_REPARSE;
>
> Data->IoStatus.Information = IO_REPARSE;
>
>
>
> and with a callback, cache the resulting FileObject
> (Redirected’s
> fileobject)
>
> But, if I return from the PreOpCreateFile the
> FLT_PREOP_SUCCESS_WITH_CALLBACK,
>
> in the post op I get an Invalid Parameter in the
> Data->IoStatus.Status.
>
>
>
> There is a way to:
>
>
>
> 1) [PreOp] inform the IoManager to reparse the
> Create IRP.
>
> 2) [PostOp] get the resulting redirected
> fileobject
>
>
>
> Thank’s
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: unknown
> lmsubst tag argument: ‘’
> To unsubscribe send a blank email to
xxxxx@lists.osr.com

Thank’s Randy,

I use the RtlXxXUnicodePrefix to generate the target file, now I’m modifying
The code to implement a reverse find to intercept the create operation for the reparsed file.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Randy Cook
Sent: luned? 13 febbraio 2006 17.39
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] STATUS_REPARSED and Callback

In Vista you can use the new Extra Create Parameters
to know that a create is a result of a reparse you did
earlier.

On previous OSs there is no good way. The only thing
that you will see in the new create that you return to
the IO manager is the path. You can tweak the path so
that you’ll recognize it, but it needs to still be
valid so that filters above you can use it.

— Gian-luca Tenti
wrote:

> Hello,
>
>
>
> In my minifilter I need to return a
>
>
>
> Data->IoStatus.Status = STATUS_REPARSE;
>
> Data->IoStatus.Information = IO_REPARSE;
>
>
>
> and with a callback, cache the resulting FileObject
> (Redirected’s
> fileobject)
>
> But, if I return from the PreOpCreateFile the
> FLT_PREOP_SUCCESS_WITH_CALLBACK,
>
> in the post op I get an Invalid Parameter in the
> Data->IoStatus.Status.
>
>
>
> There is a way to:
>
>
>
> 1) [PreOp] inform the IoManager to reparse the
> Create IRP.
>
> 2) [PostOp] get the resulting redirected
> fileobject
>
>
>
> Thank’s
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: unknown
> lmsubst tag argument: ‘’
> To unsubscribe send a blank email to
xxxxx@lists.osr.com


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@ibsnetwork.it
To unsubscribe send a blank email to xxxxx@lists.osr.com

Try using GUIDs in text form for prefixes instead.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Gian-luca Tenti”
To: “Windows File Systems Devs Interest List”
Sent: Monday, February 13, 2006 7:53 PM
Subject: RE: [ntfsd] STATUS_REPARSED and Callback

Thank’s Randy,

I use the RtlXxXUnicodePrefix to generate the target file, now I’m modifying
The code to implement a reverse find to intercept the create operation for the
reparsed file.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Randy Cook
Sent: lunedì 13 febbraio 2006 17.39
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] STATUS_REPARSED and Callback

In Vista you can use the new Extra Create Parameters
to know that a create is a result of a reparse you did
earlier.

On previous OSs there is no good way. The only thing
that you will see in the new create that you return to
the IO manager is the path. You can tweak the path so
that you’ll recognize it, but it needs to still be
valid so that filters above you can use it.

— Gian-luca Tenti
wrote:

> Hello,
>
>
>
> In my minifilter I need to return a
>
>
>
> Data->IoStatus.Status = STATUS_REPARSE;
>
> Data->IoStatus.Information = IO_REPARSE;
>
>
>
> and with a callback, cache the resulting FileObject
> (Redirected’s
> fileobject)
>
> But, if I return from the PreOpCreateFile the
> FLT_PREOP_SUCCESS_WITH_CALLBACK,
>
> in the post op I get an Invalid Parameter in the
> Data->IoStatus.Status.
>
>
>
> There is a way to:
>
>
>
> 1) [PreOp] inform the IoManager to reparse the
> Create IRP.
>
> 2) [PostOp] get the resulting redirected
> fileobject
>
>
>
> Thank’s
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: unknown
> lmsubst tag argument: ‘’
> To unsubscribe send a blank email to
xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@ibsnetwork.it
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Keep in mind that if you change the name of the file
to something that is not valid, filters above you will
not work correctly. I can think of lots of scenarios
where that is very bad.

— “Maxim S. Shatskih”
wrote:

> Try using GUIDs in text form for prefixes
> instead.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> ----- Original Message -----
> From: “Gian-luca Tenti”
>
> To: “Windows File Systems Devs Interest List”
>
> Sent: Monday, February 13, 2006 7:53 PM
> Subject: RE: [ntfsd] STATUS_REPARSED and Callback
>
>
> Thank’s Randy,
>
> I use the RtlXxXUnicodePrefix to generate the target
> file, now I’m modifying
> The code to implement a reverse find to intercept
> the create operation for the
> reparsed file.
>
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf
> Of Randy Cook
> Sent: lunedì 13 febbraio 2006 17.39
> To: Windows File Systems Devs Interest List
> Subject: Re: [ntfsd] STATUS_REPARSED and Callback
>
> In Vista you can use the new Extra Create Parameters
> to know that a create is a result of a reparse you
> did
> earlier.
>
> On previous OSs there is no good way. The only
> thing
> that you will see in the new create that you return
> to
> the IO manager is the path. You can tweak the path
> so
> that you’ll recognize it, but it needs to still be
> valid so that filters above you can use it.
>
> — Gian-luca Tenti
> wrote:
>
> > Hello,
> >
> >
> >
> > In my minifilter I need to return a
> >
> >
> >
> > Data->IoStatus.Status = STATUS_REPARSE;
> >
> > Data->IoStatus.Information = IO_REPARSE;
> >
> >
> >
> > and with a callback, cache the resulting
> FileObject
> > (Redirected’s
> > fileobject)
> >
> > But, if I return from the PreOpCreateFile the
> > FLT_PREOP_SUCCESS_WITH_CALLBACK,
> >
> > in the post op I get an Invalid Parameter in the
> > Data->IoStatus.Status.
> >
> >
> >
> > There is a way to:
> >
> >
> >
> > 1) [PreOp] inform the IoManager to reparse the
> > Create IRP.
> >
> > 2) [PostOp] get the resulting redirected
> > fileobject
> >
> >
> >
> > Thank’s
> >
> >
> > —
> > Questions? First check the IFS FAQ at
> > https://www.osronline.com/article.cfm?id=17
> >
> > You are currently subscribed to ntfsd as: unknown
> > lmsubst tag argument: ‘’
> > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as:
> xxxxx@ibsnetwork.it
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: unknown
> lmsubst tag argument: ‘’
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>

Thank’s Randy & Maxim

Before REPARSE a Create’s IRP I check if the target object exist.
My problem is now resolved:

  1. in the preCreate I create an entry in a list in wich I copy the Original and Destination Object’s name and set to NULL the OrigFileObject and the DestFileObject.

  2. in the preCreate of the Destination Object I look at the list and find if exist an item with a match between Destination File Name and the opening file’s name, if exist I set tha context to the list item and call the postop

  3. in the postop I copy the fileobject returned (DestFileObject) and create the OrigFileObject (FltCreate) with the same parameter.

Now I have also a cached list of opened Object that I close in the ClosePreop.

Thath’s work fine, and I’m now able to append two directory list (dest + orig).

I’ve read that the FileObject pointer is unique.

I’ve in mind to test a new way: to set a flag’s bit (not used by the system) before reparse and look in every Preop if the flag’s bit is set (the fltmanager do a flag’s back copy?)

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Randy Cook
Sent: mercoled? 15 febbraio 2006 23.23
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] STATUS_REPARSED and Callback

Keep in mind that if you change the name of the file
to something that is not valid, filters above you will
not work correctly. I can think of lots of scenarios
where that is very bad.

— “Maxim S. Shatskih”
wrote:

> Try using GUIDs in text form for prefixes
> instead.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> ----- Original Message -----
> From: “Gian-luca Tenti”
>
> To: “Windows File Systems Devs Interest List”
>
> Sent: Monday, February 13, 2006 7:53 PM
> Subject: RE: [ntfsd] STATUS_REPARSED and Callback
>
>
> Thank’s Randy,
>
> I use the RtlXxXUnicodePrefix to generate the target
> file, now I’m modifying
> The code to implement a reverse find to intercept
> the create operation for the
> reparsed file.
>
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf
> Of Randy Cook
> Sent: luned? 13 febbraio 2006 17.39
> To: Windows File Systems Devs Interest List
> Subject: Re: [ntfsd] STATUS_REPARSED and Callback
>
> In Vista you can use the new Extra Create Parameters
> to know that a create is a result of a reparse you
> did
> earlier.
>
> On previous OSs there is no good way. The only
> thing
> that you will see in the new create that you return
> to
> the IO manager is the path. You can tweak the path
> so
> that you’ll recognize it, but it needs to still be
> valid so that filters above you can use it.
>
> — Gian-luca Tenti
> wrote:
>
> > Hello,
> >
> >
> >
> > In my minifilter I need to return a
> >
> >
> >
> > Data->IoStatus.Status = STATUS_REPARSE;
> >
> > Data->IoStatus.Information = IO_REPARSE;
> >
> >
> >
> > and with a callback, cache the resulting
> FileObject
> > (Redirected’s
> > fileobject)
> >
> > But, if I return from the PreOpCreateFile the
> > FLT_PREOP_SUCCESS_WITH_CALLBACK,
> >
> > in the post op I get an Invalid Parameter in the
> > Data->IoStatus.Status.
> >
> >
> >
> > There is a way to:
> >
> >
> >
> > 1) [PreOp] inform the IoManager to reparse the
> > Create IRP.
> >
> > 2) [PostOp] get the resulting redirected
> > fileobject
> >
> >
> >
> > Thank’s
> >
> >
> > —
> > Questions? First check the IFS FAQ at
> > https://www.osronline.com/article.cfm?id=17
> >
> > You are currently subscribed to ntfsd as: unknown
> > lmsubst tag argument: ‘’
> > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as:
> xxxxx@ibsnetwork.it
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: unknown
> lmsubst tag argument: ‘’
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@filippetti.it
To unsubscribe send a blank email to xxxxx@lists.osr.com

I quote myself:

“The only thing that you will see in the new create
that you return to the IO manager is the path.”

Even this is not guaranteed as another filter above
you may modify it.

I suggest that once you think you have this working
you test with other filters, like SAV 10.

— Gian-luca Tenti
wrote:

> I’ve in mind to test a new way: to set a flag’s bit
> (not used by the system) before reparse and look in
> every Preop if the flag’s bit is set (the fltmanager
> do a flag’s back copy?)