[Bug 14914] files are created as sparse files when they shouldn't

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Aug 21 03:51:06 CDT 2008


--- Comment #12 from Marcus Blomenkamp <mblomenk at gmx.de>  2008-08-21 03:51:05 ---

The files are not corrupt, all file content is fine. But when the application
is finished, the files are completely fragmented. That is because the
application writes to the file in random fashion. The application developers
knew that of course, so they 'preallocated' (probably the wrong word?) the file
by specifying the final size with the following Windows VFW API calls:

CreateFileW, SetFilePointer, SetEndOfFile

This sequence i have captured in the first attachment. This sequence is
quaranteed by Windows API specifiction to create a contiguous file preferably.
But under Linux/Wine this sequeny results in creation of a 100% sparsefile.
Which means that when later on the application writes to the file in randon
fashion, file blocks are allocated in the underlying storage in random order as
well. Inevitably leading to fragmentation.

As i explained in the last paragraph of my previous comment: It is a question
of what Wine wants to do. Does it want to export Windows VFS API semantics or
does it want to pass Linux filesystem semantics down to the application?

Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the wine-bugs mailing list