<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr">Hi Christoph,</div><div dir="ltr"><br><blockquote type="cite">On Jan 30, 2020, at 4:13 AM, Thiede, Christoph <Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr">

<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>


<meta content="text/html; charset=UTF-8">

<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Hi all!</p>
<p><br>
</p>
<p>> <span style="font-size:12pt">On configurations where overwrite-by-rename is a problem, perhaps an </span><span style="font-size:12pt">alternate of "copy the existing image to a *.bak file" would work?</span></p>
<div><br>
</div>
<p></p>
<div id="x_Signature">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div name="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">
<div class="x__rp_U4 x_ms-font-weight-regular x_ms-font-color-neutralDark x_rpHighlightAllClass x_rpHighlightBodyClass" id="x_Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="x_divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="x_Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont">
<div><font size="3" color="black"><span style="font-size:12pt"><a href="http://www.hpi.de/" target="_blank" rel="noopener noreferrer" id="LPNoLP"><font size="2"><span id="LPlnk909538"><font color="#757B80"></font></span></font></a></span></font></div>
</font></div>
</div>
</font></div>
</div>
</div>
</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">Compared to overwrite-by-rename, this proposal would double the storage effort. Provided that I understand you correctly, -1 :-)</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody"><br>
</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">> <span style="font-size:12pt">On configurations where overwrite-by-rename is a problem, perhaps an </span><span style="font-size:12pt">alternate of "copy the existing image to a *.bak file" would work?</span>
</div></div></div></div></div></div></div></div></blockquote><div><br></div>If you want a backup, even temporarily, then you can’t avoid needing twice the file storage while the new snapshot is being written.  So careful what you wish for.  All implementations have this as a consequence, by definition.<div><br><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif"><div id="x_Signature"><div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols"><div name="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0"><div><div class="x__rp_T4" id="x_Item.MessagePartBody"><div><span style="font-size: 12pt;">What would you like to do with this backup file? Keep them permanently? As we speak about hundreds-of-megabytes file sizes, I think this could be quite storage extensive ... Also, it messes up your image folder. We already have two files for each image:
 .image and .changes. No need for even more files, imho. But there may always be some special application areas, of course :)</span></div></div></div></div></div></div></div></div></div></blockquote><div><br></div>Well, if it stays around then it gets replaced on every save.  So one only has one copy per image.  One presumably would never rename the backup to save it when creating the next backup.  So in fact the operation is</div><div><br></div><div>- if saving to an existing file</div><div>    - delete the backup foo.imagebak if it exists</div><div>    - rename foo.image to foo.imagebak</div><div>    - save the image</div><div>    - optionally validate the new image</div><div>    - optionally delete the backup</div><div><br><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif"><div id="x_Signature"><div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols"><div name="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0"><div><div class="x__rp_T4" id="x_Item.MessagePartBody">
</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody"><span style="font-size: 12pt;">+1 for making a preference for it :-)</span></div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">However, my personal flavor would be to rule this behavior via the Squeak.ini file (not sure what's the equivalent on other host platforms), so I would prefer to store this preference image-invariant.</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody"><br>
</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">VM support: What would be the pros and cons of implementing this in the VM?</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">First, I don't know whether we already support a way to read the Squeak.ini file from within the image (see above)?</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">Second, I *could* imagine (though this is spoken hypothetically) that certain host systems might provide convenient ways for implementing overwrite-by-rename. See my initial mail for my worries about a naive
 implementation. Again, wouldn't this be an argument for implementing this rather at VM side?</div></div></div></div></div></div></div></div></blockquote><div><br></div>Good questions.  I think implementing image side is better.  The snapshot primitive is separate from the quit primitive, so if the snapshot primitive succeeds there is time for the image to eg run validation and/or delete the backup before quitting.</div><div><br></div><div>This seems to me relayed to the other snapshot bug, which is that we GC in the snapshot primitive. This is completely wrong because it elides finalization actions.  Instead we should do a full GC in the image *before* doing the snapshot, allow any finalization actions to complete and then do the snapshot.  VW does this correctly.</div><div><br><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif"><div id="x_Signature"><div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols"><div name="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0"><div>
<div class="x__rp_T4" id="x_Item.MessagePartBody"><span style="font-size: 12pt;">Ad validation: Sounds interesting! How high would be the effort for that? Could you do this from within the VM (it's also a question of performance, I guess)? Wouldn't this double the store time? Maybe it would
 be a good idea to have a second (VM) preference for toggling validation.</span></div></div></div></div></div></div></div></div></blockquote><div><br></div>Validation could (and IMO /should/) be fine via the new image leak checker.  This is a cut down vm that only loads an image and applies the leak checker before quitting.  To make this runnable from the image eg vis OSProcess.  That makes this an optional project because OSProcess is not in the base image.</div><div><br><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif"><div id="x_Signature"><div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols"><div name="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0"><div>
<div class="x__rp_T4" id="x_Item.MessagePartBody"><br>
</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">Best,</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">Christoph</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von tim Rowledge <tim@rowledge.org><br>
<b>Gesendet:</b> Mittwoch, 29. Januar 2020 22:05:07<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] Image damaged due to IO error while saving</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText"><br>
<br>
> On 2020-01-29, at 12:24 PM, Tony Garnock-Jones <tonyg@leastfixedpoint.com> wrote:<br>
> <br>
> Oh, I see, so it's probably something that can be arranged entirely<br>
> image-side, no VM support needed. Right?<br>
<br>
Pretty sure it could be done without VM support, yes. One might even use the OSProcess forking trick to do it, I think.<br>
<br>
> ... it'd be a Preference, I suppose?<br>
Yet another ...<br>
<br>
<br>
tim<br>
--<br>
tim Rowledge; tim@rowledge.org; <a href="http://www.rowledge.org/tim">http://www.rowledge.org/tim</a><br>
"How many Kdatlyno does it take to change a lightbulb?” <br>
"None. It sounds perfectly OK to them."<br>
<br>
<br>
<br>
<br>
</div>
</span></font>


<span></span><br></div></blockquote></div></body></html>