From: Richard Henderson <richard.henderson@linaro.org>
To: Michael Tokarev <mjt@tls.msk.ru>,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: Bin Meng <bin.meng@windriver.com>
Subject: Re: [PATCH] block: honor $TMPDIR in create_tmp_file()
Date: Tue, 2 Sep 2025 15:25:38 +0200 [thread overview]
Message-ID: <73b41cc4-dcb7-40fa-8ace-0fffd1f9465d@linaro.org> (raw)
In-Reply-To: <cff16756-3855-4fc7-8fed-0404662cf35a@tls.msk.ru>
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~
next prev parent reply other threads:[~2025-09-02 13:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-31 11:48 [PATCH] block: honor $TMPDIR in create_tmp_file() Michael Tokarev
2025-08-31 22:39 ` Richard Henderson
2025-09-01 5:31 ` Michael Tokarev
2025-09-02 13:25 ` Richard Henderson [this message]
2025-09-02 16:16 ` Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=73b41cc4-dcb7-40fa-8ace-0fffd1f9465d@linaro.org \
--to=richard.henderson@linaro.org \
--cc=bin.meng@windriver.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).