Re: Callback function for failed disk write?
- From: "David J. Craig" <SeniorDriversWriter@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 15 Nov 2005 20:47:12 -0800
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
>>>>
>>>
>>>
>>
>>
>
>
.
- References:
- Re: Callback function for failed disk write?
- From: Pavel A.
- Re: Callback function for failed disk write?
- From: Hector Santos
- Re: Callback function for failed disk write?
- From: Hector Santos
- Re: Callback function for failed disk write?
- From: Hector Santos
- Re: Callback function for failed disk write?
- From: Vincent Fatica
- Re: Callback function for failed disk write?
- From: Hector Santos
- Re: Callback function for failed disk write?
- From: Vincent Fatica
- Re: Callback function for failed disk write?
- From: Hector Santos
- Re: Callback function for failed disk write?
- From: TC
- Re: Callback function for failed disk write?
- From: m
- Re: Callback function for failed disk write?
- From: David J. Craig
- Re: Callback function for failed disk write?
- Prev by Date: Re: SetNamedPipeHandleState problems??
- Next by Date: Re: Callback function for failed disk write?
- Previous by thread: Re: Callback function for failed disk write?
- Next by thread: Re: Callback function for failed disk write?
- Index(es):
Relevant Pages
|