NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: misc/33753 (don't installworld to a full disk)
The following reply was made to PR misc/33753; it has been noted by GNATS.
From: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: misc/33753 (don't installworld to a full disk)
Date: Sun, 28 May 2023 06:59:35 -0000 (UTC)
dholland%NetBSD.org@localhost writes:
>Synopsis: don't installworld to a full disk
>State-Changed-From-To: feedback->open
>State-Changed-By: dholland%NetBSD.org@localhost
>State-Changed-When: Sun, 28 May 2023 05:45:42 +0000
>State-Changed-Why:
>I don't remember what I was thinking in 2006, and any diagnosis I did
>then would have ended up in here (thus, little or none) so IDK. But
>remember that installworld runs by creating and unpacking sets, not
>install(1), so the problem is probably somewhere in the tar/pax/whatnot
>borg. Or was. And probably the problem was total failure to detect
>write errors at all.
>Whether this is still current I have no idea; it should be possible to
>test it with a scratch partition.
From the copy function of pax:
if ((fddest = file_creat(arcn, 0)) < 0) {
rdfile_close(arcn, &fdsrc);
purg_lnk(arcn);
continue;
}
cp_file(arcn, fdsrc, fddest);
file_close(arcn, fddest);
file_creat creates a temporary file.
cp_file copies the data.
file_close closes the destination and renames it.
However, any kind of error during the copy or close (like disk full)
just produces a warning, it doesn't prevent the operation from being
aborted or the old file from being kept.
Home |
Main Index |
Thread Index |
Old Index