This problem prevents ros from deleting a file/directory (observed while running wine kernel32 reg. tests with param "path")
around line 295 in vfat\finfo.c: (svn blame says Hartmut made the last changes around here)
------------------------------------------------ if (DispositionInfo->DeleteFile) { if (MmFlushImageSection (FileObject->SectionObjectPointer, MmFlushForDelete)) { if (FCB->OpenHandleCount > 1) { DPRINT1("%d %x\n", FCB->OpenHandleCount, CcGetFileObjectFromSectionPtrs(FileObject->SectionObjectPointer)); Status = STATUS_ACCESS_DENIED; } else { FCB->Flags |= FCB_DELETE_PENDING; FileObject->DeletePending = TRUE; } } else { ------------------------------------------------ Why deny deletion with STATUS_ACCESS_DENIED if FCB->OpenHandleCount > 1 ??????
Gunnar
Gunnar Dalsnes schrieb:
This problem prevents ros from deleting a file/directory (observed while running wine kernel32 reg. tests with param "path")
around line 295 in vfat\finfo.c: (svn blame says Hartmut made the last changes around here)
if (DispositionInfo->DeleteFile) { if (MmFlushImageSection (FileObject->SectionObjectPointer, MmFlushForDelete)) { if (FCB->OpenHandleCount > 1) { DPRINT1("%d %x\n", FCB->OpenHandleCount, CcGetFileObjectFromSectionPtrs(FileObject->SectionObjectPointer)); Status = STATUS_ACCESS_DENIED; } else { FCB->Flags |= FCB_DELETE_PENDING; FileObject->DeletePending = TRUE; } } else {
Why deny deletion with STATUS_ACCESS_DENIED if FCB->OpenHandleCount > 1 ??????
It is only possible to delete a file if the file is not mapped (as image or data section) and if nobody else has open this file. The second condition is the reason for the handle check. There exist one situation for more than one handle. The file can be open with FILE_SHARE_DELETE. Currently it is not implemented.
- Hartmut
Hi! Hartmut Birr wrote:
Gunnar Dalsnes schrieb:
It is only possible to delete a file if the file is not mapped (as image or data section) and if nobody else has open this file. The second condition is the reason for the handle check. There exist one situation for more than one handle. The file can be open with FILE_SHARE_DELETE. Currently it is not implemented.
- Hartmut
Just to give a heads up on vfat! There is a Free Space bug. I have to run win98 scandisk on the ros drive to fix it. James
James Tabor schrieb:
Just to give a heads up on vfat! There is a Free Space bug. I have to run win98 scandisk on the ros drive to fix it. James
Did you found a real error or only a message about a mismatched free size? Vfat does not update the available cluster count on shutdown.
- Hartmut
Hartmut Birr wrote:
James Tabor schrieb:
Just to give a heads up on vfat! There is a Free Space bug. I have to run win98 scandisk on the ros drive to fix it. James
Did you found a real error or only a message about a mismatched free size? Vfat does not update the available cluster count on shutdown.
- Hartmut
That's right! Mismatch free size every time. James
Which fat version does you use in windows 98? vfat32a or vfat32b ?
vfat32a does have some bugs 1. Mismatch free size betwin vfat32a and vfat32b 2. can not store biger that 2GB files on one parition.
that only two bugs I know exists in vfat32a only way check this is to see how large file you can store. that does not be corrupt.
----- Original Message ----- From: "James Tabor" jimtabor@adsl-64-217-116-74.dsl.hstntx.swbell.net To: "ReactOS Development List" ros-dev@reactos.com Sent: Wednesday, March 16, 2005 8:43 PM Subject: Re: [ros-dev] vfat bug (hartmut?)
Hartmut Birr wrote:
James Tabor schrieb:
Just to give a heads up on vfat! There is a Free Space bug. I have to
run
win98 scandisk on the ros drive to fix it. James
Did you found a real error or only a message about a mismatched free size? Vfat does not update the available cluster count on shutdown.
- Hartmut
That's right! Mismatch free size every time. James _______________________________________________ Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
Magnus Olsen wrote:
Which fat version does you use in windows 98? vfat32a or vfat32b ?
vfat32a does have some bugs
- Mismatch free size betwin vfat32a and vfat32b
- can not store biger that 2GB files on one parition.
that only two bugs I know exists in vfat32a only way check this is to see how large file you can store. that does not be corrupt.
Is there no ext2 driver or something for NT we can use?
regards, Jakob
It is only possible to delete a file if the file is not mapped (as image or data section) and if nobody else has open this file. The second condition is the reason for the handle check. There exist one situation for more than one handle. The file can be open with FILE_SHARE_DELETE. Currently it is not implemented.
I have checked some other fs' (a couple of ext fs') and they do no such check. Io(Set/Check)ShareAccess should already have taken care of denying access in the right cases (when create/open file). Removing the handle check fixes my problem:-)
Gunnar
- Hartmut
Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev