mohammad galal
unread,Oct 7, 2009, 4:01:16 AM10/7/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Dokan
Hi all,
have any one encounter this situation while using set end of file
function,
i am trying to limit the size of my virtual directory that i redirect
FS functions to, so simply whenever i reach the max size i do the
follow in the SetendOfFile Function
if(NewSize >= MaxCacheSize)
{
DbgPrint(L"File cannot be created \n");
return -1 * ERROR_HANDLE_DISK_FULL;
}
but actually i found that Dokan driver continue with calling set file
attribute and write the file buffer in to the new file
and here is the log
[424] SetEndOfFile C:\S3Cache\3.txt, 120
[424] totalsize + newfilesize = 120
[424] maxCacheSize = 100
[424]
[424] File Size is larger than the cache please reset the
configuration
[424] File cannot be created
[424] SetInfomation status = -39
[424]
[424] ###SetFileInfo 0078
[424] SetFileAttributes C:\S3Cache\3.txt
[424]
[424] SetFileTime C:\S3Cache\3.txt
[424]
[424] SetInfomation status = 0
[424]
[424] ###WriteFile 0078
[424] WriteFile : C:\S3Cache\3.txt, offset 0, length 120
[424] write 120, offset 0
[424]
[424] ###SetFileInfo 0078
[424] SetFileAttributes C:\S3Cache\3.txt
[424]
[424] SetFileTime C:\S3Cache\3.txt
[424]
[424] SetInfomation status = 0
[424]
[424] ###Cleanup 0078
[424] Cleanup: C:\S3Cache\3.txt