recursive links in file_object => related file object with DFS

Hi all,

While debugging a failure at customer site involving our file system filter
driver I found that it was happening in a create sent from the DFS user
mode service for a file of name \DFSRoot\foo\Global\Apps\bar.
The file object had the name component “bar” while the rest of the name was
in related file object.
The surprising part for me was that this related file object had a further
related file object which pointed back to the first file object.
That was causing us to go in an infinite loop trying to get the full file
name.

  1. Can someone please shed some light on under what circumstances this is
    possible?
  2. How long can the FO=>RFO=>RFO… chain be at a maximum?

Thanks in advance,
Pawan

P.S. I do not have furhter information on the customer’s DFS setup.

You’re getting the file name incorrectly. There is no chain of related file objects. There is only one. Since, as you have certainly read the relevant FAQs, and are well aware that FileObject->FileName and FileObject->RelatedFileObject are only valid in precreate, you must not access these fields in the related file object. Query the file system for the related file object name, and append the file name from the current file object.

  • Dan.
    ----- Original Message -----
    From: Pawan Khatri
    To: Windows System Software Devs Interest List
    Sent: Thursday, March 23, 2006 11:11 AM
    Subject: [ntdev] recursive links in file_object => related file object with DFS

Hi all,

While debugging a failure at customer site involving our file system filter driver I found that it was happening in a create sent from the DFS user mode service for a file of name \DFSRoot\foo\Global\Apps\bar.
The file object had the name component “bar” while the rest of the name was in related file object.
The surprising part for me was that this related file object had a further related file object which pointed back to the first file object.
That was causing us to go in an infinite loop trying to get the full file name.

  1. Can someone please shed some light on under what circumstances this is possible?
  2. How long can the FO=>RFO=>RFO… chain be at a maximum?

Thanks in advance,
Pawan

P.S. I do not have furhter information on the customer’s DFS setup.

— Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

And, BTW, this question should have been asked in ntfsd, not ntdev.
----- Original Message -----
From: Pawan Khatri
To: Windows System Software Devs Interest List
Sent: Thursday, March 23, 2006 11:11 AM
Subject: [ntdev] recursive links in file_object => related file object with DFS

Hi all,

While debugging a failure at customer site involving our file system filter driver I found that it was happening in a create sent from the DFS user mode service for a file of name \DFSRoot\foo\Global\Apps\bar.
The file object had the name component “bar” while the rest of the name was in related file object.
The surprising part for me was that this related file object had a further related file object which pointed back to the first file object.
That was causing us to go in an infinite loop trying to get the full file name.

  1. Can someone please shed some light on under what circumstances this is possible?
  2. How long can the FO=>RFO=>RFO… chain be at a maximum?

Thanks in advance,
Pawan

P.S. I do not have furhter information on the customer’s DFS setup.

— Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hi Dan,

Posted it in the wrong list by mistake.
This is some code I inherited and it always seemed to work fine until I saw
this bug and then I did wonder if you’ll ever see a chain of RFOs. Also you
correctly point out that except for pre-create, we shouldn’t be relying on
the file name in the FO.

The recursion was a strange coincidence though.

Thanks for the explaination and quick reply,
Pawan

On 3/23/06, Dan Kyler wrote:
>
> And, BTW, this question should have been asked in ntfsd, not ntdev.
>
> ----- Original Message -----
> From: Pawan Khatri
> To: Windows System Software Devs Interest List
> Sent: Thursday, March 23, 2006 11:11 AM
> Subject: [ntdev] recursive links in file_object => related file object
> with DFS
>
> Hi all,
>
> While debugging a failure at customer site involving our file system
> filter driver I found that it was happening in a create sent from the DFS
> user mode service for a file of name \DFSRoot\foo\Global\Apps\bar.
> The file object had the name component “bar” while the rest of the name
> was in related file object.
> The surprising part for me was that this related file object had a further
> related file object which pointed back to the first file object.
> That was causing us to go in an infinite loop trying to get the full file
> name.
>
> 1. Can someone please shed some light on under what circumstances this is
> possible?
> 2. How long can the FO=>RFO=>RFO… chain be at a maximum?
>
> Thanks in advance,
> Pawan
>
> P.S. I do not have furhter information on the customer’s DFS setup.
> — Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
> Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>