Re: [PATCH 1/2] vvfat: allow some writes to bootsector

2022-09-30 Thread Kevin Wolf
Am 29.09.2022 um 21:53 hat Hervé Poussineau geschrieben: > Le 29/09/2022 à 16:10, Kevin Wolf a écrit : > > Am 03.09.2022 um 18:23 hat Hervé Poussineau geschrieben: > > > 'reserved1' field in bootsector is used to mark volume dirty, or need to > > > verify. > > > Allow writes to bootsector which on

Re: [PATCH 1/2] linux-aio: use LinuxAioState from the running thread

2022-09-30 Thread Emanuele Giuseppe Esposito
Am 29/09/2022 um 16:52 schrieb Kevin Wolf: > Am 09.06.2022 um 15:44 hat Emanuele Giuseppe Esposito geschrieben: >> From: Paolo Bonzini >> >> Remove usage of aio_context_acquire by always submitting asynchronous >> AIO to the current thread's LinuxAioState. >> >> Signed-off-by: Paolo Bonzini >>

Re: [PATCH v5 2/2] block: Refactor get_tmp_filename()

2022-09-30 Thread Kevin Wolf
Am 28.09.2022 um 16:41 hat Bin Meng geschrieben: > From: Bin Meng > > At present there are two callers of get_tmp_filename() and they are > inconsistent. > > One does: > > /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ > char *tmp_filename = g_malloc0(PATH_MAX + 1

Re: [PATCHv3 0/2] qemu direct io alignment fix

2022-09-30 Thread Kevin Wolf
Am 29.09.2022 um 22:05 hat Keith Busch geschrieben: > From: Keith Busch > > Changes from v2: > > Split the patch so that the function move is separate from the > functional change. This makes it immediately obvious what criteria is > changing. (Kevin Wolf) > > Added received Tested-by t

Re: [PATCH 2/2] thread-pool: use ThreadPool from the running thread

2022-09-30 Thread Emanuele Giuseppe Esposito
Am 29/09/2022 um 17:30 schrieb Kevin Wolf: > Am 09.06.2022 um 15:44 hat Emanuele Giuseppe Esposito geschrieben: >> Remove usage of aio_context_acquire by always submitting work items >> to the current thread's ThreadPool. >> >> Signed-off-by: Paolo Bonzini >> Signed-off-by: Emanuele Giuseppe Es

Re: [PATCH 2/2] thread-pool: use ThreadPool from the running thread

2022-09-30 Thread Emanuele Giuseppe Esposito
Am 30/09/2022 um 14:17 schrieb Emanuele Giuseppe Esposito: > > > Am 29/09/2022 um 17:30 schrieb Kevin Wolf: >> Am 09.06.2022 um 15:44 hat Emanuele Giuseppe Esposito geschrieben: >>> Remove usage of aio_context_acquire by always submitting work items >>> to the current thread's ThreadPool. >>>

Re: [PATCH v2 1/7] piix_ide_reset: Use pci_set_* functions instead of direct access

2022-09-30 Thread Kevin Wolf
Am 07.07.2022 um 05:11 hat Lev Kujawski geschrieben: > Eliminate the remaining TODOs in hw/ide/piix.c by: > * Using pci_set_{size} functions to write the PIIX PCI configuration > space instead of manipulating it directly as an array; and > * Documenting the default register values by reference to

Re: [PATCH 1/2] linux-aio: use LinuxAioState from the running thread

2022-09-30 Thread Kevin Wolf
Am 30.09.2022 um 12:00 hat Emanuele Giuseppe Esposito geschrieben: > > > Am 29/09/2022 um 16:52 schrieb Kevin Wolf: > > Am 09.06.2022 um 15:44 hat Emanuele Giuseppe Esposito geschrieben: > >> From: Paolo Bonzini > >> > >> Remove usage of aio_context_acquire by always submitting asynchronous > >>

Re: [PATCH 2/2] thread-pool: use ThreadPool from the running thread

2022-09-30 Thread Kevin Wolf
Am 30.09.2022 um 14:17 hat Emanuele Giuseppe Esposito geschrieben: > Am 29/09/2022 um 17:30 schrieb Kevin Wolf: > > Am 09.06.2022 um 15:44 hat Emanuele Giuseppe Esposito geschrieben: > >> Remove usage of aio_context_acquire by always submitting work items > >> to the current thread's ThreadPool. >

[PULL 04/18] block: pass OnOffAuto instead of bool to block_acct_setup()

2022-09-30 Thread Kevin Wolf
From: "Denis V. Lunev" We would have one more place for block_acct_setup() calling, which should not corrupt original value. Signed-off-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy CC: Peter Krempa CC: Markus Armbruster CC: John Snow CC: Kevin Wolf CC: Hanna Reitz Message-

[PULL 07/18] block: make serializing requests functions 'void'

2022-09-30 Thread Kevin Wolf
From: "Denis V. Lunev" Return codes of the following functions are never used in the code: * bdrv_wait_serialising_requests_locked * bdrv_wait_serialising_requests * bdrv_make_request_serialising Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Hanna Reitz CC: Stefan Hajnoczi CC: Fam Zheng

[PULL 03/18] qemu-img: Wean documentation and help output off '?' for help

2022-09-30 Thread Kevin Wolf
From: Markus Armbruster '?' for help is deprecated since commit c8057f951d "Support 'help' as a synonym for '?' in command line options", v1.2.0. We neglected to update output of qemu-img --help and the manual. Do that now. Signed-off-by: Markus Armbruster Message-Id: <20220908130842.641410-1

[PULL 00/18] Block layer patches

2022-09-30 Thread Kevin Wolf
The following changes since commit c8de6ec63d766ca1998c5af468483ce912fdc0c2: Merge tag 'pull-request-2022-09-28' of https://gitlab.com/thuth/qemu into staging (2022-09-28 17:04:11 -0400) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fe

[PULL 02/18] block/qcow2-bitmap: Add missing cast to silent GCC error

2022-09-30 Thread Kevin Wolf
From: Philippe Mathieu-Daudé Commit d1258dd0c8 ("qcow2: autoloading dirty bitmaps") added the set_readonly_helper() GFunc handler, correctly casting the gpointer user_data in both the g_slist_foreach() caller and the handler. Few commits later (commit 1b6b0562db), the handler is reused in qcow2_r

[PULL 01/18] qcow2: fix memory leak in qcow2_read_extensions

2022-09-30 Thread Kevin Wolf
From: lu zhipeng Free feature_table if it is failed in bdrv_pread. Signed-off-by: lu zhipeng Message-Id: <20220921144515.1166-1-luzhip...@cestc.cn> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qcow2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2.c b/block/qc

[PULL 05/18] block: add missed block_acct_setup with new block device init procedure

2022-09-30 Thread Kevin Wolf
From: "Denis V. Lunev" Commit 5f76a7aac156ca75680dad5df4a385fd0b58f6b1 is looking harmless from the first glance, but it has changed things a lot. 'libvirt' uses it to detect that it should follow new initialization way and this changes things considerably. With this procedure followed, blockdev_

[PULL 12/18] block: move bdrv_qiov_is_aligned to file-posix

2022-09-30 Thread Kevin Wolf
From: Keith Busch There is only user of bdrv_qiov_is_aligned(), so move the alignment function to there and make it static. Signed-off-by: Keith Busch Message-Id: <20220929200523.3218710-2-kbu...@meta.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/block/block-io.h | 1 -

[PULL 17/18] tests/qtest/ide-test: Verify that DIAGNOSTIC clears DEV to zero

2022-09-30 Thread Kevin Wolf
From: Lev Kujawski Verify correction of EXECUTE DEVICE DIAGNOSTIC introduced in commit 72423831c3 (hw/ide/core: Clear LBA and drive bits for EXECUTE DEVICE DIAGNOSTIC, 2022-05-28). Signed-off-by: Lev Kujawski Message-Id: <20220707031140.158958-4-lku...@member.fsf.org> Signed-off-by: Kevin Wolf

[PULL 08/18] gluster: stop using .bdrv_needs_filename

2022-09-30 Thread Kevin Wolf
From: Stefan Hajnoczi The gluster protocol driver used to parse URIs (filenames) but was extended with a richer JSON syntax in commit 6c7189bb29de ("block/gluster: add support for multiple gluster servers"). The gluster drivers that have JSON parsing set .bdrv_needs_filename to false. The gluste

[PULL 06/18] block: use bdrv_is_sg() helper instead of raw bs->sg reading

2022-09-30 Thread Kevin Wolf
From: "Denis V. Lunev" I believe that if the helper exists, it must be used always for reading of the value. It breaks expectations in the other case. Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Hanna Reitz CC: Stefan Hajnoczi CC: Fam Zheng CC: Ronnie Sahlberg CC: Paolo Bonzini CC: P

[PULL 14/18] piix_ide_reset: Use pci_set_* functions instead of direct access

2022-09-30 Thread Kevin Wolf
From: Lev Kujawski Eliminate the remaining TODOs in hw/ide/piix.c by: * Using pci_set_{size} functions to write the PIIX PCI configuration space instead of manipulating it directly as an array; and * Documenting the default register values by reference to the controlling specification. Signe

[PULL 16/18] hw/ide/core: Clear LBA and drive bits for EXECUTE DEVICE DIAGNOSTIC

2022-09-30 Thread Kevin Wolf
From: Lev Kujawski Prior to this patch, cmd_exec_dev_diagnostic relied upon ide_set_signature to clear the device register. While the preservation of the drive bit by ide_set_signature is necessary for the DEVICE RESET, IDENTIFY DEVICE, and READ SECTOR commands, ATA/ATAPI-6 specifies that "DEV s

[PULL 09/18] block/qcow2: Keep auto_backing_file if possible

2022-09-30 Thread Kevin Wolf
From: Hanna Reitz qcow2_do_open() is used by qcow2_co_invalidate_cache(), i.e. may be run on an image that has been opened before. When reading the backing file string from the image header, compare it against the existing bs->backing_file, and update bs->auto_backing_file only if they differ.

[PULL 15/18] tests/qtest/ide-test.c: Create disk image for use as a secondary

2022-09-30 Thread Kevin Wolf
From: Lev Kujawski Change 'tmp_path' into an array of two members to accommodate another disk image of size TEST_IMAGE_SIZE. This facilitates testing ATA protocol aspects peculiar to secondary devices on the same controller. Signed-off-by: Lev Kujawski Message-Id: <20220707031140.158958-2-lku.

[PULL 10/18] block/qed: Keep auto_backing_file if possible

2022-09-30 Thread Kevin Wolf
From: Hanna Reitz Just like qcow2, qed invokes its open function in its .bdrv_co_invalidate_cache() implementation. Therefore, just like done for qcow2 in HEAD^, update auto_backing_file only if the backing file string in the image header differs from the one we have read before. Signed-off-by:

[PULL 13/18] block: use the request length for iov alignment

2022-09-30 Thread Kevin Wolf
From: Keith Busch An iov length needs to be aligned to the logical block size, which may be larger than the memory alignment. Tested-by: Jens Axboe Signed-off-by: Keith Busch Message-Id: <20220929200523.3218710-3-kbu...@meta.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/f

[PULL 11/18] iotests/backing-file-invalidation: Add new test

2022-09-30 Thread Kevin Wolf
From: Hanna Reitz Add a new test to see what happens when you migrate a VM with a backing chain that has json:{} backing file strings, which, when opened, will be resolved to plain filenames. Signed-off-by: Hanna Reitz Message-Id: <2022080316.20723-4-hre...@redhat.com> Reviewed-by: Kevin Wo

[PULL 18/18] hw/ide/core.c: Implement ATA INITIALIZE_DEVICE_PARAMETERS command

2022-09-30 Thread Kevin Wolf
From: Lev Kujawski CHS-based disk utilities and operating systems may adjust the logical geometry of a hard drive to cope with the expectations or limitations of software using the ATA INITIALIZE_DEVICE_PARAMETERS command. Prior to this patch, INITIALIZE_DEVICE_PARAMETERS was a nop that always r

Re: [PATCH v4 25/54] block/vvfat: Unify the mkdir() call

2022-09-30 Thread Bin Meng
Hi Kevin, On Tue, Sep 27, 2022 at 7:07 PM Bin Meng wrote: > > From: Bin Meng > > There is a difference in the mkdir() call for win32 and non-win32 > platforms, and currently is handled in the codes with #ifdefs. > > glib provides a portable g_mkdir() API and we can use it to unify > the codes wi