[squeak-dev] Image damaged due to IO error while saving

tim Rowledge tim at rowledge.org
Sun Feb 2 19:03:35 UTC 2020



> On 2020-02-02, at 6:03 AM, K K Subbu <kksubbu.ml at gmail.com> wrote:
> 
> On 02/02/20 7:57 AM, tim Rowledge wrote:
>> The way we used to do this on RISC OS was (is, for the remaining
>> users!) to allocate a file of the required size and it would be
>> filled with 0. That way if you got a success return code you knew for
>> certain (barring fire, flood, bomb or bear attack) that the file
>> could be over-written with your real content. Do any other filing
>> systems actually really definitely allocate space when you ask for
>> it? No idea.
> 
> Writing twice into the same file will increase wear and tear in SSDs unnecessarily. 

True, but in defence of RISC OS it does predate even the fantasy of SSDs by perhaps a couple of decades :-)

Obviously the key point is actually, definitely, allocating the required space, as opposed to optimistically claiming to have some room and then getting all upset when your application tries to use it.


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
"How many Carlos Wus does it take to change a lightbulb?” 
"With an unlimited breeding licence, who needs lightbulbs?"





More information about the Squeak-dev mailing list