Re: Callback function for failed disk write?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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: File Merge
    ... You cannot know what happened until it actually happens -- so the only way to know that you have reached end-of-input is to try to read something and get a failure. ... might fail: for example, input from a disk could fail in the event of a head crash, or input from a keyboard could fail if you spilled Coke Classic into the mechanism and shorted it out with caramelized sugar. ... Most of C's input functions report a kind of "generalized failure" no matter what the cause -- and the *only* reason feof() exists is to let you figure out that cause. ...
    (comp.lang.c)
  • Re: ext2/3: document conditions when reliable operation is possible
    ... +during write, filesystems can't handle that correctly, because success ... and all we can do is fail. ... And here we're talking about ext2. ... Sounds like broken disk, then. ...
    (Linux-Kernel)
  • Re: [Question] Does the kernel ignore errors writng to disk?
    ... > as if the kernel may be ignoring write errors to disk. ... will fail with a time-out. ... File data gets flushed to a queue. ... You can observe the behavior by mounting a floppy disk and ...
    (Linux-Kernel)
  • Re: SQL 2000 extra instance into same group
    ... There is a trace flag that will disable the disk dependency check, ... If you had multiple instances running in the same resource group, ... If one were to fail, ... Every instance requires its own group/disk/IP/networkname in a cluster. ...
    (microsoft.public.sqlserver.clustering)
  • Re: Yet another [Un]Zip behavior quirk. Non-stupid opinions sought.
    ... > first time, be fully allocated at once, instead of incrementally. ... >> precautions against exceeding disk quota or filling up the disk. ... > fail to see any difference from the previous behavior. ...
    (comp.os.vms)