xxxxx@yahoo.com wrote:
Now you have me confused. I do not know of any implementation of reparse points that work the way you are saying they do (i.e. the driver detects the RP in pre-create and returns STATUS_REPARSE). If by the term generic usage you mean mount points or symbolic links that is not how they work. The create goes all the way to the file system which detects the rp and returns STATUS_REPARSE and then the io manager replaces the path and send the create back down. If you mean the recommended way to design a driver that uses reparse points the same thing happens except the 3rd party driver does whatever is required to handle the RP rather than the io manager.
In all cases you mention, and the one I will mention, the end result is
either 1) The name being updated in the file object and reparsed by the
io manager, 2) Some intermediate component recognizes the reparse point
and redirects the open to some other file. While this ‘updating’ or
‘redirecting’ is based on information stored within the reparse
information blob, it still accomplishes the same thing.
Now, in general, any filter can grab an open in pre-create, update the
file name in the file object, set the Irp->IoStatus.Information =
IO_REPARSE and return STATUS_REPARSE. In this case, no filter below the
filter implementing this nor the file system will see this access. This
type of implementation is common whenever you implement, say, your own
file system and you want accesses to some given sub-directory to be
redirected to your file system. In this case the name you update in the
file object would be something like
\device\your-file-system-name\foo.txt. This sort of design is leveraged
in encryption, compression, HSM, or anything where you implement a full
set of functionality within some stand alone driver.
The above mechanism is the base concept for the implementation of a
reparse point. While it may not reparse to some stand alone driver, it
can just as easily redirect to some other file or directory location in
the same manner.
NOTE: Like I said previously, there are two schools of thought on this
design. Some feel it introduces unwanted effects in the file system such
as breaking targeted opens but that is a completely different discussion
thread.
Pete
NTFSD is sponsored by OSR
For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
–
Kernel Drivers
Windows File System and Device Driver Consulting
www.KernelDrivers.com
866.263.9295