Ticket #171 (closed defect: fixed)
Disable buffering
| Reported by: | Joel | Owned by: | Joel |
|---|---|---|---|
| Priority: | blocker | Milestone: | Eraser 6.0 |
| Component: | Core | Version: | 6.0.4.875 |
| Keywords: | buffering write through | Cc: | |
| Processor Architecture: | Blocked By: | ||
| Blocking: | Operating System: |
Description
Eraser should utilise the FILE_FLAG_WRITE_THROUGH and FILE_FLAG_NO_BUFFERING flags when calling CreateFile?. Investigate how the memory requirements for FILE_FLAG_NO_BUFFERING can be met in .NET and to implement it to provide a strong guarantee for proper erasures.
Resources:
http://msdn.microsoft.com/en-us/library/cc644950(VS.85).aspx
http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx
Blocking
| Id | Summary | Milestone |
|---|---|---|
| #171 | └ Disable buffering | Eraser 6.0 |
Blocked by
| Id | Summary | Milestone |
|---|---|---|
| #171 | └ Disable buffering | Eraser 6.0 |
Change History
comment:2 Changed 4 years ago by Overwriter
Nice to see you are thinking about things like this Joel. :o)
I believe V6 will be in for some serious testing soon !
comment:3 Changed 4 years ago by Joel
- Status changed from accepted to closed
- Resolution set to fixed
Actually I've looked through the documentation again and FILE_FLAG_WRITE_THROUGH is sufficient as that instructs the system to write the data directly to disk after copying to cache. Copying to the system cache is necessary because in .NET we have little control over the memory allocated for us by the CLR (unless we resort to using P/Invoke to get what we want) and it may not fulfil driver requirements.
I've therefore updated the code to use FILE_FLAG_WRITE_THROUGH and its .NET equivalent FileOptions?.WriteThrough? for all relevant file operations.
Fixed in r893.
