Directory Control

Hi,

I’m implementing Directory Control (Query Directory) function on a private file system.

I encounter a lot of problems with MS applications. As an answer to a Directory Control

I see that the MS applications are expecting the “.” File to be returned as the first file and after the first request is completed the I/O manager sends additional requests for the rest of the data (the number of requests depends on the directory length), and after that the last request that will return the NO_MORE_FILES status.

My question is, is the scenario above right or did I got something wrong.

Are any special things that I should take care in a directory control query.

Any help woul be appreciated.

Thanks,

Berty

I don’t believe that a windows installable file system has to return the “.”
as the first file in a directory.
the rest of your scenario is correct, however I’ve noticed that the FIRST
request sent to the file system by the I/O manager always
requires that “a single file entry” to be returned regardless of the number
of files in the directory.

Also note that a file system may return one of the following in response to
a DIRECTORY_CONTROL request:
STATUS_NO_SUCH_FILE : if the file/folder does not exist
STATUS_NO_MORE_FILES : if it already reported all files in the directory.
STATUS_BUFFER_OVERFLOW: if there are more files to be reported.

-----Original Message-----
From: Berty Mednel [mailto:bertym@012.net.il]
Sent: Tuesday, April 23, 2002 2:52 PM
To: File Systems Developers
Subject: [ntfsd] Directory Control

Hi,

I’m implementing Directory Control (Query Directory) function on a private
file system.

I encounter a lot of problems with MS applications. As an answer to a
Directory Control

I see that the MS applications are expecting the “.” File to be returned as
the first file and after the first request is completed the I/O manager
sends additional requests for the rest of the data (the number of requests
depends on the directory length), and after that the last request that will
return the NO_MORE_FILES status.

My question is, is the scenario above right or did I got something wrong.

Are any special things that I should take care in a directory control query.

Any help woul be appreciated.

Thanks,

Berty


You are currently subscribed to ntfsd as: xxxxx@commvault.com
To unsubscribe send a blank email to %%email.unsub%%

The SL_RETURN_SINGLE_ENTRY is an artifact of the way that Win32 implements
FindFirstXxx (one entry) and then asks for blocks of entries (FindNextXxx).

The ‘.’ and ‘…’ semantics of the file systems are actually complicated.
FAT (as I recall) returns NOTHING if the root directory is empty. It
returns these two entries if there is anything in the root directory or in a
subdirectory. NTFS mimics this behavior.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http: http://www.osr.com

Hope to see you at the next OSR file systems class October 7, 2002!

-----Original Message-----
From: Muath Ali [mailto:xxxxx@commvault.com]
Sent: Tuesday, April 23, 2002 4:33 PM
To: File Systems Developers
Subject: [ntfsd] RE: Directory Control

I don’t believe that a windows installable file system has to return the “.”
as the first file in a directory.

the rest of your scenario is correct, however I’ve noticed that the FIRST
request sent to the file system by the I/O manager always

requires that “a single file entry” to be returned regardless of the number
of files in the directory.

Also note that a file system may return one of the following in response to
a DIRECTORY_CONTROL request:

STATUS_NO_SUCH_FILE : if the file/folder does not exist

STATUS_NO_MORE_FILES : if it already reported all files in the directory.

STATUS_BUFFER_OVERFLOW: if there are more files to be reported.

-----Original Message-----
From: Berty Mednel [mailto:bertym@012.net.il]
Sent: Tuesday, April 23, 2002 2:52 PM
To: File Systems Developers
Subject: [ntfsd] Directory Control

Hi,

I’m implementing Directory Control (Query Directory) function on a private
file system.

I encounter a lot of problems with MS applications. As an answer to a
Directory Control

I see that the MS applications are expecting the “.” File to be returned as
the first file and after the first request is completed the I/O manager
sends additional requests for the rest of the data (the number of requests
depends on the directory length), and after that the last request that will
return the NO_MORE_FILES status.

My question is, is the scenario above right or did I got something wrong.

Are any special things that I should take care in a directory control query.

Any help woul be appreciated.

Thanks,

Berty


You are currently subscribed to ntfsd as: xxxxx@commvault.com
To unsubscribe send a blank email to %%email.unsub%%


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to %%email.unsub%%</http:>

Its actually fairly simple, if not exactly what one would come up with
“afresh”.

Root directory - no ./… returned
Sub directories - ./… returned

Everything else falls from that. This is cosmetic as far as I know, but
its always a good idea to do the same thing as everyone else just to
avoid unnecessary surprises.

This is what the inbox drivers do.

dan

-----Original Message-----
From: Tony Mason [mailto:xxxxx@osr.com]
Sent: Tuesday, April 23, 2002 2:08 PM
To: File Systems Developers
Subject: [ntfsd] RE: Directory Control

The SL_RETURN_SINGLE_ENTRY is an artifact of the way that Win32
implements
FindFirstXxx (one entry) and then asks for blocks of entries
(FindNextXxx).

The ‘.’ and ‘…’ semantics of the file systems are actually complicated.
FAT (as I recall) returns NOTHING if the root directory is empty. It
returns these two entries if there is anything in the root directory or
in a
subdirectory. NTFS mimics this behavior.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http: http://www.osr.com

Hope to see you at the next OSR file systems class October 7, 2002!

-----Original Message-----
From: Muath Ali [mailto:xxxxx@commvault.com]
Sent: Tuesday, April 23, 2002 4:33 PM
To: File Systems Developers
Subject: [ntfsd] RE: Directory Control

I don’t believe that a windows installable file system has to return the
“.”
as the first file in a directory.

the rest of your scenario is correct, however I’ve noticed that the
FIRST
request sent to the file system by the I/O manager always

requires that “a single file entry” to be returned regardless of the
number
of files in the directory.

Also note that a file system may return one of the following in response
to
a DIRECTORY_CONTROL request:

STATUS_NO_SUCH_FILE : if the file/folder does not exist

STATUS_NO_MORE_FILES : if it already reported all files in the
directory.

STATUS_BUFFER_OVERFLOW: if there are more files to be reported.

-----Original Message-----
From: Berty Mednel [mailto:bertym@012.net.il]
Sent: Tuesday, April 23, 2002 2:52 PM
To: File Systems Developers
Subject: [ntfsd] Directory Control

Hi,

I’m implementing Directory Control (Query Directory) function on a
private
file system.

I encounter a lot of problems with MS applications. As an answer to a
Directory Control

I see that the MS applications are expecting the “.” File to be returned
as
the first file and after the first request is completed the I/O manager
sends additional requests for the rest of the data (the number of
requests
depends on the directory length), and after that the last request that
will
return the NO_MORE_FILES status.

My question is, is the scenario above right or did I got something
wrong.

Are any special things that I should take care in a directory control
query.

Any help woul be appreciated.

Thanks,

Berty</http:>

Read the FASTFAT source. It works.

Max

----- Original Message -----
From: Berty Mednel
To: File Systems Developers
Sent: Tuesday, April 23, 2002 10:52 PM
Subject: [ntfsd] Directory Control

Hi,

I’m implementing Directory Control (Query Directory) function on a private file system.

I encounter a lot of problems with MS applications. As an answer to a Directory Control

I see that the MS applications are expecting the “.” File to be returned as the first file and after the first request is completed the I/O manager sends additional requests for the rest of the data (the number of requests depends on the directory length), and after that the last request that will return the NO_MORE_FILES status.

My question is, is the scenario above right or did I got something wrong.

Are any special things that I should take care in a directory control query.

Any help woul be appreciated.

Thanks,

Berty


You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
To unsubscribe send a blank email to %%email.unsub%%