Hi everyone…
In my system I need to make sure that what I’ve written to the file has
reached the disk by the time when file is closed.
To secure this behavior I open file with Action=FILE_OVERWRITE_IF, and
Options=FILE_NO_INTERMEDIATE_BUFFERING | FILE_WRITE_THROUGH. To my surprise
(big surprize) file seems to be empty after writing (file size = 0).
As soon as I use Options=0 instead of FILE_NO_INTERMEDIATE_BUFFERING |
FILE_WRITE_THROUGH (and that’s the only change that
I’ve made) file has content. How FILE_NO_INTERMEDIATE_BUFFERING |
FILE_WRITE_THROUGH can cause this behavior?
I’ve observed this behavior on FAT32 volume.
TIA,
Vladimir
It really depends on whether the write succeeded. You did remember to
check the status of the write, right?
Remember also to supply sector aligned buffer/length - you are
essentially doing raw i/o to the block device.
Ravi
-----Original Message-----
From: Vladimir Chtchetkine [mailto:xxxxx@starbase.com]
Sent: Friday, June 07, 2002 4:17 PM
To: File Systems Developers
Subject: [ntfsd] FILE_NO_INTERMEDIATE_BUFFERING flag…
Hi everyone…
In my system I need to make sure that what I’ve written to the file has
reached the disk by the time when file is closed.
To secure this behavior I open file with Action=FILE_OVERWRITE_IF, and
Options=FILE_NO_INTERMEDIATE_BUFFERING | FILE_WRITE_THROUGH. To my
surprise (big surprize) file seems to be empty after writing (file size
= 0).
As soon as I use Options=0 instead of FILE_NO_INTERMEDIATE_BUFFERING |
FILE_WRITE_THROUGH (and that’s the only change that
I’ve made) file has content. How FILE_NO_INTERMEDIATE_BUFFERING |
FILE_WRITE_THROUGH can cause this behavior?
I’ve observed this behavior on FAT32 volume.
TIA,
Vladimir
You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to %%email.unsub%%