none
How to add context to redirected file io operation RRS feed

  • Question

  • Hi

    I want to develop minifilter to redirect file io to another volume. Moreover it is needed that operations work different for redirected oi and direct io. I mean the next. Let c:\a\b is redirected to d:\q\p. If we try to get list of files in c:\a\b we will get one list if we try to get list of files in d:\q\p the we will get another list. For redirection it is possible to use reparse point and it works fine.

    What can I use in order to distinguish operations initated on c:\a\b from operatins on d:\q\p?

    Wednesday, March 4, 2015 11:17 AM

Answers

  • In the CreateFile operation determine the path and then create a stream or file context to retain the information you are looking for.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Wednesday, March 4, 2015 4:12 PM

All replies

  • In the CreateFile operation determine the path and then create a stream or file context to retain the information you are looking for.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Wednesday, March 4, 2015 4:12 PM
  • If reparse point is used then I see two create operations

    1. the first for original path: c:\a\b. For this operation there is no close operation.

    2. the second for redirected path: d:\q\p. For this operation there is close operation.

    It is not possible to set stream context in the first post operation callback. FltSetStreamContext returns STATUS_NOT_SUPPORTED. I could not test file context as use Windows XP. But the same result is for stream handle context.

    In the second post operation callback it is possible to set stream context but at this stage I do not know how to detect that operation is result of opening of c:\a\b.

    Is there way to know that the second operation comes from reparse point?

    Thursday, March 5, 2015 10:12 PM
  • I have not used reparse points enough to be sure how to proceed.  As this on NTFSD at http://www.osronline.com that is where the file system folks hang out.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Friday, March 6, 2015 11:34 AM
  • Thank you. I will read.
    Saturday, March 7, 2015 9:00 AM