Re: [Qemu-block] [PATCH v9 02/31] block: Use children list in bdrv_refresh_filename

2018-07-23 Thread Ari Sundholm
On 07/22/2018 12:14 AM, Max Reitz wrote: On 2018-07-19 14:47, Ari Sundholm wrote: Hi! On 06/28/2018 03:07 AM, Max Reitz wrote: bdrv_refresh_filename() should invoke itself recursively on all children, not just on file. With that change, we can remove the manual invocations in blkverify, quoru

Re: [Qemu-block] [PATCH] block/file-posix: add bdrv_attach_aio_context callback for host dev and cdrom

2018-07-23 Thread Farhan Ali
On 07/20/2018 03:11 PM, Farhan Ali wrote: I am seeing another issue pop up, in a different test. Even though it's a different assertion, it might be related based on the call trace. Stack trace of thread 276199: #0  0x03ff8473e274 raise (libc.so.6) #1  0x03ff847239a8 abort (libc.so.6

Re: [Qemu-block] [Qemu-stable] [PATCH v4] block: fix QEMU crash with scsi-hd and drive_del

2018-07-23 Thread Kevin Wolf
Am 18.07.2018 um 23:07 hat Michael Roth geschrieben: > Quoting Kevin Wolf (2018-05-29 15:19:17) > > Am 28.05.2018 um 14:03 hat Greg Kurz geschrieben: > > > Removing a drive with drive_del while it is being used to run an I/O > > > intensive workload can cause QEMU to crash. > > > > > > An AIO flus

Re: [Qemu-block] [PATCH v2] iotests: remove LUKS support from test 226

2018-07-23 Thread Kevin Wolf
Am 13.07.2018 um 19:37 hat John Snow geschrieben: > This test doesn't actually care about the format anyway, it just > supports "all formats" as a convenience. LUKS however does not use a > simple image filename which confuses this iotest. > > We can simply skip the test for formats that use IMGOP

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-iotests: Use host_device instead of file in 149

2018-07-23 Thread Kevin Wolf
Am 13.07.2018 um 20:12 hat John Snow geschrieben: > > > On 07/13/2018 03:10 AM, Kevin Wolf wrote: > > The test case uses block devices with driver=file, which causes the test > > to fail after commit 230ff73904 added a deprecation warning for this. > > Fix the test case to use driver=host_device

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-iotests: Use host_device instead of file in 149

2018-07-23 Thread Daniel P . Berrangé
On Mon, Jul 23, 2018 at 03:53:45PM +0200, Kevin Wolf wrote: > Am 13.07.2018 um 20:12 hat John Snow geschrieben: > > > > > > On 07/13/2018 03:10 AM, Kevin Wolf wrote: > > > The test case uses block devices with driver=file, which causes the test > > > to fail after commit 230ff73904 added a deprec

Re: [Qemu-block] [Qemu-devel] [PATCH] iotest: Fix filtering order in 226

2018-07-23 Thread Kevin Wolf
Am 13.07.2018 um 22:14 hat John Snow geschrieben: > > > On 07/13/2018 03:41 PM, Max Reitz wrote: > > The test directory should be filtered before the image format, otherwise > > the test will fail if the image format is part of the test directory, > > like so: > > > > [...] > > -can't open: Coul

Re: [Qemu-block] [PATCH] iotests: Disallow compat=0.10 in 223

2018-07-23 Thread Kevin Wolf
Am 13.07.2018 um 21:15 hat Max Reitz geschrieben: > 223 tests persistent dirty bitmaps which are not supported in > compat=0.10, so that option is unsupported for this test. > > Signed-off-by: Max Reitz Thanks, applied to the block branch. Kevin

Re: [Qemu-block] [PATCH] block/vvfat: Disable debug message by default

2018-07-23 Thread Kevin Wolf
Am 18.07.2018 um 17:08 hat Thomas Huth geschrieben: > It's annoying to see this debug message every time you use vvfat. > Disable it with the DLOG() macro by default, as it is done with the > other debug messages in this file. > > Signed-off-by: Thomas Huth Thanks, applied to the block branch.

Re: [Qemu-block] [PATCH] block/vvfat: Fix crash when reporting error about too many files in directory

2018-07-23 Thread Kevin Wolf
Am 18.07.2018 um 17:28 hat Thomas Huth geschrieben: > When using the vvfat driver with a directory that contains too many files, > QEMU currently crashes. We are trying to print the wrong path variable here. > > Signed-off-by: Thomas Huth > --- > block/vvfat.c | 3 +-- > 1 file changed, 1 insert

Re: [Qemu-block] [PATCH] block: Don't lock /dev/null and /dev/zero automatically

2018-07-23 Thread Max Reitz
On 2018-07-23 03:56, Fam Zheng wrote: > On Sun, Jul 22, 2018 at 10:06 PM Max Reitz wrote: >> >> On 2018-07-22 04:37, Fam Zheng wrote: >>> On Sun, Jul 22, 2018 at 5:08 AM Max Reitz wrote: On 2018-07-19 05:41, Fam Zheng wrote: > On my Fedora 28, /dev/null is locked by some other proce

Re: [Qemu-block] [PATCH] block/file-posix: add bdrv_attach_aio_context callback for host dev and cdrom

2018-07-23 Thread Stefan Hajnoczi
On Wed, Jul 18, 2018 at 02:12:56PM -0700, Nishanth Aravamudan wrote: > In ed6e2161 ("linux-aio: properly bubble up errors from initialzation"), > I only added a bdrv_attach_aio_context callback for the bdrv_file > driver. There are several other drivers that use the shared > aio_plug callback, thou

Re: [Qemu-block] [PATCH] block/file-posix: add bdrv_attach_aio_context callback for host dev and cdrom

2018-07-23 Thread Stefan Hajnoczi
On Fri, Jul 20, 2018 at 03:11:14PM -0400, Farhan Ali wrote: > I am seeing another issue pop up, in a different test. Even though it's a > different assertion, it might be related based on the call trace. Which test case? > Stack trace of thread 276199: > #0 0x03ff8473e274 raise (libc.so.6) >

Re: [Qemu-block] [PATCH] block/file-posix: add bdrv_attach_aio_context callback for host dev and cdrom

2018-07-23 Thread Farhan Ali
On 07/23/2018 12:30 PM, Stefan Hajnoczi wrote: On Fri, Jul 20, 2018 at 03:11:14PM -0400, Farhan Ali wrote: I am seeing another issue pop up, in a different test. Even though it's a different assertion, it might be related based on the call trace. Which test case? This test case involved o

[Qemu-block] [PULL 2/7] block: Fix typos in comments (found by codespell)

2018-07-23 Thread Kevin Wolf
From: Stefan Weil Signed-off-by: Stefan Weil Reviewed-by: John Snow Reviewed-by: Jeff Cody Signed-off-by: Kevin Wolf --- block.c | 2 +- block/backup.c | 4 ++-- block/curl.c| 2 +- block/gluster.c | 2 +- block/vhdx.c| 2 +- 5 files changed, 6 insertions(+), 6 deletions(-)

[Qemu-block] [PULL 3/7] qemu-img: avoid overflow of min_sparse parameter

2018-07-23 Thread Kevin Wolf
From: Peter Lieven the min_sparse convert parameter can overflow (e.g. -S 1024G) in the conversion from int64_t to int resulting in a negative min_sparse parameter. Avoid this by limiting the valid parameters to sane values. In fact anything exceeding the convert buffer size is also pointless. Wh

[Qemu-block] [PULL 6/7] iotests: Disallow compat=0.10 in 223

2018-07-23 Thread Kevin Wolf
From: Max Reitz 223 tests persistent dirty bitmaps which are not supported in compat=0.10, so that option is unsupported for this test. Signed-off-by: Max Reitz Tested-by: John Snow Reviewed-by: John Snow Signed-off-by: Kevin Wolf --- tests/qemu-iotests/223 | 2 ++ 1 file changed, 2 inserti

[Qemu-block] [PULL 4/7] iotests: remove LUKS support from test 226

2018-07-23 Thread Kevin Wolf
From: John Snow This test doesn't actually care about the format anyway, it just supports "all formats" as a convenience. LUKS however does not use a simple image filename which confuses this iotest. We can simply skip the test for formats that use IMGOPTSSYNTAX for their filenames without missi

[Qemu-block] [PULL 0/7] Block layer patches

2018-07-23 Thread Kevin Wolf
The following changes since commit 55b1f14cefcb19ce6d5e28c4c83404230888aa7e: Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-3.0-pull-request' into staging (2018-07-23 14:03:14 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstrea

[Qemu-block] [PULL 5/7] iotest: Fix filtering order in 226

2018-07-23 Thread Kevin Wolf
From: Max Reitz The test directory should be filtered before the image format, otherwise the test will fail if the image format is part of the test directory, like so: [...] -can't open: Could not open 'TEST_DIR/t.IMGFMT': Is a directory +can't open: Could not open '/tmp/test-IMGFMT/t.IMGFMT': I

[Qemu-block] [PULL 1/7] qemu-iotests: Use host_device instead of file in 149

2018-07-23 Thread Kevin Wolf
The test case uses block devices with driver=file, which causes the test to fail after commit 230ff73904 added a deprecation warning for this. Fix the test case to use driver=host_device and update the reference output accordingly. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/149 | 2 +

[Qemu-block] [PULL 7/7] block/vvfat: Disable debug message by default

2018-07-23 Thread Kevin Wolf
From: Thomas Huth It's annoying to see this debug message every time you use vvfat. Disable it with the DLOG() macro by default, as it is done with the other debug messages in this file. Signed-off-by: Thomas Huth Reviewed-by: John Snow Signed-off-by: Kevin Wolf --- block/vvfat.c | 4 ++-- 1

Re: [Qemu-block] [PULL 0/7] Block layer patches

2018-07-23 Thread Peter Maydell
On 23 July 2018 at 17:45, Kevin Wolf wrote: > The following changes since commit 55b1f14cefcb19ce6d5e28c4c83404230888aa7e: > > Merge remote-tracking branch > 'remotes/vivier2/tags/linux-user-for-3.0-pull-request' into staging > (2018-07-23 14:03:14 +0100) > > are available in the git repositor

[Qemu-block] [PATCH for-3.0 5/7] dirty-bitmaps: clean-up bitmaps loading and migration logic

2018-07-23 Thread John Snow
This patch aims to bring the following behavior: 1. Bitmaps are not loaded on open if BDRV_O_INACTIVE is set, which occurs for incoming migration cases. We will load these persistent bitmaps on invalidate instead. 2. Regardless of the migration circumstances, persistent bitmaps are alway

[Qemu-block] [PATCH for-3.0 4/7] iotests: 169: actually test block migration

2018-07-23 Thread John Snow
Presently, we emulate a block migration by just using a different target file. Update the test to actually request a block migration. Signed-off-by: John Snow --- tests/qemu-iotests/169 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/169 b/tests/qemu-iotests/169 index d

[Qemu-block] [PATCH for-3.0 1/7] iotests: 169: drop deprecated 'autoload' parameter

2018-07-23 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Message-id: 20180626135035.133432-2-vsement...@virtuozzo.com Signed-off-by: John Snow --- tests/qemu-iotests/169 | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/qemu-iotests/169 b/te

[Qemu-block] [PATCH for-3.0 2/7] block/qcow2: improve error message in qcow2_inactivate

2018-07-23 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: John Snow --- block/qcow2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 6162ed8be2..7444133ccd 100644 --- a/block/qcow2.c +++ b/block/

[Qemu-block] [PATCH for-3.0 3/7] block/qcow2: drop dirty_bitmaps_loaded state variable

2018-07-23 Thread John Snow
From: Vladimir Sementsov-Ogievskiy This variable doesn't work as it should, because it is actually cleared in qcow2_co_invalidate_cache() by memset(). Drop it, as the following patch will introduce new behavior. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Signed-off-by:

[Qemu-block] [PATCH for-3.0 6/7] iotests: improve 169

2018-07-23 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Before previous patch, iotest 169 was actually broken for the case test_persistent__not_migbitmap__offline_shared, while formally passing. After migration log of vm_b had message: qemu-system-x86_64: Could not reopen qcow2 layer: Bitmap already exists:

[Qemu-block] [PATCH for-3.0 0/7] fix persistent bitmaps migration logic

2018-07-23 Thread John Snow
This is an updated version of Vladimir's proposal for fixing the handling around migration and persistent dirty bitmaps. Patches 1, 4, 6, and 7 update the testing for this feature. Patch 2 touches up an error message. Patch 3 removes dead code. Patch 5 contains the real fix. v2: - Add a new patc

[Qemu-block] [PATCH for-3.0 7/7] iotests: 169: add cases for source vm resuming

2018-07-23 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Test that we can resume source vm after [failed] migration, and bitmaps are ok. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: John Snow --- tests/qemu-iotests/169 | 59 +- tests/qemu-iotests/169.ou

Re: [Qemu-block] [PATCH] block: Don't lock /dev/null and /dev/zero automatically

2018-07-23 Thread Fam Zheng
On Mon, Jul 23, 2018 at 10:37 PM Max Reitz wrote: > > On 2018-07-23 03:56, Fam Zheng wrote: > > On Sun, Jul 22, 2018 at 10:06 PM Max Reitz wrote: > >> > >> On 2018-07-22 04:37, Fam Zheng wrote: > >>> On Sun, Jul 22, 2018 at 5:08 AM Max Reitz wrote: > > On 2018-07-19 05:41, Fam Zheng wr