Re: Callback function for failed disk write?



I believed that you knew, but before I replied to this, I had already hidden
the OP message. I was lazy and didn't want to unhide the read messages.

"m" <m@xxx> wrote in message news:OVnF7dg6FHA.3876@xxxxxxxxxxxxxxxxxxxxxxx
>I know how this stuff works. Hopefully, the OP does now too!
>
> "David J. Craig" <SeniorDriversWriter@xxxxxxxxxxxxxxxxxxxxxxx> wrote in
> message news:OMiHIkN6FHA.1020@xxxxxxxxxxxxxxxxxxxxxxx
>> Disk allocations are handled by the FSD, File System Driver (e.g. NTFS or
>> FastFat), and that driver has to know how much available space there is
>> on the volume. I am only concerned with local disk based volumes. When
>> the request has been processed by the Win32 subsystem, the IO Manager,
>> and all file system filter drivers it will arrive at the FSD. It will
>> then, usually, be put into the cache and written some time in the future,
>> but the space for that data will have already been allocated and
>> reserved, though the directory and FAT information will also be in the
>> cache to be written later. Setting removable drives for performance will
>> flush that data out to the drive much slower than if it is set for quick
>> removable.
>>
>> The above does not cover the situation where the media is removed between
>> the time the write is placed in the cache by the FSD and the cache
>> manager writes the data to the media. Errors on the media will also
>> cause data loss. Almost any hardware error can cause the data to be
>> lost, but the application cannot normally detect such situations. These
>> situations are why the various forms of RAID were invented. I think the
>> OP needs to take some simple computer classes.
>>
>> "m" <m@xxx> wrote in message
>> news:O%23ZNnHN6FHA.4076@xxxxxxxxxxxxxxxxxxxxxxx
>>> Suffice to say that, for you purposes, in a high-level language like VB
>>> or VB.NET, just call the WriteFile equivalent function. If it fails,
>>> check the error code; if it succeeds, assume that the data was written
>>> to disk. The OS will fail a write immediately if there is not enough
>>> disk space.
>>>
>>>
>>>
>>> "TC" <aatcbbtccctc@xxxxxxxxx> wrote in message
>>> news:1131934526.803147.167950@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>>> I'm a bit confused at this point :-)
>>>>
>>>> Say you have a "write to file" function in a high level language such
>>>> as VBA.
>>>>
>>>> Is this true, or false: A write (using that function) could succeed,
>>>> but some time later, the actual write-to-disk might fail because of a
>>>> disk full error. So, even though the PC remains up & running, there is
>>>> no immediate way for the application to be certain whether the data was
>>>> actually written, or not.
>>>>
>>>> I do understand transactions, ACID & all that stuff. I'm just confused,
>>>> now, as to the impact, on normal file-write statements, of the fact
>>>> that Windows buffers the writes behind the scenes.
>>>>
>>>> TIA,
>>>> TC
>>>>
>>>
>>>
>>
>>
>
>


.



Relevant Pages

  • Re: Enable Write Disk Caching not saving (Server 2003)
    ... You may try to install a UPS and if the driver knows that the power is ... requires 'Write Disk Caching' enabling. ... "This device does not allow its write cache setting to be modified" ...
    (microsoft.public.windows.server.general)
  • Re: Write-through the hard disk cache to persistent media (+)
    ... SATA drives don't support per-request write through flag. ... Instructs the system to write through any intermediate cache and go ... directly to disk. ... media. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: [9fans] devsd & media changed errors
    ... the ctl file and then the media changes, ... i ejected a blank disk and reinserted it. ... (some sata drives have loopy firmware.) ... the sdmv driver is not quite driving the disks right). ...
    (comp.os.plan9)
  • Re: File system emulation
    ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... The storage media is>> removable and will be connected to a PC via an IDE or SCSI interface ... >> M-Systems Disk On Key. ... As far as the user is concerned, it seems as if>> the operation was performed vis-a-vis the actual file on the media rather>> than vis-a-vis the dummy file. ...
    (microsoft.public.development.device.drivers)
  • Re: Callback function for failed disk write?
    ... and that driver has to know how much available space there is on ... I am only concerned with local disk based volumes. ... file system filter drivers it will arrive at the FSD. ... usually, be put into the cache and written some time in the future, but the ...
    (microsoft.public.win32.programmer.kernel)