Number of Handles to delete

I am working on a filesystem and using IFSTest baterie to test it’s compatibility with windows, and I found a little problem: When I put the number of opened handles a file can have and be considered closed to 0 it passes the test on IFSTest, but when actually running and I delete a directory it becomes a “ghost” directory, it still apears on the GUI although with a blue name, and returns access denied if I try to do anything with it. but if I put the number of opened handles to 1, as sugested on the documentation of FAST FAT, it doesn’t pass the test but these problems doesn’t appear and it runs smoothly. someone know why I am having this inconsistencies, or had a similar problem before?

Hi Igor,

Where are you setting this number ? What do you mean by “considered closed” ? (In general it is impossible to close a file in a file system, one can only close the FILE_OBJECT representing that file…)

Is this your SCB (or FCB) structure ? Once the reference count gets to 0 you can release the SCB .

Could you please point to the where the FastFat sample suggests the number of handles should be 1 ?


Beginning on the line 395 of close.c on fast fat>

// Now check the Open count. We may be about to delete
this volume!
// The test below must be <= 1 because there could still
be outstanding
// stream references on this VCB that are not counted in
the OpenFileCount.
// For example if there are no open files OpenFileCount
could be zero and we would
// not release the resource here. The call to
FatCommonClose() below may cause
// the VCB to be torn down and we will try to release
memory we don’t
// own later.

The file is “considered closed” when you can do operations like delete or
rename with it. that saying when the number of handles is equal or less to
a given number. My problem is knowing exatly the number of opened handles a
file can have and still can be considered closed. Uf 0 or 1