|
From: | Richard Henderson |
Subject: | Re: [PATCH 04/16] qemu-file: Don't call qemu_fflush() for read only files |
Date: | Tue, 30 May 2023 10:14:24 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 |
On 5/30/23 10:06, Juan Quintela wrote:
Richard Henderson <richard.henderson@linaro.org> wrote:On 5/30/23 05:28, Juan Quintela wrote:This was the only caller for read only files. So change the test for an assert in qemu_fflush().Not a fan, as fflush(stdin) is well-defined.I guess you mean this: For input streams associated with seekable files (e.g., disk files, but not pipes or terminals), fflush() discards any buffered data that has been fetched from the underlying file, but has not been consumed by the application.
Yes, in that, importantly, it does not assert.
Two things: - Current code just do nothing for imput streams - We only call it from qemu_fclose()
Pardon? There are nearly 30 calls to qemu_fflush.
- If we drop anything from the input stream, migration get broken.
I'm not talking about dropping anything. Obviously QEMUFile works different from stdio, and therefore resetting the file state to that of the unbuffered data is not relevant.
r~
[Prev in Thread] | Current Thread | [Next in Thread] |