FLT_STREAM_CONTEXT vs FLT_STREAMHANDLE_CONTEXT?

NTFSD Folk:

What’s the difference between FLT_STREAM_CONTEXT and
FLT_STREAMHANDLE_CONTEXT? The descriptions and arguments are virtually
identical. When would you use one vs. the other?

Thanks,
Ken

A STREAM_CONTEXT is the same across all opens to the same stream. In
other words it is keyed by the FsContext.

A STREAMHANDLE_CONTEXT is unique per individual open. In other words it
is keyed by the FILE_OBJECT.

When implemented in longhorn a FILE_CONTEXT will be the same across all
opens to all streams for a given file.

Please let me know if that makes sense. I will also talk to the DOC
writers to make this cleared in the docs.

Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no
rights

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ken Cross
Sent: Tuesday, September 28, 2004 10:43 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] FLT_STREAM_CONTEXT vs FLT_STREAMHANDLE_CONTEXT?

NTFSD Folk:

What’s the difference between FLT_STREAM_CONTEXT and
FLT_STREAMHANDLE_CONTEXT? The descriptions and arguments are virtually
identical. When would you use one vs. the other?

Thanks,
Ken


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

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

I think of these 2 items as tracking contexts in the following manner:

FLT_STREAM_CONTEXT Used to track FsContext (FCB/SCB)
FLT_STREAMHANDLE_CONTEXT Used to track FileObject

A single open FCB will then have one FLT_STREAM_CONTEXT and 1 or more
FLT_STREAMHANDLE_CONTEXTs. The tricky part here is knowing that NTFS caches
“closed” SCBs and you don’t always see the STREAM context released on the
last CLOSE though you should have seen cleanup callbacks for all the
STREAMHANDLE contexts. I have seen STREAM contexts resurrected in CREATE
completion and just re-init it.

But that’s just me.

/ted

-----Original Message-----
From: Ken Cross [mailto:xxxxx@comcast.net]
Sent: Tuesday, September 28, 2004 1:43 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] FLT_STREAM_CONTEXT vs FLT_STREAMHANDLE_CONTEXT?

NTFSD Folk:

What’s the difference between FLT_STREAM_CONTEXT and
FLT_STREAMHANDLE_CONTEXT? The descriptions and arguments are virtually
identical. When would you use one vs. the other?

Thanks,
Ken


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

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

Yes, that help Neal - thanks.

You’ve answered my question, but at this point I’m curious. Each
FILE_OBJECT has its own FsContext (and FsContext2), right? Does the
underlying filesystem keep the FsContexts consistent for all opens to the
same stream?

Inquiring minds… :wink:

Thanks,
Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Neal Christiansen
Sent: Tuesday, September 28, 2004 1:58 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] FLT_STREAM_CONTEXT vs FLT_STREAMHANDLE_CONTEXT?

A STREAM_CONTEXT is the same across all opens to the same stream. In
other words it is keyed by the FsContext.

A STREAMHANDLE_CONTEXT is unique per individual open. In other words it
is keyed by the FILE_OBJECT.

When implemented in longhorn a FILE_CONTEXT will be the same across all
opens to all streams for a given file.

Please let me know if that makes sense. I will also talk to the DOC
writers to make this cleared in the docs.

Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no
rights

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ken Cross
Sent: Tuesday, September 28, 2004 10:43 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] FLT_STREAM_CONTEXT vs FLT_STREAMHANDLE_CONTEXT?

NTFSD Folk:

What’s the difference between FLT_STREAM_CONTEXT and
FLT_STREAMHANDLE_CONTEXT? The descriptions and arguments are virtually
identical. When would you use one vs. the other?

Thanks,
Ken


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

You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.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: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Never mind – I found the answer:

The FsContext pointer is used exclusively by the FSD. The balance of the OS
assumes that this points to a common “File Control Block” (FCB) header. The
critical attribute of this pointer is that it uniquely identifies the file.
That is, two File Objects reference the same file if their FsContext
pointers are equal.

Sorry for the noise.

Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ken Cross
Sent: Tuesday, September 28, 2004 3:28 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] FLT_STREAM_CONTEXT vs FLT_STREAMHANDLE_CONTEXT?

Yes, that help Neal - thanks.

You’ve answered my question, but at this point I’m curious. Each
FILE_OBJECT has its own FsContext (and FsContext2), right? Does the
underlying filesystem keep the FsContexts consistent for all opens to the
same stream?

Inquiring minds… :wink:

Thanks,
Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Neal Christiansen
Sent: Tuesday, September 28, 2004 1:58 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] FLT_STREAM_CONTEXT vs FLT_STREAMHANDLE_CONTEXT?

A STREAM_CONTEXT is the same across all opens to the same stream. In
other words it is keyed by the FsContext.

A STREAMHANDLE_CONTEXT is unique per individual open. In other words it
is keyed by the FILE_OBJECT.

When implemented in longhorn a FILE_CONTEXT will be the same across all
opens to all streams for a given file.

Please let me know if that makes sense. I will also talk to the DOC
writers to make this cleared in the docs.

Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no
rights

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ken Cross
Sent: Tuesday, September 28, 2004 10:43 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] FLT_STREAM_CONTEXT vs FLT_STREAMHANDLE_CONTEXT?

NTFSD Folk:

What’s the difference between FLT_STREAM_CONTEXT and
FLT_STREAMHANDLE_CONTEXT? The descriptions and arguments are virtually
identical. When would you use one vs. the other?

Thanks,
Ken


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

You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.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: unknown lmsubst tag argument: ‘’
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@comcast.net
To unsubscribe send a blank email to xxxxx@lists.osr.com