[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 04/16] qemu-file: Don't call qemu_fflush() for read only file
From: |
Juan Quintela |
Subject: |
Re: [PATCH 04/16] qemu-file: Don't call qemu_fflush() for read only files |
Date: |
Tue, 30 May 2023 19:06:58 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
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.
Two things:
- Current code just do nothing for imput streams
- We only call it from qemu_fclose()
- If we drop anything from the input stream, migration get broken.
If it makes you feel better, I can rename the function to
qemu_file_write_buffer() or whatever name your preffer.
Later, Juan.
- [PATCH 03/16] migration: Use qemu_file_transferred_noflush() for block migration., (continued)
- [PATCH 03/16] migration: Use qemu_file_transferred_noflush() for block migration., Juan Quintela, 2023/05/30
- [PATCH 13/16] qemu-file: Simplify qemu_file_get_error(), Juan Quintela, 2023/05/30
- [PATCH 05/16] qemu-file: We only call qemu_file_transferred_* on the sending side, Juan Quintela, 2023/05/30
- [PATCH 08/16] migration: Use the number of transferred bytes directly, Juan Quintela, 2023/05/30
- [PATCH 09/16] qemu_file: Remove unused qemu_file_transferred(), Juan Quintela, 2023/05/30
- [PATCH 04/16] qemu-file: Don't call qemu_fflush() for read only files, Juan Quintela, 2023/05/30
- Re: [PATCH 04/16] qemu-file: Don't call qemu_fflush() for read only files, Juan Quintela, 2023/05/30
[PATCH 10/16] qemu-file: Remove _noflush from qemu_file_transferred_noflush(), Juan Quintela, 2023/05/30
[PATCH 01/16] qemu-file: Rename qemu_file_transferred_ fast -> noflush, Juan Quintela, 2023/05/30
Re: [PATCH 00/16] Next round of migration atomic counters, Juan Quintela, 2023/05/30