SetEndOfFile problem

103 views
Skip to first unread message

mohammad galal

unread,
Oct 7, 2009, 4:01:16 AM10/7/09
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

mohammad galal

unread,
Oct 19, 2009, 7:59:03 AM10/19/09
to Dokan
Hi all,

i found the problem in dokan dll where GetNTStatus function wasnt
return the right return code so please add in the switch case this
case

case ERROR_DISK_FULL:
return STATUS_DISK_FULL;

Greetings

Hiroki Asakawa

unread,
Oct 19, 2009, 8:26:34 AM10/19/09
to do...@googlegroups.com
Hi,
Thank you for your report. I submitted the fix of this issue.
http://code.google.com/p/dokan/source/detail?r=41

Thanks,
Hiroki Asakawa
Reply all
Reply to author
Forward
0 new messages