streams - why should I do this?

I’m thinking about implementing ‘alternate data streams’ in my file system
driver.

I used filemon to see what was going on, and when I drag & drop a file from
explorer to my “disk”, a box pops up warning that I’m about to lose the
stream data if I continue with the copy. I noticed that my driver gets an
IRP_MJ_QUERY_VOLUME_INFORMATION, so I turned on FILE_NAMED_STREAMS in
FILE_FS_ATTRIBUTE_INFORMATION->FileSystemAttributes, but that doesn’t stop
the box from popping up.

This is on Win2k. Can anyone tell me what else I need to set to allow the
copy? Or better yet, if I should be doing this at all, where can I find
some doc on it?

Thanks and Regards,

Greg

This sounded like a reasonable question… why is everyone so quiet on this
subject?

Don’t any other FSDs (other than NTFS) support Alternate Data Streams (ADS)?

I was hoping to get the warning box to go away so I could do some more
coding/testing to see how it works…and see if I should pursue it.

Thanks

Greg

“Greg Pearce” wrote in message news:xxxxx@ntfsd…
> I’m thinking about implementing ‘alternate data streams’ in my file system
> driver.
>
> I used filemon to see what was going on, and when I drag & drop a file
from
> explorer to my “disk”, a box pops up warning that I’m about to lose the
> stream data if I continue with the copy. I noticed that my driver gets an
> IRP_MJ_QUERY_VOLUME_INFORMATION, so I turned on FILE_NAMED_STREAMS in
> FILE_FS_ATTRIBUTE_INFORMATION->FileSystemAttributes, but that doesn’t stop
> the box from popping up.
>
> This is on Win2k. Can anyone tell me what else I need to set to allow the
> copy? Or better yet, if I should be doing this at all, where can I find
> some doc on it?
>
> Thanks and Regards,
>
> Greg
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

As far as I know, none of the ‘copy’ facilities do deep copies, in that they
do not copy the alternate streams associated to a given file only the $DATA
or default stream. The copy you are performing is probably recognizing that
an alternate stream does exist and thus throws up the dialog.

Pete

Peter Scott
xxxxx@KernelDrivers.com
www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-180701-
xxxxx@lists.osr.com] On Behalf Of Greg Pearce
Sent: Friday, July 09, 2004 11:03 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] streams - why should I do this?

This sounded like a reasonable question… why is everyone so quiet on
this
subject?

Don’t any other FSDs (other than NTFS) support Alternate Data Streams
(ADS)?

I was hoping to get the warning box to go away so I could do some more
coding/testing to see how it works…and see if I should pursue it.

Thanks

Greg

“Greg Pearce” wrote in message news:xxxxx@ntfsd…
> > I’m thinking about implementing ‘alternate data streams’ in my file
> system
> > driver.
> >
> > I used filemon to see what was going on, and when I drag & drop a file
> from
> > explorer to my “disk”, a box pops up warning that I’m about to lose the
> > stream data if I continue with the copy. I noticed that my driver gets
> an
> > IRP_MJ_QUERY_VOLUME_INFORMATION, so I turned on FILE_NAMED_STREAMS in
> > FILE_FS_ATTRIBUTE_INFORMATION->FileSystemAttributes, but that doesn’t
> stop
> > the box from popping up.
> >
> > This is on Win2k. Can anyone tell me what else I need to set to allow
> the
> > copy? Or better yet, if I should be doing this at all, where can I find
> > some doc on it?
> >
> > Thanks and Regards,
> >
> > Greg
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@kerneldrivers.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

> Don’t any other FSDs (other than NTFS) support Alternate Data Streams (ADS)?

ADS are NTFS-only.

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

Hi,

both “copy.exe” and explorer do preserve alternate streams (as well as
EAs) on copy.
Also ADS aren’t strictly NTFS only, since they’re also exposed through
LanMan, provided the server volume is NTFS.

Siggi

On Fri, 9 Jul 2004 11:10:19 -0700, Peter Scott wrote:
>
> As far as I know, none of the ‘copy’ facilities do deep copies, in that they
> do not copy the alternate streams associated to a given file only the $DATA
> or default stream. The copy you are performing is probably recognizing that
> an alternate stream does exist and thus throws up the dialog.
>
> Pete
>
> Peter Scott
> xxxxx@KernelDrivers.com
> www.KernelDrivers.com
>
>
>
>
> > -----Original Message-----
> > From: xxxxx@lists.osr.com [mailto:bounce-180701-
> > xxxxx@lists.osr.com] On Behalf Of Greg Pearce
> > Sent: Friday, July 09, 2004 11:03 AM
> > To: Windows File Systems Devs Interest List
> > Subject: Re:[ntfsd] streams - why should I do this?
> >
> > This sounded like a reasonable question… why is everyone so quiet on
> > this
> > subject?
> >
> > Don’t any other FSDs (other than NTFS) support Alternate Data Streams
> > (ADS)?
> >
> > I was hoping to get the warning box to go away so I could do some more
> > coding/testing to see how it works…and see if I should pursue it.
> >
> > Thanks
> >
> > Greg
> >
> > “Greg Pearce” wrote in message news:xxxxx@ntfsd…
> > > I’m thinking about implementing ‘alternate data streams’ in my file
> > system
> > > driver.
> > >
> > > I used filemon to see what was going on, and when I drag & drop a file
> > from
> > > explorer to my “disk”, a box pops up warning that I’m about to lose the
> > > stream data if I continue with the copy. I noticed that my driver gets
> > an
> > > IRP_MJ_QUERY_VOLUME_INFORMATION, so I turned on FILE_NAMED_STREAMS in
> > > FILE_FS_ATTRIBUTE_INFORMATION->FileSystemAttributes, but that doesn’t
> > stop
> > > the box from popping up.
> > >
> > > This is on Win2k. Can anyone tell me what else I need to set to allow
> > the
> > > copy? Or better yet, if I should be doing this at all, where can I find
> > > some doc on it?
> > >
> > > Thanks and Regards,
> > >
> > > Greg
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> > —
> > Questions? First check the IFS FAQ at
> > https://www.osronline.com/article.cfm?id=17
> >
> > You are currently subscribed to ntfsd as: xxxxx@kerneldrivers.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@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>


Life is what happens to you while you’re busy making other plans
– John Lennon

Hello!
You (“Maxim S. Shatskih” ) wrote to “Windows File
Systems Devs Interest List” on Sat, 10 Jul 2004
03:49:09 +0400:

>> Don’t any other FSDs (other than NTFS) support Alternate Data Streams
>> (ADS)?
MSS> ADS are NTFS-only.

Is this supposed to mean that only NTFS has this feature or this means that
no other FS can offer ADS since the API is specific to NTFS driver and can’t
be exposed by other drivers?

Sincerely yours,
Eugene Mayevski

> MSS> ADS are NTFS-only.

Is this supposed to mean that only NTFS has this feature or this means that

Only NTFS has the ADS in its on-disk format.
Neither FAT12/16/32 nor any UNIX FS have them.

As about the network redirs - MRXSMB will support them, if the server is
sharing the NTFS volume.

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

Hello!
You (“Maxim S. Shatskih” ) wrote to “Windows File
Systems Devs Interest List” on Sat, 10 Jul 2004
13:10:08 +0400:

MSS> Only NTFS has the ADS in its on-disk format.
MSS> Neither FAT12/16/32 nor any UNIX FS have them.

There are way too many file systems and some of them do have streams.

Sincerely yours,
Eugene Mayevski

Agreed - there is nothing that prevents other file systems from
supporting alternative data streams. However, just adding the attribute
bit is unlikely to be enough. You would probably need to support the
enumeration mechanism (IRP_MJ_QUERY_INFORMATION) as well. But to figure
this out definitively, you’d need to look and see what failure preceeds
the error from Explorer.

FYI - we’ve worked with several different FSD implementations that
implement alternate streams.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Eugene Mayevski
Sent: Saturday, July 10, 2004 10:44 AM
To: ntfsd redirect
Subject: Re: [ntfsd] streams - why should I do this?

Hello!
You (“Maxim S. Shatskih” ) wrote to “Windows
File Systems Devs Interest List” on Sat, 10 Jul
2004
13:10:08 +0400:

MSS> Only NTFS has the ADS in its on-disk format.
MSS> Neither FAT12/16/32 nor any UNIX FS have them.

There are way too many file systems and some of them do have streams.

Sincerely yours,
Eugene Mayevski


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

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

> MSS> Only NTFS has the ADS in its on-disk format.

MSS> Neither FAT12/16/32 nor any UNIX FS have them.

There are way too many file systems and some of them do have streams.

Mainstream ones (ext2, BSD FFS) have no, and POSIX syscall API has also no
support for them.

The feature is nearly useless. It is used in Windows nearly only for Macintosh
fileserver. Even the things like "Save/Web page (complete) in IE does not use
this feature, they use a directory named “bla-bla-bla.files” instead.

Document Summary feature also does not use them, it uses OLE compound document.
Version Info feature is also such - it uses the resources section in the PE
binary.

The “any file is a stupid stream of bytes” is a good paradigm. Streams support
is better belong to user-mode libraries like ole32, and not to the FSD in the
kernel.

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

I like Max’s answer - which is why I posed the question the way I did in the
first place. I probably shouldn’t be doing this, at all. But, somebody in
our user community wants to do it, so I still have to research it.

To expound on Tony’s answer, I have seen (in filemon) that Explorer does a
IRP_MJ_CREATE (open directory) on the root of my device, then does
IRP_MJ_DIRECTORY_CONTROL for FileBothDirectoryInformation, then it does a
cleanup and a close. Then it does another IRP_MJ_CREATE for the root, then
a IRP_MJ_QUERY_VOLUME_INFORMATION for FileFsAttributeInformation, then the
“Confirm Stream Loss” dialog box shows up, and before I reply to this
prompt, filemon shows another cleanup and a close.

My FSD “or’s in” the FILE_NAMED_STREAMS flag in the
FileFsAttributeInformation struct and returns. All of these IRPs were
completed with STATUS_SUCCESS.

There’s something else I’m missing, but darned if I can find it.

Thanks again

Greg

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd…
> > MSS> Only NTFS has the ADS in its on-disk format.
> > MSS> Neither FAT12/16/32 nor any UNIX FS have them.
> >
> > There are way too many file systems and some of them do have streams.
>
> Mainstream ones (ext2, BSD FFS) have no, and POSIX syscall API has also no
> support for them.
>
> The feature is nearly useless. It is used in Windows nearly only for
Macintosh
> fileserver. Even the things like "Save/Web page (complete) in IE does not
use
> this feature, they use a directory named “bla-bla-bla.files” instead.
>
> Document Summary feature also does not use them, it uses OLE compound
document.
> Version Info feature is also such - it uses the resources section in the
PE
> binary.
>
> The “any file is a stupid stream of bytes” is a good paradigm. Streams
support
> is better belong to user-mode libraries like ole32, and not to the FSD in
the
> kernel.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>

UPDATE: I noticed that when I copy a stream from the command prompt (C: to
my device), I don’t get a warning that streams will be lost. After some
more looking around, I noticed that the examples given on the MSDN website
for VB programs that try to manipulate streams always check the file system
name before messing with streams, and if it isn’t “NTFS”, they assume that
streams are not supported. Thinking that Explorer might do the same thing,
I changed my file system name to “NTFS” and tried it…and it worked! (Of
course there are changes I had to make to the code to support streams, (like
parsing the file name correctly etc.), but so far it’s working).

So what’s the danger/legality of calling my file system NTFS? I read, (in
this newsgroup and in the EULA) that it is not legal to “replace” ntfs.
Anyone want to express an opinion on this?

Thanks

Greg

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd…
> > MSS> Only NTFS has the ADS in its on-disk format.
> > MSS> Neither FAT12/16/32 nor any UNIX FS have them.
> >
> > There are way too many file systems and some of them do have streams.
>
> Mainstream ones (ext2, BSD FFS) have no, and POSIX syscall API has also no
> support for them.
>
> The feature is nearly useless. It is used in Windows nearly only for
Macintosh
> fileserver. Even the things like "Save/Web page (complete) in IE does not
use
> this feature, they use a directory named “bla-bla-bla.files” instead.
>
> Document Summary feature also does not use them, it uses OLE compound
document.
> Version Info feature is also such - it uses the resources section in the
PE
> binary.
>
> The “any file is a stupid stream of bytes” is a good paradigm. Streams
support
> is better belong to user-mode libraries like ole32, and not to the FSD in
the
> kernel.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>

Greg,

There ARE applications that use streams, and as I recall UDF has
provisions for this as well, as does CDFS. They are used for non-data
oriented attributes of the file - Explorer likes to store thumbnails in
a stream for instance. But obviously they are not required for correct
support.

I know this is not tied to NTFS, we’ve done it before. There is
something missing in the description you’ve provided, but I don’t know
what it is. What I’d suggest is watch the same exchange on NTFS and on
your file system and then compare the data values being returned - one
of them is the missing link.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Greg Pearce
Sent: Monday, July 12, 2004 9:03 AM
To: ntfsd redirect
Subject: Re:[ntfsd] streams - why should I do this?

I like Max’s answer - which is why I posed the question the way I did in
the first place. I probably shouldn’t be doing this, at all. But,
somebody in our user community wants to do it, so I still have to
research it.

To expound on Tony’s answer, I have seen (in filemon) that Explorer does
a IRP_MJ_CREATE (open directory) on the root of my device, then does
IRP_MJ_DIRECTORY_CONTROL for FileBothDirectoryInformation, then it does
a cleanup and a close. Then it does another IRP_MJ_CREATE for the root,
then a IRP_MJ_QUERY_VOLUME_INFORMATION for FileFsAttributeInformation,
then the “Confirm Stream Loss” dialog box shows up, and before I reply
to this prompt, filemon shows another cleanup and a close.

My FSD “or’s in” the FILE_NAMED_STREAMS flag in the
FileFsAttributeInformation struct and returns. All of these IRPs were
completed with STATUS_SUCCESS.

There’s something else I’m missing, but darned if I can find it.

Thanks again

Greg

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd…
> > MSS> Only NTFS has the ADS in its on-disk format.
> > MSS> Neither FAT12/16/32 nor any UNIX FS have them.
> >
> > There are way too many file systems and some of them do have
streams.
>
> Mainstream ones (ext2, BSD FFS) have no, and POSIX syscall API has
> also no support for them.
>
> The feature is nearly useless. It is used in Windows nearly only for
Macintosh
> fileserver. Even the things like "Save/Web page (complete) in IE does
> not
use
> this feature, they use a directory named “bla-bla-bla.files” instead.
>
> Document Summary feature also does not use them, it uses OLE compound
document.
> Version Info feature is also such - it uses the resources section in
> the
PE
> binary.
>
> The “any file is a stupid stream of bytes” is a good paradigm. Streams
support
> is better belong to user-mode libraries like ole32, and not to the FSD

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


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

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

Thanks for the reply, Tony…

I do see that a copy of a ADS file on NTFS causes an
IRP_MJ_QUERY_INFORMATION on the input file, for FileObjectIdInformation.
Must I support ObjectId information/Open by ObjectId to handle streams?

My driver doesn’t currently support ObjectId stuff (I set ‘SupportsObjects’
to FALSE on IRP_MJ_QUERY_VOLUME_INFORMATION). I may have missed seeing a
call to this function in filemon at some previous time (like at system
init?). BTW: Does the OS “remember” this setting for the duration of the
system uptime after one call?

Regards back to you,
Greg

“Tony Mason” wrote in message news:xxxxx@ntfsd…
Greg,

There ARE applications that use streams, and as I recall UDF has
provisions for this as well, as does CDFS. They are used for non-data
oriented attributes of the file - Explorer likes to store thumbnails in
a stream for instance. But obviously they are not required for correct
support.

I know this is not tied to NTFS, we’ve done it before. There is
something missing in the description you’ve provided, but I don’t know
what it is. What I’d suggest is watch the same exchange on NTFS and on
your file system and then compare the data values being returned - one
of them is the missing link.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Greg Pearce
Sent: Monday, July 12, 2004 9:03 AM
To: ntfsd redirect
Subject: Re:[ntfsd] streams - why should I do this?

I like Max’s answer - which is why I posed the question the way I did in
the first place. I probably shouldn’t be doing this, at all. But,
somebody in our user community wants to do it, so I still have to
research it.

To expound on Tony’s answer, I have seen (in filemon) that Explorer does
a IRP_MJ_CREATE (open directory) on the root of my device, then does
IRP_MJ_DIRECTORY_CONTROL for FileBothDirectoryInformation, then it does
a cleanup and a close. Then it does another IRP_MJ_CREATE for the root,
then a IRP_MJ_QUERY_VOLUME_INFORMATION for FileFsAttributeInformation,
then the “Confirm Stream Loss” dialog box shows up, and before I reply
to this prompt, filemon shows another cleanup and a close.

My FSD “or’s in” the FILE_NAMED_STREAMS flag in the
FileFsAttributeInformation struct and returns. All of these IRPs were
completed with STATUS_SUCCESS.

There’s something else I’m missing, but darned if I can find it.

Thanks again

Greg

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd…
> > MSS> Only NTFS has the ADS in its on-disk format.
> > MSS> Neither FAT12/16/32 nor any UNIX FS have them.
> >
> > There are way too many file systems and some of them do have
streams.
>
> Mainstream ones (ext2, BSD FFS) have no, and POSIX syscall API has
> also no support for them.
>
> The feature is nearly useless. It is used in Windows nearly only for
Macintosh
> fileserver. Even the things like "Save/Web page (complete) in IE does
> not
use
> this feature, they use a directory named “bla-bla-bla.files” instead.
>
> Document Summary feature also does not use them, it uses OLE compound
document.
> Version Info feature is also such - it uses the resources section in
> the
PE
> binary.
>
> The “any file is a stupid stream of bytes” is a good paradigm. Streams
support
> is better belong to user-mode libraries like ole32, and not to the FSD

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


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

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

Folks,

I had seen some similar behaviour with my FSD. I had to support ObjectID query to support ADS correctly, I am not sure how they are related. Since my FSD is ‘pseudo’ FSD which stacks on an existing NTFS parition, all I had to do in the ObjectID query was to behave as a ‘passthrough’ and return the ObjectID from the underlying NTFS.

Once ObjectID queries were supported, my ADS support seem to make progress (ofcourse with additional code for ADS related processing).

Also, another interesting thing to be noted is that in my FSD, I do NOT return ‘FILE_SUPPORTS_OBJECT_IDS’ in the ‘FileSystemAttributes’ field during the query volume Info, but I still do get a Query ObjectID call and as long as I do return the correct ObjectID (as mentioned above), the application, perticularly Explorer seem to then look for ADS.

I have always wondered what is the relationship between ObjectID and ADS, may be applications such as Explorer make the ObjectID query 1st and then make certains assumptoins if the call is not supported by the FSD.

How applications such as ‘Explorer’ use the ‘FileSystemAttributes’ field returned in a Volume query has been a mistry to me.

Regards,

Manish

Greg Pearce wrote:
Thanks for the reply, Tony…

I do see that a copy of a ADS file on NTFS causes an
IRP_MJ_QUERY_INFORMATION on the input file, for FileObjectIdInformation.
Must I support ObjectId information/Open by ObjectId to handle streams?

My driver doesn’t currently support ObjectId stuff (I set ‘SupportsObjects’
to FALSE on IRP_MJ_QUERY_VOLUME_INFORMATION). I may have missed seeing a
call to this function in filemon at some previous time (like at system
init?). BTW: Does the OS “remember” this setting for the duration of the
system uptime after one call?

Regards back to you,
Greg

“Tony Mason” wrote in message news:xxxxx@ntfsd…
Greg,

There ARE applications that use streams, and as I recall UDF has
provisions for this as well, as does CDFS. They are used for non-data
oriented attributes of the file - Explorer likes to store thumbnails in
a stream for instance. But obviously they are not required for correct
support.

I know this is not tied to NTFS, we’ve done it before. There is
something missing in the description you’ve provided, but I don’t know
what it is. What I’d suggest is watch the same exchange on NTFS and on
your file system and then compare the data values being returned - one
of them is the missing link.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Greg Pearce
Sent: Monday, July 12, 2004 9:03 AM
To: ntfsd redirect
Subject: Re:[ntfsd] streams - why should I do this?

I like Max’s answer - which is why I posed the question the way I did in
the first place. I probably shouldn’t be doing this, at all. But,
somebody in our user community wants to do it, so I still have to
research it.

To expound on Tony’s answer, I have seen (in filemon) that Explorer does
a IRP_MJ_CREATE (open directory) on the root of my device, then does
IRP_MJ_DIRECTORY_CONTROL for FileBothDirectoryInformation, then it does
a cleanup and a close. Then it does another IRP_MJ_CREATE for the root,
then a IRP_MJ_QUERY_VOLUME_INFORMATION for FileFsAttributeInformation,
then the “Confirm Stream Loss” dialog box shows up, and before I reply
to this prompt, filemon shows another cleanup and a close.

My FSD “or’s in” the FILE_NAMED_STREAMS flag in the
FileFsAttributeInformation struct and returns. All of these IRPs were
completed with STATUS_SUCCESS.

There’s something else I’m missing, but darned if I can find it.

Thanks again

Greg

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd…
> > MSS> Only NTFS has the ADS in its on-disk format.
> > MSS> Neither FAT12/16/32 nor any UNIX FS have them.
> >
> > There are way too many file systems and some of them do have
streams.
>
> Mainstream ones (ext2, BSD FFS) have no, and POSIX syscall API has
> also no support for them.
>
> The feature is nearly useless. It is used in Windows nearly only for
Macintosh
> fileserver. Even the things like "Save/Web page (complete) in IE does
> not
use
> this feature, they use a directory named “bla-bla-bla.files” instead.
>
> Document Summary feature also does not use them, it uses OLE compound
document.
> Version Info feature is also such - it uses the resources section in
> the
PE
> binary.
>
> The “any file is a stupid stream of bytes” is a good paradigm. Streams
support
> is better belong to user-mode libraries like ole32, and not to the FSD

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


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

You are currently subscribed to ntfsd as: xxxxx@osr.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@yahoo.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!

> There ARE applications that use streams, and as I recall UDF has

provisions for this as well, as does CDFS.

Looks like CdDissectName has no support for “$DATA” and such names. It only
understand slashes as separators.

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

Yeah, I looked at CDFS too, but cannot see any obvious support for ADS…but
I’m far from able to claim that I understand it thoroughly :wink:

Greg

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd…
> > There ARE applications that use streams, and as I recall UDF has
> > provisions for this as well, as does CDFS.
>
> Looks like CdDissectName has no support for “$DATA” and such names. It
only
> understand slashes as separators.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>

CDFS also does not support the FSCTLs necessary for data streams support.

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

“Greg Pearce” wrote in message
news:…
> Yeah, I looked at CDFS too, but cannot see any obvious support for ADS…but
> I’m far from able to claim that I understand it thoroughly :wink:
>
> Greg

Hey Max! You’ve just hit on some information that I would like to find out
more about; i.e. what FSCTLs are required for ADS? Where can I find this
kind of stuff documented?

Thanks,

Greg

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd…
> CDFS also does not support the FSCTLs necessary for data streams
support.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> “Greg Pearce” wrote in message
> news:…
> > Yeah, I looked at CDFS too, but cannot see any obvious support for
ADS…but
> > I’m far from able to claim that I understand it thoroughly :wink:
> >
> > Greg
>
>

You are right. It is “open by ID” that I was thinking of (I tend to
think Mac for streams, and CDFS and NTFS are the only FSDs that work
with SFM…)

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Monday, July 12, 2004 12:53 PM
To: ntfsd redirect
Subject: Re: Re:[ntfsd] streams - why should I do this?

CDFS also does not support the FSCTLs necessary for data streams
support.

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

“Greg Pearce” wrote in message
news:…
> Yeah, I looked at CDFS too, but cannot see any obvious support for
> ADS…but I’m far from able to claim that I understand it thoroughly
> :wink:
>
> Greg


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

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