I need to do a redirect in PostCreate but from what I understand returning IO_REPARSE + STATUS_REPARSE will only work from PreCreate should the following work as a solution in Post path?
- recieve STATUS_REPARSE in PostCreate
- Check for my reparse header and redirect options
- Use IoReplaceFileObjectName on FO in callback data to redirect path
- Call FltReissueSynchronousIo()
- return status from that
Thanks in advance,
Rob
Hi Rob,
No, you can return STATUS_REPARSE in postCreate as well…
I’d say you’re better off with returning STATUS_REPARSE in step 4 directly.
This would send it back to the IO manager which would reparse it to the
appropriate place.
If you want to send the request down again, you have a couple of things to
be aware of (that I can quickly think of, there are definitely more):
- if the new request is for a different device, you must handle that
redirection. Then you must make sure there are no requests coming on the
original device, and if they are then you must redirect them…
- you might need to implement a name provider to completely hide the
redirection from filters above yours.
Any reason returning reparse to the IO manager won’t work ?
Thanks,
Alex.
I would prefer to have I/O Manager do the work. I was just misinformed that it wouldn’t on PostCreate. Thanks for the info.