EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Long time deadlock during format procedure

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
#11927
Posted: 12/14/2009 01:56:55
by Eugene Mayevski (EldoS Corp.)

We will surely test this. When the developer has time.


Sincerely yours
Eugene Mayevski
#11928
Posted: 12/14/2009 02:23:51
by Volodymyr Zinin (EldoS Corp.)

Actually NTFS does such long time writing. I tried the following code and the WriteFile call lasted about 2 minutes.

Code
int main(....)
{
    ...
    HANDLE h = CreateFile( L"c:\\1.txt",
                           GENERIC_WRITE | GENERIC_READ,
                           FILE_SHARE_READ | FILE_SHARE_WRITE,
                           NULL,
                           CREATE_ALWAYS,
                           FILE_FLAG_NO_BUFFERING,
                           NULL );

    LARGE_INTEGER distanceToMove;
    distanceToMove.QuadPart= (ULONGLONG)7*1024*1024*1024; //7Gb

    b = SetFilePointerEx(h, distanceToMove, NULL, FILE_BEGIN);

    char buf[512];
    DWORD bytesTransferred;
    b = WriteFile(h, buf, 512, &bytesTransferred, NULL);
        
    CloseHandle(h);
    ...
}
#11979
Posted: 12/21/2009 23:57:15
by Lemon Yang (Standard support level)
Joined: 11/24/2009
Posts: 48

Now I understand. thank you.

Reply

Statistics

Topic viewed 11599 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!