Re: Tracking file objects

> When implementing the isolation model, what’s the preferred way of

tracking file objects that we own?

In any filter I usually find it handy to have my StreamHandleContexts in a
linked list off my StreamContexts and my StreamContexts off my
VolumeContext. This should give you all you need to be able to find all the
lower file objects (since your lower file objects are in your
StreamHandleContext, right).

Unrelated to this but when you are working out your navigation you need to
bear in mind the exigies of oplocks which require you to be able to traverse
all the children (to break an oplock to allow a directory rename to work).
ISTR that there are also cases when you need to be able to traverse upwards
as well.

Yeah I have a similar setup, the lower file objects are no problem. What I’m referring to is in the isolation model, we obviously have to ensure that the FO’s we own never go below our filter. So how do we determine which upper file objects are ones we own, and which are one that the FSD owns.

In normal (non-isolation) filters, most people make a decision in the create callback and set a streamhandle context for the FO. They can then use FltGetStreamHandleContext in all the other callbacks to check if it’s a FO they’re interested in.

What I’m wondering is In the isolation model do people do things differently? Is it preferred to just keep a linked list of all the upper FO’s we own and check this list for every callback, or do I just use FltSetStreamHandleContext in the create callback on my own FO and check it as usual in all the others.

I realise I’m probable overthinking this but it’s a question I keep asking myself and haven’t come to a decision on ‘best practice’

Ged.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Rod Widdowson
Sent: 22 January 2015 12:06
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Tracking file objects

When implementing the isolation model, what’s the preferred way of
tracking file objects that we own?

In any filter I usually find it handy to have my StreamHandleContexts in a linked list off my StreamContexts and my StreamContexts off my VolumeContext. This should give you all you need to be able to find all the lower file objects (since your lower file objects are in your StreamHandleContext, right).

Unrelated to this but when you are working out your navigation you need to bear in mind the exigies of oplocks which require you to be able to traverse all the children (to break an oplock to allow a directory rename to work).
ISTR that there are also cases when you need to be able to traverse upwards as well.


NTFSD is sponsored by OSR

OSR is hiring!! Info at http://www.osr.com/careers

For our schedule of debugging and file system seminars 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