Reparse Tags support in Dokan

97 views
Skip to first unread message

Roberto

unread,
Jul 22, 2010, 5:03:28 AM7/22/10
to Dokan
Hello

First of all, I want to thank Hiroki for his fantastic job :)

I'm trying to use the NTFS reparse point tags to pass some information
between the filesystem and a shell extension.

In order to do this, Inside the Dokan FindFiles Callback, I'm setting
the FILE_ATTRIBUTE_REPARSE_POINT in the file attributes, and putting
the tag value inside the dwReserved0 value in the File Information
Structure (WIN32_FIND_DATA) but when I try to retrieve the value of
dwReserved0 in the Shell Extension, this value is always 0.

So I cannot retrieve the tag which the Dokan FS should be "sending".

Making a brief search in the group, I saw that a guy called Alex
Besogonov made some improvements in order Dokan to support the reparse
tags, but I don't know if those changes were merged in the trunk, or
if Hiroki made some advances in reparse tag support.

Do you know anything about this issue?

Your help will be greatly appreciated :)

Regards.



Hiroki Asakawa

unread,
Jul 22, 2010, 7:54:36 AM7/22/10
to do...@googlegroups.com
Hello,

On Thu, Jul 22, 2010 at 6:03 PM, Roberto <robj....@gmail.com> wrote:
> Hello
>
> First of all, I want to thank Hiroki for his fantastic job :)
>
> I'm trying to use the NTFS reparse point tags to pass some information
> between the filesystem and a shell extension.
>
> In order to do this, Inside the Dokan FindFiles Callback,  I'm setting
> the FILE_ATTRIBUTE_REPARSE_POINT in the file attributes, and putting
> the tag value inside the dwReserved0 value in the File Information
> Structure (WIN32_FIND_DATA) but when I try to retrieve the value of
> dwReserved0 in the Shell Extension, this value is always 0.
>
> So I cannot retrieve the tag which the Dokan FS should be "sending".

Dokan (filesystem) doesn't support reparse point.
Dokan SSHFS uses alternative stream to pass information to filesytem
from shell extension. ex. read/write file permission using
filename.txt:SSHFSProperty.Permission

Please set DOKAN_OPTION_ALT_STREAM and handle ":" in CreateFile.


> Making a brief search in the group, I saw that a guy called Alex
> Besogonov made some improvements in order Dokan to support the reparse
> tags, but I don't know if those changes were merged in the trunk, or
> if Hiroki made some advances in reparse tag support.

That is for mount point, mounting your filesystem at any directory of NTFS.
I couldn't use Besogonov's implementation, and I implemented it in other way.
Dokan 0.6.0 will support it.


Thanks,
Hiroki Asakawa

>
> Do you know anything about this issue?
>
> Your help will be greatly appreciated :)
>
> Regards.
>
>
>

> --
> You received this message because you are subscribed to the Google Groups "Dokan" group.
> To post to this group, send email to do...@googlegroups.com.
> To unsubscribe from this group, send email to dokan+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/dokan?hl=en.
>
>

Roberto

unread,
Jul 23, 2010, 8:22:12 AM7/23/10
to Dokan
Hi,

Thanks for the reply :)

But I need to communicate in the other way around.
I need to send information from the FileSystem to the Shell Extension
and using the reparse tag seems to be a good choice :)

I was trying to use GetFileInformationByHandleEx, and requesting for
the Reparse Tag using FileAttributeTagInformation.
It works, but the code responsible in returning the Tag in the Dokan
side always return 0 ( It's on DokanFillFileAttributeTagInfo
function )

I wonder which is the best way to let the User Side ( I mean the
application which uses Dokan to create the FS ) decide this Tag Value.

The easiest way to do this would involve having and extra field for
the tag in the BY_HANDLE_FILE_INFORMATION structure. But as this
structure is a windows one, we cannot modify it.
Another approach would be create another callback, and call it when
the DispatchQueryInformation with FileAttributeTagInformation is
invoked.

What do you think?

Thanks :)
Roberto.

On Jul 22, 1:54 pm, Hiroki Asakawa <asa...@gmail.com> wrote:
> Hello,
>

Hiroki Asakawa

unread,
Jul 23, 2010, 11:07:33 AM7/23/10
to do...@googlegroups.com
On Fri, Jul 23, 2010 at 9:22 PM, Roberto <robj....@gmail.com> wrote:
> Hi,
>
> Thanks for the reply :)
>
> But I need to communicate in the other way around.
> I need to send information from the FileSystem to the Shell Extension
> and using the reparse tag seems to be a good choice :)

You can also pass information from filesytem to the shell extension.
Shell extensions of Dokan SSHFS read filename.txt:SSHFSProperty.Permission
to get permission info and write to set permission info.

> I was trying to use GetFileInformationByHandleEx, and requesting for
> the Reparse Tag using FileAttributeTagInformation.
> It works, but the code responsible in returning the Tag in the Dokan
> side always return 0 ( It's on DokanFillFileAttributeTagInfo
> function )
>
> I wonder which is the best way to let the User Side ( I mean the
> application which uses Dokan to create the FS ) decide this Tag Value.
>
> The easiest way to do this would involve having and extra field for
> the tag in the BY_HANDLE_FILE_INFORMATION structure. But as this
> structure is a windows one, we cannot modify it.
> Another approach would be create another callback, and call it when
> the DispatchQueryInformation with FileAttributeTagInformation is
> invoked.
>
> What do you think?

Yes, that is an idea. In that case, we probably should consider creating
a symbolic link.
http://msdn.microsoft.com/en-us/library/cc232006(v=PROT.10).aspx

Reply all
Reply to author
Forward
0 new messages