Note that hard drives have onboard caches also. If the OS successfully
flushes data to the onboard cache, there is still no guarantee that it is on
the platters. Furthermore, many of the drives do not support operations to
flush their caches to the platters. When I asked one vendor about this,
their response was “we have no reason to do this; it would cause too many
problems.” So when I said “so how do I know my transacted file system is
correctly updated?” the answer was “If it fails, we just blame Microsoft”
[Lesson: don’t let the techies talk to customers on the trade show floor…]
This was a few years ago; perhaps they have learned their lesson and support
this now. But it makes me very nervous about my server…
joe
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Vladimir Zinin
Sent: Wednesday, January 14, 2009 2:15 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Query about CreateFile API with FILE_FLAG_NO_BUFFERING
flag
1> Does that mean any data written to the file may not get reflected
1> to the disk
even if you have used FILE_FLAG_NO_BUFFERING in case of power failures?
Perhaps. But after WriteFile (or ZwWriteFile) returns successfully the
written data has already been successfully sent to the storage stack (and it
returned STATUS_SUCCESS too).
2> Does the point 1 apply to FlushFileBuffers API? i.e. FlushFileBuffers
is called and still it is cached by hard disk caching?
Yes, it does.
3> Can any one explain me what is the difference between using
FILE_FLAG_NO_BUFFERING flag and using FlushFileBuffers API with respect to
disk caching?
FlushFileBuffers just flushes not written yet data from the system cache.
The data are sent to the storage stack in the same way as
FILE_FLAG_NO_BUFFERING uses.
BTW using FILE_FLAG_NO_BUFFERING it’s possible only to read/write data
blocks that are multiple to sector size.
–
Best regards,
Vladimir Zinin
xxxxx@eldos.com
NTFSD is sponsored by OSR
For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars
You are currently subscribed to ntfsd as: xxxxx@flounder.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
–
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.