On 9/1/25 15:31, Michael Tokarev wrote:
On 01.09.2025 01:39, Richard Henderson wrote:
On 8/31/25 21:48, Michael Tokarev wrote:
/*
* See commit 69bef79 ("block: use /var/tmp instead of /tmp for
-snapshot")
*
@@ -862,7 +860,12 @@ char *create_tmp_file(Error **errp)
* so the files can become very large. /tmp is often a tmpfs where as
* /var/tmp is usually on a disk, so more appropriate for disk images.
*/
This is going to cause other failures, per the tmpfs reason given in the
comment.
This is the comment:
* This function is used to create temporary disk images (like -snapshot),
* so the files can become very large. /tmp is often a tmpfs where as
* /var/tmp is usually on a disk, so more appropriate for disk images.
It does not give reasons for "other failures".
It does gloss over the implications of "tmpfs". But off the top of my head:
(1) tmpfs is generally smaller than any other disk-based tmpdir,
so ENOSPC is easier to trigger, and
(2) tmpfs does not support several O_FOO.
Are you saying the user, who decided to explicitly specify TMPDIR,
is wrong, and qemu should use /var/tmp which does not even exist
(see the bug report this patch is fixing)?
I think this is a very strong interpretation since the non-existence of /var/tmp is, IMO,
new and rare. /var/tmp most certainly *does* exist with all of the major distros.
The original code (before 69fbfff95e84) was correct. Current code
is not. My change fixes current wrong code.
If this goes in as-is, you are on the hook for any reported testsuite
regression.
r~