* [Qemu-devel] [PULL 00/11] Block patches
@ 2010-05-07 15:13 Kevin Wolf
0 siblings, 0 replies; 40+ messages in thread
From: Kevin Wolf @ 2010-05-07 15:13 UTC (permalink / raw)
To: aliguori; +Cc: kwolf, qemu-devel
The following changes since commit 2065061ede22d401aae2ce995c3af54db9d28639:
Igor V. Kovalenko (1):
sparc64: handle asi referencing nucleus and secondary MMU contexts
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git for-anthony
Christoph Hellwig (4):
cloop: use pread
cloop: use qemu block API
bochs: use pread
bochs: use qemu block API
Kevin Wolf (4):
ide: Fix ide_dma_cancel
block: Avoid unchecked casts for AIOCBs
block: Fix protocol detection for Windows devices
block: Fix bdrv_commit
Ryota Ozaki (1):
qemu-nbd: Improve error reporting
Stefan Hajnoczi (1):
block: Remove semicolon in BDRV_SECTOR_MASK macro
Stefan Weil (1):
block/vdi: Allow disk images of size 0
block.c | 19 +++++++-----
block.h | 2 +-
block/blkdebug.c | 4 +-
block/bochs.c | 81 +++++++++++++++--------------------------------------
block/cloop.c | 48 ++++++++++++++++----------------
block/qcow.c | 2 +-
block/qcow2.c | 2 +-
block/vdi.c | 11 +++++--
hw/ide/core.c | 8 ++--
qemu-nbd.c | 34 ++++++++++++++++------
10 files changed, 99 insertions(+), 112 deletions(-)
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 00/11] Block patches
@ 2010-10-22 13:43 Kevin Wolf
0 siblings, 0 replies; 40+ messages in thread
From: Kevin Wolf @ 2010-10-22 13:43 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
The following changes since commit d03703c81a202cea156811e5dbc8e88627c19986:
curses: Fix control-{@[\]^_} and ESC (2010-10-21 18:31:28 +0200)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git for-anthony
Christoph Hellwig (1):
ide: set WCACHE supported in IDENTIFY data
Kevin Wolf (7):
qcow2: Simplify image creation
qcow2: Remove old image creation function
qemu-io: New command map
qemu-img: Fix qemu-img convert -obacking_file
ide: Factor ide_flush_cache out
ide: Handle flush failure
virtio-blk: Respect werror option for flushes
Stefan Hajnoczi (1):
qcow2: Support exact L1 table growth
Stefan Weil (1):
block: Use GCC_FMT_ATTR and fix a format error
edison (1):
Copy snapshots out of QCOW2 disk
block.c | 16 +++
block.h | 2 +
block/blkverify.c | 5 +-
block/qcow2-cluster.c | 25 +++--
block/qcow2-snapshot.c | 33 ++++++-
block/qcow2.c | 278 ++++++++++++++++--------------------------------
block/qcow2.h | 3 +-
block_int.h | 2 +
hw/ide/core.c | 28 ++++--
hw/ide/internal.h | 3 +-
hw/virtio-blk.c | 8 ++-
qemu-img-cmds.hx | 4 +-
qemu-img.c | 26 +++++-
qemu-img.texi | 4 +-
qemu-io.c | 39 +++++++
15 files changed, 264 insertions(+), 212 deletions(-)
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 00/11] Block patches
@ 2011-04-27 13:42 Kevin Wolf
2011-04-27 14:26 ` Aurelien Jarno
0 siblings, 1 reply; 40+ messages in thread
From: Kevin Wolf @ 2011-04-27 13:42 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
The following changes since commit 430a3c18064fd3c007048d757e8bd0fff45fcc99:
configure: reenable opengl by default (2011-04-26 23:26:49 +0200)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git for-anthony
Amit Shah (1):
atapi: Add 'medium ready' to 'medium not ready' transition on cd change
Anthony Liguori (1):
qemu-img: allow rebase to a NULL backing file when unsafe
Avishay Traeger (1):
Improve accuracy of block migration bandwidth calculation
Jes Sorensen (2):
Add dd-style SIGUSR1 progress reporting
Remove obsolete 'enabled' variable from progress state
Kevin Wolf (5):
ide: Split atapi.c out
ide/atapi: Factor commands out
ide/atapi: Use table instead of switch for commands
ide/atapi: Replace bdrv_get_geometry calls by s->nb_sectors
ide/atapi: Introduce CHECK_READY flag for commands
Stefan Hajnoczi (1):
qed: Fix consistency check on 32-bit hosts
Makefile.objs | 2 +-
block-migration.c | 23 +-
block/qed-check.c | 4 +-
block/qed.h | 2 +-
hw/ide/atapi.c | 1134 +++++++++++++++++++++++++++++++++++++++++++++++++++++
hw/ide/core.c | 1067 +-------------------------------------------------
hw/ide/internal.h | 14 +-
qemu-img.c | 2 +-
qemu-progress.c | 61 +++-
9 files changed, 1221 insertions(+), 1088 deletions(-)
create mode 100644 hw/ide/atapi.c
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [Qemu-devel] [PULL 00/11] Block patches
2011-04-27 13:42 Kevin Wolf
@ 2011-04-27 14:26 ` Aurelien Jarno
0 siblings, 0 replies; 40+ messages in thread
From: Aurelien Jarno @ 2011-04-27 14:26 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel
On Wed, Apr 27, 2011 at 03:42:59PM +0200, Kevin Wolf wrote:
> The following changes since commit 430a3c18064fd3c007048d757e8bd0fff45fcc99:
>
> configure: reenable opengl by default (2011-04-26 23:26:49 +0200)
>
> are available in the git repository at:
> git://repo.or.cz/qemu/kevin.git for-anthony
>
> Amit Shah (1):
> atapi: Add 'medium ready' to 'medium not ready' transition on cd change
>
> Anthony Liguori (1):
> qemu-img: allow rebase to a NULL backing file when unsafe
>
> Avishay Traeger (1):
> Improve accuracy of block migration bandwidth calculation
>
> Jes Sorensen (2):
> Add dd-style SIGUSR1 progress reporting
> Remove obsolete 'enabled' variable from progress state
>
> Kevin Wolf (5):
> ide: Split atapi.c out
> ide/atapi: Factor commands out
> ide/atapi: Use table instead of switch for commands
> ide/atapi: Replace bdrv_get_geometry calls by s->nb_sectors
> ide/atapi: Introduce CHECK_READY flag for commands
>
> Stefan Hajnoczi (1):
> qed: Fix consistency check on 32-bit hosts
>
> Makefile.objs | 2 +-
> block-migration.c | 23 +-
> block/qed-check.c | 4 +-
> block/qed.h | 2 +-
> hw/ide/atapi.c | 1134 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> hw/ide/core.c | 1067 +-------------------------------------------------
> hw/ide/internal.h | 14 +-
> qemu-img.c | 2 +-
> qemu-progress.c | 61 +++-
> 9 files changed, 1221 insertions(+), 1088 deletions(-)
> create mode 100644 hw/ide/atapi.c
>
Thanks, pulled.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 00/11] Block patches
@ 2012-08-10 16:47 Kevin Wolf
2012-08-12 18:14 ` Anthony Liguori
0 siblings, 1 reply; 40+ messages in thread
From: Kevin Wolf @ 2012-08-10 16:47 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
The following changes since commit 3d1d9652978ac5a32a0beb4bdf6065ca39440d89:
handle device help before accelerator set up (2012-08-09 19:53:01 +0000)
are available in the git repository at:
http://repo.or.cz/r/qemu/kevin.git for-anthony
Avi Kivity (1):
virtio-blk: fix use-after-free while handling scsi commands
Jason Baron (2):
ahci: Fix ahci cdrom read corruptions for reads > 128k
ahci: Fix sglist memleak in ahci_dma_rw_buf()
Kevin Wolf (1):
qemu-iotests: Save some sed processes
Paolo Bonzini (3):
virtio-blk: support VIRTIO_BLK_F_CONFIG_WCE
virtio-blk: disable write cache if not negotiated
blockdev: flip default cache mode from writethrough to writeback
Stefan Hajnoczi (4):
qed: mark image clean after repair succeeds
qcow2: mark image clean after repair succeeds
block: add BLOCK_O_CHECK for qemu-img check
qemu-iotests: skip 039 with ./check -nocache
block.h | 1 +
block/qcow2.c | 32 ++++++++++++++++--------------
block/qed-check.c | 26 ++++++++++++++++++++++++
block/qed.c | 11 +--------
block/qed.h | 5 ++++
blockdev.c | 1 +
dma-helpers.c | 1 +
hw/ide/ahci.c | 44 +++++++++++++++++++++++++++++++++++------
hw/ide/internal.h | 1 +
hw/virtio-blk.c | 31 +++++++++++++++++++++++++++-
hw/virtio-blk.h | 4 ++-
qemu-img.c | 2 +-
tests/qemu-iotests/039 | 1 +
tests/qemu-iotests/039.out | 6 +++++
tests/qemu-iotests/common.rc | 34 ++++++++++++++++++++++---------
15 files changed, 155 insertions(+), 45 deletions(-)
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [Qemu-devel] [PULL 00/11] Block patches
2012-08-10 16:47 Kevin Wolf
@ 2012-08-12 18:14 ` Anthony Liguori
0 siblings, 0 replies; 40+ messages in thread
From: Anthony Liguori @ 2012-08-12 18:14 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel
Kevin Wolf <kwolf@redhat.com> writes:
> The following changes since commit 3d1d9652978ac5a32a0beb4bdf6065ca39440d89:
>
> handle device help before accelerator set up (2012-08-09 19:53:01 +0000)
>
> are available in the git repository at:
> http://repo.or.cz/r/qemu/kevin.git for-anthony
Pulled. Thanks.
Regards,
Anthony Liguori
>
> Avi Kivity (1):
> virtio-blk: fix use-after-free while handling scsi commands
>
> Jason Baron (2):
> ahci: Fix ahci cdrom read corruptions for reads > 128k
> ahci: Fix sglist memleak in ahci_dma_rw_buf()
>
> Kevin Wolf (1):
> qemu-iotests: Save some sed processes
>
> Paolo Bonzini (3):
> virtio-blk: support VIRTIO_BLK_F_CONFIG_WCE
> virtio-blk: disable write cache if not negotiated
> blockdev: flip default cache mode from writethrough to writeback
>
> Stefan Hajnoczi (4):
> qed: mark image clean after repair succeeds
> qcow2: mark image clean after repair succeeds
> block: add BLOCK_O_CHECK for qemu-img check
> qemu-iotests: skip 039 with ./check -nocache
>
> block.h | 1 +
> block/qcow2.c | 32 ++++++++++++++++--------------
> block/qed-check.c | 26 ++++++++++++++++++++++++
> block/qed.c | 11 +--------
> block/qed.h | 5 ++++
> blockdev.c | 1 +
> dma-helpers.c | 1 +
> hw/ide/ahci.c | 44 +++++++++++++++++++++++++++++++++++------
> hw/ide/internal.h | 1 +
> hw/virtio-blk.c | 31 +++++++++++++++++++++++++++-
> hw/virtio-blk.h | 4 ++-
> qemu-img.c | 2 +-
> tests/qemu-iotests/039 | 1 +
> tests/qemu-iotests/039.out | 6 +++++
> tests/qemu-iotests/common.rc | 34 ++++++++++++++++++++++---------
> 15 files changed, 155 insertions(+), 45 deletions(-)
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 00/11] Block patches
@ 2012-09-14 12:39 Kevin Wolf
2012-09-17 18:19 ` Anthony Liguori
2012-09-18 17:49 ` Michael Tokarev
0 siblings, 2 replies; 40+ messages in thread
From: Kevin Wolf @ 2012-09-14 12:39 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
The following changes since commit e0a1e32dbc41e6b2aabb436a9417dfd32177a3dc:
Merge branch 'usb.64' of git://git.kraxel.org/qemu (2012-09-11 18:06:56 +0200)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git for-anthony
Benoît Canet (2):
qapi: Add SnapshotInfo and ImageInfo.
qemu-img: Add json output option to the info command.
Daniel P. Berrange (1):
Don't require encryption password for 'qemu-img info' command
Dunrong Huang (1):
block: Don't forget to delete temporary file
Jason Baron (1):
ahci: properly reset PxCMD on HBA reset
MORITA Kazutaka (1):
sheepdog: fix savevm and loadvm
Pavel Hrdina (1):
block: fix block tray status
Ronnie Sahlberg (1):
ATAPI: STARTSTOPUNIT only eject/load media if powercondition is 0
Stefan Weil (3):
ide: Fix error messages from static code analysis (no real error)
block/curl: Fix wrong free statement
vdi: Fix warning from clang
Makefile | 3 +-
block.c | 10 ++-
block/curl.c | 3 +-
block/sheepdog.c | 3 +-
block/vdi.c | 25 +++---
hw/ide/ahci.c | 2 +-
hw/ide/atapi.c | 6 ++
hw/ide/core.c | 11 +--
qapi-schema.json | 64 ++++++++++++++
qemu-img-cmds.hx | 4 +-
qemu-img.c | 257 ++++++++++++++++++++++++++++++++++++++++++-----------
qemu-img.texi | 5 +-
12 files changed, 305 insertions(+), 88 deletions(-)
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [Qemu-devel] [PULL 00/11] Block patches
2012-09-14 12:39 Kevin Wolf
@ 2012-09-17 18:19 ` Anthony Liguori
2012-09-18 17:49 ` Michael Tokarev
1 sibling, 0 replies; 40+ messages in thread
From: Anthony Liguori @ 2012-09-17 18:19 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel
Kevin Wolf <kwolf@redhat.com> writes:
> The following changes since commit e0a1e32dbc41e6b2aabb436a9417dfd32177a3dc:
>
> Merge branch 'usb.64' of git://git.kraxel.org/qemu (2012-09-11 18:06:56 +0200)
>
> are available in the git repository at:
>
> git://repo.or.cz/qemu/kevin.git for-anthony
>
Pulled. Thanks.
Regards,
Anthony Liguori
> Benoît Canet (2):
> qapi: Add SnapshotInfo and ImageInfo.
> qemu-img: Add json output option to the info command.
>
> Daniel P. Berrange (1):
> Don't require encryption password for 'qemu-img info' command
>
> Dunrong Huang (1):
> block: Don't forget to delete temporary file
>
> Jason Baron (1):
> ahci: properly reset PxCMD on HBA reset
>
> MORITA Kazutaka (1):
> sheepdog: fix savevm and loadvm
>
> Pavel Hrdina (1):
> block: fix block tray status
>
> Ronnie Sahlberg (1):
> ATAPI: STARTSTOPUNIT only eject/load media if powercondition is 0
>
> Stefan Weil (3):
> ide: Fix error messages from static code analysis (no real error)
> block/curl: Fix wrong free statement
> vdi: Fix warning from clang
>
> Makefile | 3 +-
> block.c | 10 ++-
> block/curl.c | 3 +-
> block/sheepdog.c | 3 +-
> block/vdi.c | 25 +++---
> hw/ide/ahci.c | 2 +-
> hw/ide/atapi.c | 6 ++
> hw/ide/core.c | 11 +--
> qapi-schema.json | 64 ++++++++++++++
> qemu-img-cmds.hx | 4 +-
> qemu-img.c | 257 ++++++++++++++++++++++++++++++++++++++++++-----------
> qemu-img.texi | 5 +-
> 12 files changed, 305 insertions(+), 88 deletions(-)
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [Qemu-devel] [PULL 00/11] Block patches
2012-09-14 12:39 Kevin Wolf
2012-09-17 18:19 ` Anthony Liguori
@ 2012-09-18 17:49 ` Michael Tokarev
2012-09-19 8:42 ` Kevin Wolf
1 sibling, 1 reply; 40+ messages in thread
From: Michael Tokarev @ 2012-09-18 17:49 UTC (permalink / raw)
To: Kevin Wolf; +Cc: Jason Baron, qemu-devel, Ronnie Sahlberg, qemu-stable
On 14.09.2012 16:39, Kevin Wolf wrote:
> The following changes since commit e0a1e32dbc41e6b2aabb436a9417dfd32177a3dc:
>
> Merge branch 'usb.64' of git://git.kraxel.org/qemu (2012-09-11 18:06:56 +0200)
>
> are available in the git repository at:
>
> git://repo.or.cz/qemu/kevin.git for-anthony
Are any of these appropriate for -stable? I think some are, below:
> Benoît Canet (2):
> qapi: Add SnapshotInfo and ImageInfo.
> qemu-img: Add json output option to the info command.
>
> Daniel P. Berrange (1):
> Don't require encryption password for 'qemu-img info' command
>
> Dunrong Huang (1):
> block: Don't forget to delete temporary file
This? Appears to be a minor case.
> Jason Baron (1):
> ahci: properly reset PxCMD on HBA reset
Most likely this. Jason?
> MORITA Kazutaka (1):
> sheepdog: fix savevm and loadvm
This, but does anyone really use sheepdog with savevm/loadvm?
Probably a very minor issue too, not worth -stable.
> Pavel Hrdina (1):
> block: fix block tray status
And this,
> Ronnie Sahlberg (1):
> ATAPI: STARTSTOPUNIT only eject/load media if powercondition is 0
And probably this too? I'm not sure about this one.
Ronnie?
> Stefan Weil (3):
> ide: Fix error messages from static code analysis (no real error)
> block/curl: Fix wrong free statement
> vdi: Fix warning from clang
Thanks,
/mjt
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [Qemu-devel] [PULL 00/11] Block patches
2012-09-18 17:49 ` Michael Tokarev
@ 2012-09-19 8:42 ` Kevin Wolf
0 siblings, 0 replies; 40+ messages in thread
From: Kevin Wolf @ 2012-09-19 8:42 UTC (permalink / raw)
To: Michael Tokarev; +Cc: Jason Baron, qemu-devel, Ronnie Sahlberg, qemu-stable
Am 18.09.2012 19:49, schrieb Michael Tokarev:
> On 14.09.2012 16:39, Kevin Wolf wrote:
>> The following changes since commit e0a1e32dbc41e6b2aabb436a9417dfd32177a3dc:
>>
>> Merge branch 'usb.64' of git://git.kraxel.org/qemu (2012-09-11 18:06:56 +0200)
>>
>> are available in the git repository at:
>>
>> git://repo.or.cz/qemu/kevin.git for-anthony
>
> Are any of these appropriate for -stable? I think some are, below:
I think all of your suggestions would be appropriate, even though most
of them fix rather theoretical cases.
>> Jason Baron (1):
>> ahci: properly reset PxCMD on HBA reset
>
> Most likely this. Jason?
Yes, this fixes a real visible bug with AHCI CD-ROMs.
Kevin
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 00/11] Block patches
@ 2013-04-15 8:22 Stefan Hajnoczi
0 siblings, 0 replies; 40+ messages in thread
From: Stefan Hajnoczi @ 2013-04-15 8:22 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori
The following changes since commit e2ec3f976803b360c70d9ae2ba13852fa5d11665:
qjson: to_json() case QTYPE_QSTRING is buggy, rewrite (2013-04-13 19:40:25 +0000)
are available in the git repository at:
git://github.com/stefanha/qemu.git block
for you to fetch changes up to dc7588c1eb3008bda53dde1d6b890cd299758155:
rbd: add an asynchronous flush (2013-04-15 10:18:05 +0200)
----------------------------------------------------------------
Josh Durgin (1):
rbd: add an asynchronous flush
Kevin Wolf (5):
block: Introduce bdrv_writev_vmstate
savevm: Implement block_writev_buffer()
block: Introduce bdrv_pwritev() for qcow2_save_vmstate
qemu-iotests: A few more bdrv_pread/pwrite tests
qemu-iotests: Add test for -drive options
Richard W.M. Jones (3):
block: Add support for Secure Shell (ssh) block device.
block: ssh: Use libssh2_sftp_fsync (if supported by libssh2) to flush to disk.
iotests: Add 'check -ssh' option to test Secure Shell block device.
Stefan Hajnoczi (2):
qemu-iotests: filter QEMU_PROG in 051.out
ide: refuse WIN_READ_NATIVE_MAX on empty device
block.c | 105 +++-
block/Makefile.objs | 1 +
block/qcow2.c | 6 +-
block/rbd.c | 37 +-
block/sheepdog.c | 13 +-
block/ssh.c | 1063 ++++++++++++++++++++++++++++++++++++++
configure | 73 +++
hw/ide/core.c | 4 +
include/block/block.h | 3 +
include/block/block_int.h | 4 +-
include/migration/qemu-file.h | 2 +-
qemu-doc.texi | 54 ++
qemu-options.hx | 12 +
savevm.c | 25 +-
tests/qemu-iotests/002 | 13 +
tests/qemu-iotests/002.out | 26 +
tests/qemu-iotests/051 | 148 ++++++
tests/qemu-iotests/051.out | 162 ++++++
tests/qemu-iotests/common | 5 +
tests/qemu-iotests/common.filter | 6 +
tests/qemu-iotests/common.rc | 3 +
tests/qemu-iotests/group | 1 +
22 files changed, 1722 insertions(+), 44 deletions(-)
create mode 100644 block/ssh.c
create mode 100755 tests/qemu-iotests/051
create mode 100644 tests/qemu-iotests/051.out
--
1.8.1.4
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 00/11] Block patches
@ 2013-04-26 11:44 Stefan Hajnoczi
0 siblings, 0 replies; 40+ messages in thread
From: Stefan Hajnoczi @ 2013-04-26 11:44 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Stefan Hajnoczi
The following changes since commit e3351000cd682200835763caca87adf708ed1c65:
Makefile: Use QEMU_FLAGS for DTC compilation (2013-04-26 02:48:10 +0200)
are available in the git repository at:
git://github.com/stefanha/qemu.git block
for you to fetch changes up to 859e5553a428225de6b8ef302cdcfd68d140b926:
sheepdog: fix loadvm operation (2013-04-26 13:37:51 +0200)
----------------------------------------------------------------
Kevin Wolf (2):
block: Disable driver-specific options for 1.5
rbd: Fix use after free in rbd_open()
Liu Yuan (4):
sheepdog: add discard/trim support for sheepdog
sheepdog: use BDRV_SECTOR_SIZE
sheepdog: implement .bdrv_co_is_allocated()
sheepdog: fix loadvm operation
MORITA Kazutaka (4):
sheepdog: cleanup find_vdi_name
sheepdog: add SD_RES_READONLY result code
sheepdog: add helper function to reload inode
sheepdog: resend write requests when SD_RES_READONLY is received
Richard W.M. Jones (1):
block/ssh: Require libssh2 >= 1.2.8.
block/rbd.c | 9 +-
block/sheepdog.c | 308 ++++++++++++++++++++++++++++++++++++++++-------
blockdev.c | 118 +++++++++++++++++-
configure | 24 +---
tests/qemu-iotests/group | 2 +-
5 files changed, 390 insertions(+), 71 deletions(-)
--
1.8.1.4
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 00/11] Block patches
@ 2013-05-24 14:32 Stefan Hajnoczi
2013-06-17 21:18 ` Anthony Liguori
0 siblings, 1 reply; 40+ messages in thread
From: Stefan Hajnoczi @ 2013-05-24 14:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Stefan Hajnoczi
The following changes since commit 64afc2b4d48fb21e085517c38a59a3f61a11283c:
Merge remote-tracking branch 'luiz/queue/qmp' into staging (2013-05-23 14:16:35 -0500)
are available in the git repository at:
git://github.com/stefanha/qemu.git block
for you to fetch changes up to 02ffb504485f0920cfc75a0982a602f824a9a4f4:
coroutine: stop using AioContext in CoQueue (2013-05-24 16:17:56 +0200)
----------------------------------------------------------------
Kevin Wolf (4):
blockdev: Rename BlockdevAction -> TransactionAction
qemu-io: Fix 'map' output
qcow2.py: Subcommand for changing header fields
qemu-iotests: Try creating huge qcow2 image
Stefan Hajnoczi (2):
coroutine: protect global pool with a mutex
coroutine: stop using AioContext in CoQueue
Wenchao Xia (5):
block: package preparation code in qmp_transaction()
block: move input parsing code in qmp_transaction()
block: package committing code in qmp_transaction()
block: package rollback code in qmp_transaction()
block: make all steps in qmp_transaction() as callback
blockdev.c | 280 ++++++++++++++++++++++++++----------------
include/block/coroutine_int.h | 4 +
qapi-schema.json | 21 ++--
qemu-coroutine-lock.c | 56 ++++-----
qemu-coroutine.c | 23 +++-
qemu-io.c | 46 ++++++-
tests/qemu-iotests/054 | 58 +++++++++
tests/qemu-iotests/054.out | 10 ++
tests/qemu-iotests/common.rc | 2 +-
tests/qemu-iotests/group | 1 +
tests/qemu-iotests/qcow2.py | 17 +++
trace-events | 2 +-
12 files changed, 361 insertions(+), 159 deletions(-)
create mode 100755 tests/qemu-iotests/054
create mode 100644 tests/qemu-iotests/054.out
--
1.8.1.4
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [Qemu-devel] [PULL 00/11] Block patches
2013-05-24 14:32 Stefan Hajnoczi
@ 2013-06-17 21:18 ` Anthony Liguori
0 siblings, 0 replies; 40+ messages in thread
From: Anthony Liguori @ 2013-06-17 21:18 UTC (permalink / raw)
To: Stefan Hajnoczi, qemu-devel; +Cc: Anthony Liguori
Pulled. Thanks.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 00/11] Block patches
@ 2013-09-20 17:42 Stefan Hajnoczi
0 siblings, 0 replies; 40+ messages in thread
From: Stefan Hajnoczi @ 2013-09-20 17:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Hajnoczi, Anthony Liguori
The following changes since commit 6c2679fc19560699679200fb42ab4659bcbe7f79:
Merge remote-tracking branch 'kiszka/queues/slirp' into staging (2013-09-17 10:01:24 -0500)
are available in the git repository at:
git://github.com/stefanha/qemu.git block
for you to fetch changes up to ef5bc96268ceec64769617dc53b0ac3a20ff351c:
virtio-blk: do not relay a previous driver's WCE configuration to the current (2013-09-20 19:27:48 +0200)
----------------------------------------------------------------
Fam Zheng (1):
block: don't lose data from last incomplete sector
Gabriel Kerneis (2):
coroutine: add qemu_coroutine_yield benchmark
coroutine: fix /perf/nesting coroutine benchmark
Max Reitz (1):
qcow2: Correct snapshots size for overlap check
Paolo Bonzini (3):
qemu-timer: do not take the lock in timer_pending
blockdev: do not default cache.no-flush to true
virtio-blk: do not relay a previous driver's WCE configuration to the current
Stefan Hajnoczi (4):
libcacard: link against qemu-error.o for error_report()
osdep: warn if open(O_DIRECT) on fails with EINVAL
qemu-timer: drop outdated signal safety comments
qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe
block.c | 2 +-
block/qcow2-snapshot.c | 2 +-
blockdev.c | 2 +-
hw/block/virtio-blk.c | 24 ++++++++++-
include/hw/virtio/virtio-blk.h | 1 +
include/qemu/timer.h | 17 ++++++++
libcacard/Makefile | 3 +-
qemu-timer.c | 92 +++++++++++++++++++++++++++++-------------
tests/test-coroutine.c | 45 ++++++++++++++++++---
util/osdep.c | 7 ++++
10 files changed, 155 insertions(+), 40 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 00/11] Block patches
@ 2014-02-14 17:29 Stefan Hajnoczi
2014-02-15 16:37 ` Peter Maydell
0 siblings, 1 reply; 40+ messages in thread
From: Stefan Hajnoczi @ 2014-02-14 17:29 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Anthony Liguori
The following changes since commit 0888a29caac6e1b668e498a0ad4d1fea15de012b:
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2014-02-13 15:02:04 +0000)
are available in the git repository at:
git://github.com/stefanha/qemu.git tags/block-pull-request
for you to fetch changes up to 0c5e94ee8339e1aa49020466eba232e6f7c31a0a:
block: Open by reference will try device then node_name. (2014-02-14 18:05:39 +0100)
----------------------------------------------------------------
Block pull request
----------------------------------------------------------------
Benoît Canet (3):
blockdev: Fix wrong usage of QDECREF causing snapshoted quorum to crash on close.
block: Relax bdrv_lookup_bs constraints.
block: Open by reference will try device then node_name.
Fam Zheng (1):
qemu-iotests: Don't run 005 on vmdk split formats
Jeff Cody (5):
block: Add notes to iSCSI's .bdrv_open and .bdrv_reopen_prepare
block: Don't throw away errno via error_setg
block: qemu-iotests - fix test 070 (vhdx)
block: qemu-iotests - add vhdx log replay tests for qemu-img
block: mirror - use local_err to avoid NULL errp
Kevin Wolf (2):
sdhci: Drop unnecessary #include
blockdev: Remove 'type' parameter from blockdev_init()
block.c | 36 ++++++++++++++++--------------
block/iscsi.c | 10 +++++++--
block/mirror.c | 19 +++++++++++-----
block/qcow2-snapshot.c | 8 ++++---
block/vmdk.c | 6 ++---
blockdev.c | 55 ++++++++++++++++++++++++++++++++--------------
hw/sd/sdhci.c | 1 -
tests/qemu-iotests/005 | 2 ++
tests/qemu-iotests/070 | 13 ++++++++++-
tests/qemu-iotests/070.out | 15 ++++++++++++-
10 files changed, 115 insertions(+), 50 deletions(-)
--
1.8.5.3
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [Qemu-devel] [PULL 00/11] Block patches
2014-02-14 17:29 Stefan Hajnoczi
@ 2014-02-15 16:37 ` Peter Maydell
0 siblings, 0 replies; 40+ messages in thread
From: Peter Maydell @ 2014-02-15 16:37 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: QEMU Developers, Anthony Liguori
On 14 February 2014 17:29, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> The following changes since commit 0888a29caac6e1b668e498a0ad4d1fea15de012b:
>
> Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2014-02-13 15:02:04 +0000)
>
> are available in the git repository at:
>
>
> git://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to 0c5e94ee8339e1aa49020466eba232e6f7c31a0a:
>
> block: Open by reference will try device then node_name. (2014-02-14 18:05:39 +0100)
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 00/11] Block patches
@ 2014-09-26 18:58 Kevin Wolf
2014-09-29 13:03 ` Peter Maydell
0 siblings, 1 reply; 40+ messages in thread
From: Kevin Wolf @ 2014-09-26 18:58 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
The following changes since commit 4f2280b2190e39aa6761cc8188626ed9aad350c1:
Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into staging (2014-09-24 13:45:13 +0100)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git tags/for-upstream
for you to fetch changes up to c9d17ad0dd3f04cdef44d58db97ea9864fbcdee7:
qemu-iotests: Fail test if explicit test case number is unknown (2014-09-25 15:25:20 +0200)
----------------------------------------------------------------
Block patches
----------------------------------------------------------------
Fam Zheng (1):
qemu-iotests: Fail test if explicit test case number is unknown
Kevin Wolf (3):
block: Specify -drive legacy option aliases in array
block: Catch simultaneous usage of options and their aliases
block: Validate node-name
Markus Armbruster (4):
blockdev: Disentangle BlockDriverState and DriveInfo creation
block: Keep DriveInfo alive until BlockDriverState dies
qemu-nbd: Destroy the BlockDriverState properly
block: Improve message for device name clashing with node name
Stefan Hajnoczi (3):
blkdebug: show an error for invalid event names
docs: add blkdebug block driver documentation
vpc: fix beX_to_cpu() and cpu_to_beX() confusion
block.c | 21 ++++--
block/blkdebug.c | 22 ++++++-
block/vpc.c | 44 ++++++-------
blockdev.c | 103 ++++++++++++++++++-----------
docs/blkdebug.txt | 161 +++++++++++++++++++++++++++++++++++++++++++++
include/qemu/option.h | 1 +
include/sysemu/blockdev.h | 1 +
qemu-img.c | 6 +-
qemu-nbd.c | 2 +-
stubs/Makefile.objs | 1 +
stubs/blockdev.c | 12 ++++
tests/qemu-iotests/051 | 23 +++++++
tests/qemu-iotests/051.out | 45 +++++++++++++
tests/qemu-iotests/087.out | 2 +-
tests/qemu-iotests/common | 10 ++-
util/qemu-option.c | 4 +-
16 files changed, 382 insertions(+), 76 deletions(-)
create mode 100644 docs/blkdebug.txt
create mode 100644 stubs/blockdev.c
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [Qemu-devel] [PULL 00/11] Block patches
2014-09-26 18:58 Kevin Wolf
@ 2014-09-29 13:03 ` Peter Maydell
0 siblings, 0 replies; 40+ messages in thread
From: Peter Maydell @ 2014-09-29 13:03 UTC (permalink / raw)
To: Kevin Wolf; +Cc: QEMU Developers
On 26 September 2014 19:58, Kevin Wolf <kwolf@redhat.com> wrote:
> The following changes since commit 4f2280b2190e39aa6761cc8188626ed9aad350c1:
>
> Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into staging (2014-09-24 13:45:13 +0100)
>
> are available in the git repository at:
>
>
> git://repo.or.cz/qemu/kevin.git tags/for-upstream
>
> for you to fetch changes up to c9d17ad0dd3f04cdef44d58db97ea9864fbcdee7:
>
> qemu-iotests: Fail test if explicit test case number is unknown (2014-09-25 15:25:20 +0200)
>
> ----------------------------------------------------------------
> Block patches
>
> ----------------------------------------------------------------
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 00/11] Block patches
@ 2017-01-16 13:39 Stefan Hajnoczi
2017-01-17 13:53 ` Peter Maydell
0 siblings, 1 reply; 40+ messages in thread
From: Stefan Hajnoczi @ 2017-01-16 13:39 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi
The following changes since commit 2ccede18bd24fce5db83fef3674563a1f256717b:
Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.9-pull-request' into staging (2017-01-16 12:41:35 +0000)
are available in the git repository at:
git://github.com/stefanha/qemu.git tags/block-pull-request
for you to fetch changes up to 7d506c90afa47facdb993bc19c15863eef584f1d:
async: optimize aio_bh_poll (2017-01-16 13:25:18 +0000)
----------------------------------------------------------------
----------------------------------------------------------------
Paolo Bonzini (11):
block: get rid of bdrv_io_unplugged_begin/end
aio: rename bh_lock to list_lock
qemu-thread: introduce QemuLockCnt
aio: make ctx->list_lock a QemuLockCnt, subsuming ctx->walking_bh
qemu-thread: optimize QemuLockCnt with futexes on Linux
aio-posix: split aio_dispatch_handlers out of aio_dispatch
aio: tweak walking in dispatch phase
aio-posix: remove walking_handlers, protecting AioHandler list with
list_lock
aio-win32: remove walking_handlers, protecting AioHandler list with
list_lock
aio: document locking
async: optimize aio_bh_poll
docs/lockcnt.txt | 277 +++++++++++++++++++++++++++++++
docs/multiple-iothreads.txt | 13 +-
util/Makefile.objs | 1 +
include/block/aio.h | 38 ++---
include/block/block.h | 2 -
include/block/block_int.h | 3 +-
include/qemu/futex.h | 36 ++++
include/qemu/thread.h | 112 +++++++++++++
aio-posix.c | 118 +++++++------
aio-win32.c | 83 +++++----
async.c | 45 ++---
block/io.c | 41 +----
util/lockcnt.c | 397 ++++++++++++++++++++++++++++++++++++++++++++
util/qemu-thread-posix.c | 35 +---
util/qemu-thread-win32.c | 2 +-
util/trace-events | 10 ++
16 files changed, 1010 insertions(+), 203 deletions(-)
create mode 100644 docs/lockcnt.txt
create mode 100644 include/qemu/futex.h
create mode 100644 util/lockcnt.c
--
2.9.3
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [Qemu-devel] [PULL 00/11] Block patches
2017-01-16 13:39 Stefan Hajnoczi
@ 2017-01-17 13:53 ` Peter Maydell
0 siblings, 0 replies; 40+ messages in thread
From: Peter Maydell @ 2017-01-17 13:53 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: QEMU Developers
On 16 January 2017 at 13:39, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> The following changes since commit 2ccede18bd24fce5db83fef3674563a1f256717b:
>
> Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.9-pull-request' into staging (2017-01-16 12:41:35 +0000)
>
> are available in the git repository at:
>
> git://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to 7d506c90afa47facdb993bc19c15863eef584f1d:
>
> async: optimize aio_bh_poll (2017-01-16 13:25:18 +0000)
>
> ----------------------------------------------------------------
>
> ----------------------------------------------------------------
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 00/11] Block patches
@ 2018-06-04 11:20 Stefan Hajnoczi
2018-06-05 9:38 ` Peter Maydell
0 siblings, 1 reply; 40+ messages in thread
From: Stefan Hajnoczi @ 2018-06-04 11:20 UTC (permalink / raw)
To: qemu-devel
Cc: Ronnie Sahlberg, Peter Maydell, qemu-block, Peter Lieven,
Max Reitz, Paolo Bonzini, Kevin Wolf, Fam Zheng, Stefan Hajnoczi
The following changes since commit c25e8bba1f546ea72744ccfab77f8a9e8a323be8:
Merge remote-tracking branch 'remotes/otubo/tags/pull-seccomp-20180601' into staging (2018-06-01 13:11:30 +0100)
are available in the Git repository at:
git://github.com/stefanha/qemu.git tags/block-pull-request
for you to fetch changes up to 21891a5a3011608845b5d7f1f9cce60cdc2bcc62:
main-loop: drop spin_counter (2018-06-01 16:01:29 +0100)
----------------------------------------------------------------
Pull request
* Copy offloading for qemu-img convert (iSCSI, raw, and qcow2)
If the underlying storage supports copy offloading, qemu-img convert will
use it instead of performing reads and writes. This avoids data transfers
and thus frees up storage bandwidth for other purposes. SCSI EXTENDED COPY
and Linux copy_file_range(2) are used to implement this optimization.
* Drop spurious "WARNING: I\/O thread spun for 1000 iterations" warning
----------------------------------------------------------------
Fam Zheng (10):
block: Introduce API for copy offloading
raw: Check byte range uniformly
raw: Implement copy offloading
qcow2: Implement copy offloading
file-posix: Implement bdrv_co_copy_range
iscsi: Query and save device designator when opening
iscsi: Create and use iscsi_co_wait_for_task
iscsi: Implement copy offloading
block-backend: Add blk_co_copy_range
qemu-img: Convert with copy offloading
Stefan Hajnoczi (1):
main-loop: drop spin_counter
configure | 17 ++
include/block/block.h | 32 ++++
include/block/block_int.h | 38 ++++
include/block/raw-aio.h | 10 +-
include/scsi/constants.h | 4 +
include/sysemu/block-backend.h | 4 +
block/block-backend.c | 18 ++
block/file-posix.c | 98 +++++++++-
block/io.c | 97 ++++++++++
block/iscsi.c | 314 +++++++++++++++++++++++++++----
block/qcow2.c | 229 +++++++++++++++++++---
block/raw-format.c | 96 +++++++---
qemu-img.c | 50 ++++-
util/main-loop.c | 25 ---
tests/qemu-iotests/common.filter | 1 -
15 files changed, 908 insertions(+), 125 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [Qemu-devel] [PULL 00/11] Block patches
2018-06-04 11:20 Stefan Hajnoczi
@ 2018-06-05 9:38 ` Peter Maydell
0 siblings, 0 replies; 40+ messages in thread
From: Peter Maydell @ 2018-06-05 9:38 UTC (permalink / raw)
To: Stefan Hajnoczi
Cc: QEMU Developers, Ronnie Sahlberg, Qemu-block, Peter Lieven,
Max Reitz, Paolo Bonzini, Kevin Wolf, Fam Zheng
On 4 June 2018 at 12:20, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> The following changes since commit c25e8bba1f546ea72744ccfab77f8a9e8a323be8:
>
> Merge remote-tracking branch 'remotes/otubo/tags/pull-seccomp-20180601' into staging (2018-06-01 13:11:30 +0100)
>
> are available in the Git repository at:
>
> git://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to 21891a5a3011608845b5d7f1f9cce60cdc2bcc62:
>
> main-loop: drop spin_counter (2018-06-01 16:01:29 +0100)
>
> ----------------------------------------------------------------
> Pull request
>
> * Copy offloading for qemu-img convert (iSCSI, raw, and qcow2)
>
> If the underlying storage supports copy offloading, qemu-img convert will
> use it instead of performing reads and writes. This avoids data transfers
> and thus frees up storage bandwidth for other purposes. SCSI EXTENDED COPY
> and Linux copy_file_range(2) are used to implement this optimization.
>
> * Drop spurious "WARNING: I\/O thread spun for 1000 iterations" warning
>
> ----------------------------------------------------------------
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 00/11] Block patches
@ 2018-08-31 14:24 Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 01/11] file-posix: Skip effectiveless OFD lock operations Max Reitz
` (11 more replies)
0 siblings, 12 replies; 40+ messages in thread
From: Max Reitz @ 2018-08-31 14:24 UTC (permalink / raw)
To: qemu-block; +Cc: qemu-devel, Max Reitz, Peter Maydell, Kevin Wolf
The following changes since commit 19b599f7664b2ebfd0f405fb79c14dd241557452:
Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-08-27-v2' into staging (2018-08-27 16:44:20 +0100)
are available in the Git repository at:
https://git.xanclic.moe/XanClic/qemu.git tags/pull-block-2018-08-31
for you to fetch changes up to 40954cc7831c4f95f9ce6402ae3d6761f44f31ff:
jobs: remove job_defer_to_main_loop (2018-08-31 16:11:27 +0200)
----------------------------------------------------------------
Block patches:
- (Block) job exit refactoring, part 1
(removing job_defer_to_main_loop())
- Locking fix for the file-posix block driver
- test-bdrv-drain leak fix
----------------------------------------------------------------
Fam Zheng (1):
file-posix: Skip effectiveless OFD lock operations
John Snow (9):
jobs: change start callback to run callback
jobs: canonize Error object
jobs: add exit shim
block/commit: utilize job_exit shim
block/mirror: utilize job_exit shim
jobs: utilize job_exit shim
block/backup: make function variables consistently named
jobs: remove ret argument to job_completed; privatize it
jobs: remove job_defer_to_main_loop
Marc-André Lureau (1):
tests: fix bdrv-drain leak
include/qemu/job.h | 70 ++++++++++++++++-----------------
block/backup.c | 81 ++++++++++++++++-----------------------
block/commit.c | 29 +++++---------
block/create.c | 19 +++------
block/file-posix.c | 41 +++++++++++++++-----
block/mirror.c | 39 ++++++++-----------
block/stream.c | 29 ++++++--------
job-qmp.c | 5 ++-
job.c | 73 ++++++++++++-----------------------
tests/test-bdrv-drain.c | 14 +++----
tests/test-blockjob-txn.c | 25 +++++-------
tests/test-blockjob.c | 17 ++++----
trace-events | 2 +-
13 files changed, 192 insertions(+), 252 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 01/11] file-posix: Skip effectiveless OFD lock operations
2018-08-31 14:24 [Qemu-devel] [PULL 00/11] Block patches Max Reitz
@ 2018-08-31 14:24 ` Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 02/11] tests: fix bdrv-drain leak Max Reitz
` (10 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Max Reitz @ 2018-08-31 14:24 UTC (permalink / raw)
To: qemu-block; +Cc: qemu-devel, Max Reitz, Peter Maydell, Kevin Wolf
From: Fam Zheng <famz@redhat.com>
If we know we've already locked the bytes, don't do it again; similarly
don't unlock a byte if we haven't locked it. This doesn't change the
behavior, but fixes a corner case explained below.
Libvirt had an error handling bug that an image can get its (ownership,
file mode, SELinux) permissions changed (RHBZ 1584982) by mistake behind
QEMU. Specifically, an image in use by Libvirt VM has:
$ ls -lhZ b.img
-rw-r--r--. qemu qemu system_u:object_r:svirt_image_t:s0:c600,c690 b.img
Trying to attach it a second time won't work because of image locking.
And after the error, it becomes:
$ ls -lhZ b.img
-rw-r--r--. root root system_u:object_r:virt_image_t:s0 b.img
Then, we won't be able to do OFD lock operations with the existing fd.
In other words, the code such as in blk_detach_dev:
blk_set_perm(blk, 0, BLK_PERM_ALL, &error_abort);
can abort() QEMU, out of environmental changes.
This patch is an easy fix to this and the change is regardlessly
reasonable, so do it.
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/file-posix.c | 41 +++++++++++++++++++++++++++++++----------
1 file changed, 31 insertions(+), 10 deletions(-)
diff --git a/block/file-posix.c b/block/file-posix.c
index fe83cbf0eb..73ae00c8c5 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -680,23 +680,42 @@ typedef enum {
* file; if @unlock == true, also unlock the unneeded bytes.
* @shared_perm_lock_bits is the mask of all permissions that are NOT shared.
*/
-static int raw_apply_lock_bytes(int fd,
+static int raw_apply_lock_bytes(BDRVRawState *s, int fd,
uint64_t perm_lock_bits,
uint64_t shared_perm_lock_bits,
bool unlock, Error **errp)
{
int ret;
int i;
+ uint64_t locked_perm, locked_shared_perm;
+
+ if (s) {
+ locked_perm = s->perm;
+ locked_shared_perm = ~s->shared_perm & BLK_PERM_ALL;
+ } else {
+ /*
+ * We don't have the previous bits, just lock/unlock for each of the
+ * requested bits.
+ */
+ if (unlock) {
+ locked_perm = BLK_PERM_ALL;
+ locked_shared_perm = BLK_PERM_ALL;
+ } else {
+ locked_perm = 0;
+ locked_shared_perm = 0;
+ }
+ }
PERM_FOREACH(i) {
int off = RAW_LOCK_PERM_BASE + i;
- if (perm_lock_bits & (1ULL << i)) {
+ uint64_t bit = (1ULL << i);
+ if ((perm_lock_bits & bit) && !(locked_perm & bit)) {
ret = qemu_lock_fd(fd, off, 1, false);
if (ret) {
error_setg(errp, "Failed to lock byte %d", off);
return ret;
}
- } else if (unlock) {
+ } else if (unlock && (locked_perm & bit) && !(perm_lock_bits & bit)) {
ret = qemu_unlock_fd(fd, off, 1);
if (ret) {
error_setg(errp, "Failed to unlock byte %d", off);
@@ -706,13 +725,15 @@ static int raw_apply_lock_bytes(int fd,
}
PERM_FOREACH(i) {
int off = RAW_LOCK_SHARED_BASE + i;
- if (shared_perm_lock_bits & (1ULL << i)) {
+ uint64_t bit = (1ULL << i);
+ if ((shared_perm_lock_bits & bit) && !(locked_shared_perm & bit)) {
ret = qemu_lock_fd(fd, off, 1, false);
if (ret) {
error_setg(errp, "Failed to lock byte %d", off);
return ret;
}
- } else if (unlock) {
+ } else if (unlock && (locked_shared_perm & bit) &&
+ !(shared_perm_lock_bits & bit)) {
ret = qemu_unlock_fd(fd, off, 1);
if (ret) {
error_setg(errp, "Failed to unlock byte %d", off);
@@ -788,7 +809,7 @@ static int raw_handle_perm_lock(BlockDriverState *bs,
switch (op) {
case RAW_PL_PREPARE:
- ret = raw_apply_lock_bytes(s->lock_fd, s->perm | new_perm,
+ ret = raw_apply_lock_bytes(s, s->lock_fd, s->perm | new_perm,
~s->shared_perm | ~new_shared,
false, errp);
if (!ret) {
@@ -800,7 +821,7 @@ static int raw_handle_perm_lock(BlockDriverState *bs,
op = RAW_PL_ABORT;
/* fall through to unlock bytes. */
case RAW_PL_ABORT:
- raw_apply_lock_bytes(s->lock_fd, s->perm, ~s->shared_perm,
+ raw_apply_lock_bytes(s, s->lock_fd, s->perm, ~s->shared_perm,
true, &local_err);
if (local_err) {
/* Theoretically the above call only unlocks bytes and it cannot
@@ -810,7 +831,7 @@ static int raw_handle_perm_lock(BlockDriverState *bs,
}
break;
case RAW_PL_COMMIT:
- raw_apply_lock_bytes(s->lock_fd, new_perm, ~new_shared,
+ raw_apply_lock_bytes(s, s->lock_fd, new_perm, ~new_shared,
true, &local_err);
if (local_err) {
/* Theoretically the above call only unlocks bytes and it cannot
@@ -2209,7 +2230,7 @@ raw_co_create(BlockdevCreateOptions *options, Error **errp)
shared = BLK_PERM_ALL & ~BLK_PERM_RESIZE;
/* Step one: Take locks */
- result = raw_apply_lock_bytes(fd, perm, ~shared, false, errp);
+ result = raw_apply_lock_bytes(NULL, fd, perm, ~shared, false, errp);
if (result < 0) {
goto out_close;
}
@@ -2250,7 +2271,7 @@ raw_co_create(BlockdevCreateOptions *options, Error **errp)
}
out_unlock:
- raw_apply_lock_bytes(fd, 0, 0, true, &local_err);
+ raw_apply_lock_bytes(NULL, fd, 0, 0, true, &local_err);
if (local_err) {
/* The above call should not fail, and if it does, that does
* not mean the whole creation operation has failed. So
--
2.17.1
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 02/11] tests: fix bdrv-drain leak
2018-08-31 14:24 [Qemu-devel] [PULL 00/11] Block patches Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 01/11] file-posix: Skip effectiveless OFD lock operations Max Reitz
@ 2018-08-31 14:24 ` Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 03/11] jobs: change start callback to run callback Max Reitz
` (9 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Max Reitz @ 2018-08-31 14:24 UTC (permalink / raw)
To: qemu-block; +Cc: qemu-devel, Max Reitz, Peter Maydell, Kevin Wolf
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Spotted by ASAN:
=================================================================
==5378==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 65536 byte(s) in 1 object(s) allocated from:
#0 0x7f788f83bc48 in malloc (/lib64/libasan.so.5+0xeec48)
#1 0x7f788c9923c5 in g_malloc (/lib64/libglib-2.0.so.0+0x523c5)
#2 0x5622a1fe37bc in coroutine_trampoline /home/elmarco/src/qq/util/coroutine-ucontext.c:116
#3 0x7f788a15d75f in __correctly_grouped_prefixwc (/lib64/libc.so.6+0x4c75f)
(Broken in commit 4c8158e359d.)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20180809114417.28718-3-marcandre.lureau@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
tests/test-bdrv-drain.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c
index 17bb8508ae..abc8bbe6f0 100644
--- a/tests/test-bdrv-drain.c
+++ b/tests/test-bdrv-drain.c
@@ -948,6 +948,7 @@ static void coroutine_fn test_co_delete_by_drain(void *opaque)
}
dbdd->done = true;
+ g_free(buffer);
}
/**
--
2.17.1
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 03/11] jobs: change start callback to run callback
2018-08-31 14:24 [Qemu-devel] [PULL 00/11] Block patches Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 01/11] file-posix: Skip effectiveless OFD lock operations Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 02/11] tests: fix bdrv-drain leak Max Reitz
@ 2018-08-31 14:24 ` Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 04/11] jobs: canonize Error object Max Reitz
` (8 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Max Reitz @ 2018-08-31 14:24 UTC (permalink / raw)
To: qemu-block; +Cc: qemu-devel, Max Reitz, Peter Maydell, Kevin Wolf
From: John Snow <jsnow@redhat.com>
Presently we codify the entry point for a job as the "start" callback,
but a more apt name would be "run" to clarify the idea that when this
function returns we consider the job to have "finished," except for
any cleanup which occurs in separate callbacks later.
As part of this clarification, change the signature to include an error
object and a return code. The error ptr is not yet used, and the return
code while captured, will be overwritten by actions in the job_completed
function.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 20180830015734.19765-2-jsnow@redhat.com
Reviewed-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
include/qemu/job.h | 2 +-
block/backup.c | 7 ++++---
block/commit.c | 7 ++++---
block/create.c | 8 +++++---
block/mirror.c | 10 ++++++----
block/stream.c | 7 ++++---
job.c | 6 +++---
tests/test-bdrv-drain.c | 7 ++++---
tests/test-blockjob-txn.c | 16 ++++++++--------
tests/test-blockjob.c | 7 ++++---
10 files changed, 43 insertions(+), 34 deletions(-)
diff --git a/include/qemu/job.h b/include/qemu/job.h
index 18c9223e31..9cf463d228 100644
--- a/include/qemu/job.h
+++ b/include/qemu/job.h
@@ -169,7 +169,7 @@ struct JobDriver {
JobType job_type;
/** Mandatory: Entrypoint for the Coroutine. */
- CoroutineEntry *start;
+ int coroutine_fn (*run)(Job *job, Error **errp);
/**
* If the callback is not NULL, it will be invoked when the job transitions
diff --git a/block/backup.c b/block/backup.c
index 8630d32926..5d47781840 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -480,9 +480,9 @@ static void backup_incremental_init_copy_bitmap(BackupBlockJob *job)
bdrv_dirty_iter_free(dbi);
}
-static void coroutine_fn backup_run(void *opaque)
+static int coroutine_fn backup_run(Job *opaque_job, Error **errp)
{
- BackupBlockJob *job = opaque;
+ BackupBlockJob *job = container_of(opaque_job, BackupBlockJob, common.job);
BackupCompleteData *data;
BlockDriverState *bs = blk_bs(job->common.blk);
int64_t offset, nb_clusters;
@@ -587,6 +587,7 @@ static void coroutine_fn backup_run(void *opaque)
data = g_malloc(sizeof(*data));
data->ret = ret;
job_defer_to_main_loop(&job->common.job, backup_complete, data);
+ return ret;
}
static const BlockJobDriver backup_job_driver = {
@@ -596,7 +597,7 @@ static const BlockJobDriver backup_job_driver = {
.free = block_job_free,
.user_resume = block_job_user_resume,
.drain = block_job_drain,
- .start = backup_run,
+ .run = backup_run,
.commit = backup_commit,
.abort = backup_abort,
.clean = backup_clean,
diff --git a/block/commit.c b/block/commit.c
index eb414579bd..a0ea86ff64 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -134,9 +134,9 @@ static void commit_complete(Job *job, void *opaque)
bdrv_unref(top);
}
-static void coroutine_fn commit_run(void *opaque)
+static int coroutine_fn commit_run(Job *job, Error **errp)
{
- CommitBlockJob *s = opaque;
+ CommitBlockJob *s = container_of(job, CommitBlockJob, common.job);
CommitCompleteData *data;
int64_t offset;
uint64_t delay_ns = 0;
@@ -213,6 +213,7 @@ out:
data = g_malloc(sizeof(*data));
data->ret = ret;
job_defer_to_main_loop(&s->common.job, commit_complete, data);
+ return ret;
}
static const BlockJobDriver commit_job_driver = {
@@ -222,7 +223,7 @@ static const BlockJobDriver commit_job_driver = {
.free = block_job_free,
.user_resume = block_job_user_resume,
.drain = block_job_drain,
- .start = commit_run,
+ .run = commit_run,
},
};
diff --git a/block/create.c b/block/create.c
index 915cd41bcc..04733c3618 100644
--- a/block/create.c
+++ b/block/create.c
@@ -45,9 +45,9 @@ static void blockdev_create_complete(Job *job, void *opaque)
job_completed(job, s->ret, s->err);
}
-static void coroutine_fn blockdev_create_run(void *opaque)
+static int coroutine_fn blockdev_create_run(Job *job, Error **errp)
{
- BlockdevCreateJob *s = opaque;
+ BlockdevCreateJob *s = container_of(job, BlockdevCreateJob, common);
job_progress_set_remaining(&s->common, 1);
s->ret = s->drv->bdrv_co_create(s->opts, &s->err);
@@ -55,12 +55,14 @@ static void coroutine_fn blockdev_create_run(void *opaque)
qapi_free_BlockdevCreateOptions(s->opts);
job_defer_to_main_loop(&s->common, blockdev_create_complete, NULL);
+
+ return s->ret;
}
static const JobDriver blockdev_create_job_driver = {
.instance_size = sizeof(BlockdevCreateJob),
.job_type = JOB_TYPE_CREATE,
- .start = blockdev_create_run,
+ .run = blockdev_create_run,
};
void qmp_blockdev_create(const char *job_id, BlockdevCreateOptions *options,
diff --git a/block/mirror.c b/block/mirror.c
index 6cc10df5c9..691763db41 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -812,9 +812,9 @@ static int mirror_flush(MirrorBlockJob *s)
return ret;
}
-static void coroutine_fn mirror_run(void *opaque)
+static int coroutine_fn mirror_run(Job *job, Error **errp)
{
- MirrorBlockJob *s = opaque;
+ MirrorBlockJob *s = container_of(job, MirrorBlockJob, common.job);
MirrorExitData *data;
BlockDriverState *bs = s->mirror_top_bs->backing->bs;
BlockDriverState *target_bs = blk_bs(s->target);
@@ -1041,7 +1041,9 @@ immediate_exit:
if (need_drain) {
bdrv_drained_begin(bs);
}
+
job_defer_to_main_loop(&s->common.job, mirror_exit, data);
+ return ret;
}
static void mirror_complete(Job *job, Error **errp)
@@ -1138,7 +1140,7 @@ static const BlockJobDriver mirror_job_driver = {
.free = block_job_free,
.user_resume = block_job_user_resume,
.drain = block_job_drain,
- .start = mirror_run,
+ .run = mirror_run,
.pause = mirror_pause,
.complete = mirror_complete,
},
@@ -1154,7 +1156,7 @@ static const BlockJobDriver commit_active_job_driver = {
.free = block_job_free,
.user_resume = block_job_user_resume,
.drain = block_job_drain,
- .start = mirror_run,
+ .run = mirror_run,
.pause = mirror_pause,
.complete = mirror_complete,
},
diff --git a/block/stream.c b/block/stream.c
index 9264b68a1e..b4b987df7e 100644
--- a/block/stream.c
+++ b/block/stream.c
@@ -97,9 +97,9 @@ out:
g_free(data);
}
-static void coroutine_fn stream_run(void *opaque)
+static int coroutine_fn stream_run(Job *job, Error **errp)
{
- StreamBlockJob *s = opaque;
+ StreamBlockJob *s = container_of(job, StreamBlockJob, common.job);
StreamCompleteData *data;
BlockBackend *blk = s->common.blk;
BlockDriverState *bs = blk_bs(blk);
@@ -206,6 +206,7 @@ out:
data = g_malloc(sizeof(*data));
data->ret = ret;
job_defer_to_main_loop(&s->common.job, stream_complete, data);
+ return ret;
}
static const BlockJobDriver stream_job_driver = {
@@ -213,7 +214,7 @@ static const BlockJobDriver stream_job_driver = {
.instance_size = sizeof(StreamBlockJob),
.job_type = JOB_TYPE_STREAM,
.free = block_job_free,
- .start = stream_run,
+ .run = stream_run,
.user_resume = block_job_user_resume,
.drain = block_job_drain,
},
diff --git a/job.c b/job.c
index e36ebaafd8..76988f6678 100644
--- a/job.c
+++ b/job.c
@@ -544,16 +544,16 @@ static void coroutine_fn job_co_entry(void *opaque)
{
Job *job = opaque;
- assert(job && job->driver && job->driver->start);
+ assert(job && job->driver && job->driver->run);
job_pause_point(job);
- job->driver->start(job);
+ job->ret = job->driver->run(job, NULL);
}
void job_start(Job *job)
{
assert(job && !job_started(job) && job->paused &&
- job->driver && job->driver->start);
+ job->driver && job->driver->run);
job->co = qemu_coroutine_create(job_co_entry, job);
job->pause_count--;
job->busy = true;
diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c
index abc8bbe6f0..39ee723c8e 100644
--- a/tests/test-bdrv-drain.c
+++ b/tests/test-bdrv-drain.c
@@ -757,9 +757,9 @@ static void test_job_completed(Job *job, void *opaque)
job_completed(job, 0, NULL);
}
-static void coroutine_fn test_job_start(void *opaque)
+static int coroutine_fn test_job_run(Job *job, Error **errp)
{
- TestBlockJob *s = opaque;
+ TestBlockJob *s = container_of(job, TestBlockJob, common.job);
job_transition_to_ready(&s->common.job);
while (!s->should_complete) {
@@ -771,6 +771,7 @@ static void coroutine_fn test_job_start(void *opaque)
}
job_defer_to_main_loop(&s->common.job, test_job_completed, NULL);
+ return 0;
}
static void test_job_complete(Job *job, Error **errp)
@@ -785,7 +786,7 @@ BlockJobDriver test_job_driver = {
.free = block_job_free,
.user_resume = block_job_user_resume,
.drain = block_job_drain,
- .start = test_job_start,
+ .run = test_job_run,
.complete = test_job_complete,
},
};
diff --git a/tests/test-blockjob-txn.c b/tests/test-blockjob-txn.c
index 58d9b87fb2..3194924071 100644
--- a/tests/test-blockjob-txn.c
+++ b/tests/test-blockjob-txn.c
@@ -38,25 +38,25 @@ static void test_block_job_complete(Job *job, void *opaque)
bdrv_unref(bs);
}
-static void coroutine_fn test_block_job_run(void *opaque)
+static int coroutine_fn test_block_job_run(Job *job, Error **errp)
{
- TestBlockJob *s = opaque;
- BlockJob *job = &s->common;
+ TestBlockJob *s = container_of(job, TestBlockJob, common.job);
while (s->iterations--) {
if (s->use_timer) {
- job_sleep_ns(&job->job, 0);
+ job_sleep_ns(job, 0);
} else {
- job_yield(&job->job);
+ job_yield(job);
}
- if (job_is_cancelled(&job->job)) {
+ if (job_is_cancelled(job)) {
break;
}
}
- job_defer_to_main_loop(&job->job, test_block_job_complete,
+ job_defer_to_main_loop(job, test_block_job_complete,
(void *)(intptr_t)s->rc);
+ return s->rc;
}
typedef struct {
@@ -80,7 +80,7 @@ static const BlockJobDriver test_block_job_driver = {
.free = block_job_free,
.user_resume = block_job_user_resume,
.drain = block_job_drain,
- .start = test_block_job_run,
+ .run = test_block_job_run,
},
};
diff --git a/tests/test-blockjob.c b/tests/test-blockjob.c
index cb42f06e61..b0462bfdec 100644
--- a/tests/test-blockjob.c
+++ b/tests/test-blockjob.c
@@ -176,9 +176,9 @@ static void cancel_job_complete(Job *job, Error **errp)
s->should_complete = true;
}
-static void coroutine_fn cancel_job_start(void *opaque)
+static int coroutine_fn cancel_job_run(Job *job, Error **errp)
{
- CancelJob *s = opaque;
+ CancelJob *s = container_of(job, CancelJob, common.job);
while (!s->should_complete) {
if (job_is_cancelled(&s->common.job)) {
@@ -194,6 +194,7 @@ static void coroutine_fn cancel_job_start(void *opaque)
defer:
job_defer_to_main_loop(&s->common.job, cancel_job_completed, s);
+ return 0;
}
static const BlockJobDriver test_cancel_driver = {
@@ -202,7 +203,7 @@ static const BlockJobDriver test_cancel_driver = {
.free = block_job_free,
.user_resume = block_job_user_resume,
.drain = block_job_drain,
- .start = cancel_job_start,
+ .run = cancel_job_run,
.complete = cancel_job_complete,
},
};
--
2.17.1
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 04/11] jobs: canonize Error object
2018-08-31 14:24 [Qemu-devel] [PULL 00/11] Block patches Max Reitz
` (2 preceding siblings ...)
2018-08-31 14:24 ` [Qemu-devel] [PULL 03/11] jobs: change start callback to run callback Max Reitz
@ 2018-08-31 14:24 ` Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 05/11] jobs: add exit shim Max Reitz
` (7 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Max Reitz @ 2018-08-31 14:24 UTC (permalink / raw)
To: qemu-block; +Cc: qemu-devel, Max Reitz, Peter Maydell, Kevin Wolf
From: John Snow <jsnow@redhat.com>
Jobs presently use both an Error object in the case of the create job,
and char strings in the case of generic errors elsewhere.
Unify the two paths as just j->err, and remove the extra argument from
job_completed. The integer error code for job_completed is kept for now,
to be removed shortly in a separate patch.
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20180830015734.19765-3-jsnow@redhat.com
[mreitz: Dropped a superfluous g_strdup()]
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
include/qemu/job.h | 14 ++++++++------
block/backup.c | 2 +-
block/commit.c | 2 +-
block/create.c | 5 ++---
block/mirror.c | 2 +-
block/stream.c | 2 +-
job-qmp.c | 5 +++--
job.c | 18 ++++++------------
tests/test-bdrv-drain.c | 2 +-
tests/test-blockjob-txn.c | 2 +-
tests/test-blockjob.c | 2 +-
11 files changed, 26 insertions(+), 30 deletions(-)
diff --git a/include/qemu/job.h b/include/qemu/job.h
index 9cf463d228..e0e99870a1 100644
--- a/include/qemu/job.h
+++ b/include/qemu/job.h
@@ -124,12 +124,16 @@ typedef struct Job {
/** Estimated progress_current value at the completion of the job */
int64_t progress_total;
- /** Error string for a failed job (NULL if, and only if, job->ret == 0) */
- char *error;
-
/** ret code passed to job_completed. */
int ret;
+ /**
+ * Error object for a failed job.
+ * If job->ret is nonzero and an error object was not set, it will be set
+ * to strerror(-job->ret) during job_completed.
+ */
+ Error *err;
+
/** The completion function that will be called when the job completes. */
BlockCompletionFunc *cb;
@@ -484,15 +488,13 @@ void job_transition_to_ready(Job *job);
/**
* @job: The job being completed.
* @ret: The status code.
- * @error: The error message for a failing job (only with @ret < 0). If @ret is
- * negative, but NULL is given for @error, strerror() is used.
*
* Marks @job as completed. If @ret is non-zero, the job transaction it is part
* of is aborted. If @ret is zero, the job moves into the WAITING state. If it
* is the last job to complete in its transaction, all jobs in the transaction
* move from WAITING to PENDING.
*/
-void job_completed(Job *job, int ret, Error *error);
+void job_completed(Job *job, int ret);
/** Asynchronously complete the specified @job. */
void job_complete(Job *job, Error **errp);
diff --git a/block/backup.c b/block/backup.c
index 5d47781840..1e965d54e5 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -388,7 +388,7 @@ static void backup_complete(Job *job, void *opaque)
{
BackupCompleteData *data = opaque;
- job_completed(job, data->ret, NULL);
+ job_completed(job, data->ret);
g_free(data);
}
diff --git a/block/commit.c b/block/commit.c
index a0ea86ff64..4a17bb73ec 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -117,7 +117,7 @@ static void commit_complete(Job *job, void *opaque)
* bdrv_set_backing_hd() to fail. */
block_job_remove_all_bdrv(bjob);
- job_completed(job, ret, NULL);
+ job_completed(job, ret);
g_free(data);
/* If bdrv_drop_intermediate() didn't already do that, remove the commit
diff --git a/block/create.c b/block/create.c
index 04733c3618..26a385c6c7 100644
--- a/block/create.c
+++ b/block/create.c
@@ -35,14 +35,13 @@ typedef struct BlockdevCreateJob {
BlockDriver *drv;
BlockdevCreateOptions *opts;
int ret;
- Error *err;
} BlockdevCreateJob;
static void blockdev_create_complete(Job *job, void *opaque)
{
BlockdevCreateJob *s = container_of(job, BlockdevCreateJob, common);
- job_completed(job, s->ret, s->err);
+ job_completed(job, s->ret);
}
static int coroutine_fn blockdev_create_run(Job *job, Error **errp)
@@ -50,7 +49,7 @@ static int coroutine_fn blockdev_create_run(Job *job, Error **errp)
BlockdevCreateJob *s = container_of(job, BlockdevCreateJob, common);
job_progress_set_remaining(&s->common, 1);
- s->ret = s->drv->bdrv_co_create(s->opts, &s->err);
+ s->ret = s->drv->bdrv_co_create(s->opts, errp);
job_progress_update(&s->common, 1);
qapi_free_BlockdevCreateOptions(s->opts);
diff --git a/block/mirror.c b/block/mirror.c
index 691763db41..be5dc6b7b0 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -710,7 +710,7 @@ static void mirror_exit(Job *job, void *opaque)
blk_insert_bs(bjob->blk, mirror_top_bs, &error_abort);
bs_opaque->job = NULL;
- job_completed(job, data->ret, NULL);
+ job_completed(job, data->ret);
g_free(data);
bdrv_drained_end(src);
diff --git a/block/stream.c b/block/stream.c
index b4b987df7e..26a775386b 100644
--- a/block/stream.c
+++ b/block/stream.c
@@ -93,7 +93,7 @@ out:
}
g_free(s->backing_file_str);
- job_completed(job, data->ret, NULL);
+ job_completed(job, data->ret);
g_free(data);
}
diff --git a/job-qmp.c b/job-qmp.c
index 410775df61..a969b2bbf0 100644
--- a/job-qmp.c
+++ b/job-qmp.c
@@ -146,8 +146,9 @@ static JobInfo *job_query_single(Job *job, Error **errp)
.status = job->status,
.current_progress = job->progress_current,
.total_progress = job->progress_total,
- .has_error = !!job->error,
- .error = g_strdup(job->error),
+ .has_error = !!job->err,
+ .error = job->err ? \
+ g_strdup(error_get_pretty(job->err)) : NULL,
};
return info;
diff --git a/job.c b/job.c
index 76988f6678..7b3721d2c7 100644
--- a/job.c
+++ b/job.c
@@ -369,7 +369,7 @@ void job_unref(Job *job)
QLIST_REMOVE(job, job_list);
- g_free(job->error);
+ error_free(job->err);
g_free(job->id);
g_free(job);
}
@@ -546,7 +546,7 @@ static void coroutine_fn job_co_entry(void *opaque)
assert(job && job->driver && job->driver->run);
job_pause_point(job);
- job->ret = job->driver->run(job, NULL);
+ job->ret = job->driver->run(job, &job->err);
}
@@ -666,8 +666,8 @@ static void job_update_rc(Job *job)
job->ret = -ECANCELED;
}
if (job->ret) {
- if (!job->error) {
- job->error = g_strdup(strerror(-job->ret));
+ if (!job->err) {
+ error_setg(&job->err, "%s", strerror(-job->ret));
}
job_state_transition(job, JOB_STATUS_ABORTING);
}
@@ -865,17 +865,11 @@ static void job_completed_txn_success(Job *job)
}
}
-void job_completed(Job *job, int ret, Error *error)
+void job_completed(Job *job, int ret)
{
assert(job && job->txn && !job_is_completed(job));
job->ret = ret;
- if (error) {
- assert(job->ret < 0);
- job->error = g_strdup(error_get_pretty(error));
- error_free(error);
- }
-
job_update_rc(job);
trace_job_completed(job, ret, job->ret);
if (job->ret) {
@@ -893,7 +887,7 @@ void job_cancel(Job *job, bool force)
}
job_cancel_async(job, force);
if (!job_started(job)) {
- job_completed(job, -ECANCELED, NULL);
+ job_completed(job, -ECANCELED);
} else if (job->deferred_to_main_loop) {
job_completed_txn_abort(job);
} else {
diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c
index 39ee723c8e..6bda4451c1 100644
--- a/tests/test-bdrv-drain.c
+++ b/tests/test-bdrv-drain.c
@@ -754,7 +754,7 @@ typedef struct TestBlockJob {
static void test_job_completed(Job *job, void *opaque)
{
- job_completed(job, 0, NULL);
+ job_completed(job, 0);
}
static int coroutine_fn test_job_run(Job *job, Error **errp)
diff --git a/tests/test-blockjob-txn.c b/tests/test-blockjob-txn.c
index 3194924071..82cedee78b 100644
--- a/tests/test-blockjob-txn.c
+++ b/tests/test-blockjob-txn.c
@@ -34,7 +34,7 @@ static void test_block_job_complete(Job *job, void *opaque)
rc = -ECANCELED;
}
- job_completed(job, rc, NULL);
+ job_completed(job, rc);
bdrv_unref(bs);
}
diff --git a/tests/test-blockjob.c b/tests/test-blockjob.c
index b0462bfdec..408a226939 100644
--- a/tests/test-blockjob.c
+++ b/tests/test-blockjob.c
@@ -167,7 +167,7 @@ static void cancel_job_completed(Job *job, void *opaque)
{
CancelJob *s = opaque;
s->completed = true;
- job_completed(job, 0, NULL);
+ job_completed(job, 0);
}
static void cancel_job_complete(Job *job, Error **errp)
--
2.17.1
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 05/11] jobs: add exit shim
2018-08-31 14:24 [Qemu-devel] [PULL 00/11] Block patches Max Reitz
` (3 preceding siblings ...)
2018-08-31 14:24 ` [Qemu-devel] [PULL 04/11] jobs: canonize Error object Max Reitz
@ 2018-08-31 14:24 ` Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 06/11] block/commit: utilize job_exit shim Max Reitz
` (6 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Max Reitz @ 2018-08-31 14:24 UTC (permalink / raw)
To: qemu-block; +Cc: qemu-devel, Max Reitz, Peter Maydell, Kevin Wolf
From: John Snow <jsnow@redhat.com>
All jobs do the same thing when they leave their running loop:
- Store the return code in a structure
- wait to receive this structure in the main thread
- signal job completion via job_completed
Few jobs do anything beyond exactly this. Consolidate this exit
logic for a net reduction in SLOC.
More seriously, when we utilize job_defer_to_main_loop_bh to call
a function that calls job_completed, job_finalize_single will run
in a context where it has recursively taken the aio_context lock,
which can cause hangs if it puts down a reference that causes a flush.
You can observe this in practice by looking at mirror_exit's careful
placement of job_completed and bdrv_unref calls.
If we centralize job exiting, we can signal job completion from outside
of the aio_context, which should allow for job cleanup code to run with
only one lock, which makes cleanup callbacks less tricky to write.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 20180830015734.19765-4-jsnow@redhat.com
Reviewed-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
include/qemu/job.h | 11 +++++++++++
job.c | 18 ++++++++++++++++++
2 files changed, 29 insertions(+)
diff --git a/include/qemu/job.h b/include/qemu/job.h
index e0e99870a1..1144d671a1 100644
--- a/include/qemu/job.h
+++ b/include/qemu/job.h
@@ -208,6 +208,17 @@ struct JobDriver {
*/
void (*drain)(Job *job);
+ /**
+ * If the callback is not NULL, exit will be invoked from the main thread
+ * when the job's coroutine has finished, but before transactional
+ * convergence; before @prepare or @abort.
+ *
+ * FIXME TODO: This callback is only temporary to transition remaining jobs
+ * to prepare/commit/abort/clean callbacks and will be removed before 3.1.
+ * is released.
+ */
+ void (*exit)(Job *job);
+
/**
* If the callback is not NULL, prepare will be invoked when all the jobs
* belonging to the same transaction complete; or upon this job's completion
diff --git a/job.c b/job.c
index 7b3721d2c7..5df7791ad8 100644
--- a/job.c
+++ b/job.c
@@ -535,6 +535,18 @@ void job_drain(Job *job)
}
}
+static void job_exit(void *opaque)
+{
+ Job *job = (Job *)opaque;
+ AioContext *aio_context = job->aio_context;
+
+ if (job->driver->exit) {
+ aio_context_acquire(aio_context);
+ job->driver->exit(job);
+ aio_context_release(aio_context);
+ }
+ job_completed(job, job->ret);
+}
/**
* All jobs must allow a pause point before entering their job proper. This
@@ -547,6 +559,12 @@ static void coroutine_fn job_co_entry(void *opaque)
assert(job && job->driver && job->driver->run);
job_pause_point(job);
job->ret = job->driver->run(job, &job->err);
+ if (!job->deferred_to_main_loop) {
+ job->deferred_to_main_loop = true;
+ aio_bh_schedule_oneshot(qemu_get_aio_context(),
+ job_exit,
+ job);
+ }
}
--
2.17.1
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 06/11] block/commit: utilize job_exit shim
2018-08-31 14:24 [Qemu-devel] [PULL 00/11] Block patches Max Reitz
` (4 preceding siblings ...)
2018-08-31 14:24 ` [Qemu-devel] [PULL 05/11] jobs: add exit shim Max Reitz
@ 2018-08-31 14:24 ` Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 07/11] block/mirror: " Max Reitz
` (5 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Max Reitz @ 2018-08-31 14:24 UTC (permalink / raw)
To: qemu-block; +Cc: qemu-devel, Max Reitz, Peter Maydell, Kevin Wolf
From: John Snow <jsnow@redhat.com>
Change the manual deferment to commit_complete into the implicit
callback to job_exit, renaming commit_complete to commit_exit.
This conversion does change the timing of when job_completed is
called to after the bdrv_replace_node and bdrv_unref calls, which
could have implications for bjob->blk which will now be put down
after this cleanup.
Kevin highlights that we did not take any permissions for that backend
at job creation time, so it is safe to reorder these operations.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 20180830015734.19765-5-jsnow@redhat.com
Reviewed-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
block/commit.c | 22 +++++-----------------
1 file changed, 5 insertions(+), 17 deletions(-)
diff --git a/block/commit.c b/block/commit.c
index 4a17bb73ec..da69165de3 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -68,19 +68,13 @@ static int coroutine_fn commit_populate(BlockBackend *bs, BlockBackend *base,
return 0;
}
-typedef struct {
- int ret;
-} CommitCompleteData;
-
-static void commit_complete(Job *job, void *opaque)
+static void commit_exit(Job *job)
{
CommitBlockJob *s = container_of(job, CommitBlockJob, common.job);
BlockJob *bjob = &s->common;
- CommitCompleteData *data = opaque;
BlockDriverState *top = blk_bs(s->top);
BlockDriverState *base = blk_bs(s->base);
BlockDriverState *commit_top_bs = s->commit_top_bs;
- int ret = data->ret;
bool remove_commit_top_bs = false;
/* Make sure commit_top_bs and top stay around until bdrv_replace_node() */
@@ -91,10 +85,10 @@ static void commit_complete(Job *job, void *opaque)
* the normal backing chain can be restored. */
blk_unref(s->base);
- if (!job_is_cancelled(job) && ret == 0) {
+ if (!job_is_cancelled(job) && job->ret == 0) {
/* success */
- ret = bdrv_drop_intermediate(s->commit_top_bs, base,
- s->backing_file_str);
+ job->ret = bdrv_drop_intermediate(s->commit_top_bs, base,
+ s->backing_file_str);
} else {
/* XXX Can (or should) we somehow keep 'consistent read' blocked even
* after the failed/cancelled commit job is gone? If we already wrote
@@ -117,9 +111,6 @@ static void commit_complete(Job *job, void *opaque)
* bdrv_set_backing_hd() to fail. */
block_job_remove_all_bdrv(bjob);
- job_completed(job, ret);
- g_free(data);
-
/* If bdrv_drop_intermediate() didn't already do that, remove the commit
* filter driver from the backing chain. Do this as the final step so that
* the 'consistent read' permission can be granted. */
@@ -137,7 +128,6 @@ static void commit_complete(Job *job, void *opaque)
static int coroutine_fn commit_run(Job *job, Error **errp)
{
CommitBlockJob *s = container_of(job, CommitBlockJob, common.job);
- CommitCompleteData *data;
int64_t offset;
uint64_t delay_ns = 0;
int ret = 0;
@@ -210,9 +200,6 @@ static int coroutine_fn commit_run(Job *job, Error **errp)
out:
qemu_vfree(buf);
- data = g_malloc(sizeof(*data));
- data->ret = ret;
- job_defer_to_main_loop(&s->common.job, commit_complete, data);
return ret;
}
@@ -224,6 +211,7 @@ static const BlockJobDriver commit_job_driver = {
.user_resume = block_job_user_resume,
.drain = block_job_drain,
.run = commit_run,
+ .exit = commit_exit,
},
};
--
2.17.1
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 07/11] block/mirror: utilize job_exit shim
2018-08-31 14:24 [Qemu-devel] [PULL 00/11] Block patches Max Reitz
` (5 preceding siblings ...)
2018-08-31 14:24 ` [Qemu-devel] [PULL 06/11] block/commit: utilize job_exit shim Max Reitz
@ 2018-08-31 14:24 ` Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 08/11] jobs: " Max Reitz
` (4 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Max Reitz @ 2018-08-31 14:24 UTC (permalink / raw)
To: qemu-block; +Cc: qemu-devel, Max Reitz, Peter Maydell, Kevin Wolf
From: John Snow <jsnow@redhat.com>
Change the manual deferment to mirror_exit into the implicit
callback to job_exit and the mirror_exit callback.
This does change the order of some bdrv_unref calls and job_completed,
but thanks to the new context in which we call .exit, this is safe to
defer the possible flushing of any nodes to the job_finalize_single
cleanup stage.
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20180830015734.19765-6-jsnow@redhat.com
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
block/mirror.c | 29 +++++++++++------------------
1 file changed, 11 insertions(+), 18 deletions(-)
diff --git a/block/mirror.c b/block/mirror.c
index be5dc6b7b0..b8941db6c1 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -607,26 +607,22 @@ static void mirror_wait_for_all_io(MirrorBlockJob *s)
}
}
-typedef struct {
- int ret;
-} MirrorExitData;
-
-static void mirror_exit(Job *job, void *opaque)
+static void mirror_exit(Job *job)
{
MirrorBlockJob *s = container_of(job, MirrorBlockJob, common.job);
BlockJob *bjob = &s->common;
- MirrorExitData *data = opaque;
MirrorBDSOpaque *bs_opaque = s->mirror_top_bs->opaque;
AioContext *replace_aio_context = NULL;
BlockDriverState *src = s->mirror_top_bs->backing->bs;
BlockDriverState *target_bs = blk_bs(s->target);
BlockDriverState *mirror_top_bs = s->mirror_top_bs;
Error *local_err = NULL;
+ int ret = job->ret;
bdrv_release_dirty_bitmap(src, s->dirty_bitmap);
- /* Make sure that the source BDS doesn't go away before we called
- * job_completed(). */
+ /* Make sure that the source BDS doesn't go away during bdrv_replace_node,
+ * before we can call bdrv_drained_end */
bdrv_ref(src);
bdrv_ref(mirror_top_bs);
bdrv_ref(target_bs);
@@ -652,7 +648,7 @@ static void mirror_exit(Job *job, void *opaque)
bdrv_set_backing_hd(target_bs, backing, &local_err);
if (local_err) {
error_report_err(local_err);
- data->ret = -EPERM;
+ ret = -EPERM;
}
}
}
@@ -662,7 +658,7 @@ static void mirror_exit(Job *job, void *opaque)
aio_context_acquire(replace_aio_context);
}
- if (s->should_complete && data->ret == 0) {
+ if (s->should_complete && ret == 0) {
BlockDriverState *to_replace = src;
if (s->to_replace) {
to_replace = s->to_replace;
@@ -679,7 +675,7 @@ static void mirror_exit(Job *job, void *opaque)
bdrv_drained_end(target_bs);
if (local_err) {
error_report_err(local_err);
- data->ret = -EPERM;
+ ret = -EPERM;
}
}
if (s->to_replace) {
@@ -710,12 +706,12 @@ static void mirror_exit(Job *job, void *opaque)
blk_insert_bs(bjob->blk, mirror_top_bs, &error_abort);
bs_opaque->job = NULL;
- job_completed(job, data->ret);
- g_free(data);
bdrv_drained_end(src);
bdrv_unref(mirror_top_bs);
bdrv_unref(src);
+
+ job->ret = ret;
}
static void mirror_throttle(MirrorBlockJob *s)
@@ -815,7 +811,6 @@ static int mirror_flush(MirrorBlockJob *s)
static int coroutine_fn mirror_run(Job *job, Error **errp)
{
MirrorBlockJob *s = container_of(job, MirrorBlockJob, common.job);
- MirrorExitData *data;
BlockDriverState *bs = s->mirror_top_bs->backing->bs;
BlockDriverState *target_bs = blk_bs(s->target);
bool need_drain = true;
@@ -1035,14 +1030,10 @@ immediate_exit:
g_free(s->in_flight_bitmap);
bdrv_dirty_iter_free(s->dbi);
- data = g_malloc(sizeof(*data));
- data->ret = ret;
-
if (need_drain) {
bdrv_drained_begin(bs);
}
- job_defer_to_main_loop(&s->common.job, mirror_exit, data);
return ret;
}
@@ -1141,6 +1132,7 @@ static const BlockJobDriver mirror_job_driver = {
.user_resume = block_job_user_resume,
.drain = block_job_drain,
.run = mirror_run,
+ .exit = mirror_exit,
.pause = mirror_pause,
.complete = mirror_complete,
},
@@ -1157,6 +1149,7 @@ static const BlockJobDriver commit_active_job_driver = {
.user_resume = block_job_user_resume,
.drain = block_job_drain,
.run = mirror_run,
+ .exit = mirror_exit,
.pause = mirror_pause,
.complete = mirror_complete,
},
--
2.17.1
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 08/11] jobs: utilize job_exit shim
2018-08-31 14:24 [Qemu-devel] [PULL 00/11] Block patches Max Reitz
` (6 preceding siblings ...)
2018-08-31 14:24 ` [Qemu-devel] [PULL 07/11] block/mirror: " Max Reitz
@ 2018-08-31 14:24 ` Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 09/11] block/backup: make function variables consistently named Max Reitz
` (3 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Max Reitz @ 2018-08-31 14:24 UTC (permalink / raw)
To: qemu-block; +Cc: qemu-devel, Max Reitz, Peter Maydell, Kevin Wolf
From: John Snow <jsnow@redhat.com>
Utilize the job_exit shim by not calling job_defer_to_main_loop, and
where applicable, converting the deferred callback into the job_exit
callback.
This converts backup, stream, create, and the unit tests all at once.
Most of these jobs do not see any changes to the order in which they
clean up their resources, except the test-blockjob-txn test, which
now puts down its bs before job_completed is called.
This is safe for the same reason the reordering in the mirror job is
safe, because job_completed no longer runs under two locks, making
the unref safe even if it causes a flush.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 20180830015734.19765-7-jsnow@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
block/backup.c | 16 ----------------
block/create.c | 14 +++-----------
block/stream.c | 22 +++++++---------------
tests/test-bdrv-drain.c | 6 ------
tests/test-blockjob-txn.c | 11 ++---------
tests/test-blockjob.c | 10 ++++------
6 files changed, 16 insertions(+), 63 deletions(-)
diff --git a/block/backup.c b/block/backup.c
index 1e965d54e5..a67b7fa96b 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -380,18 +380,6 @@ static BlockErrorAction backup_error_action(BackupBlockJob *job,
}
}
-typedef struct {
- int ret;
-} BackupCompleteData;
-
-static void backup_complete(Job *job, void *opaque)
-{
- BackupCompleteData *data = opaque;
-
- job_completed(job, data->ret);
- g_free(data);
-}
-
static bool coroutine_fn yield_and_check(BackupBlockJob *job)
{
uint64_t delay_ns;
@@ -483,7 +471,6 @@ static void backup_incremental_init_copy_bitmap(BackupBlockJob *job)
static int coroutine_fn backup_run(Job *opaque_job, Error **errp)
{
BackupBlockJob *job = container_of(opaque_job, BackupBlockJob, common.job);
- BackupCompleteData *data;
BlockDriverState *bs = blk_bs(job->common.blk);
int64_t offset, nb_clusters;
int ret = 0;
@@ -584,9 +571,6 @@ static int coroutine_fn backup_run(Job *opaque_job, Error **errp)
qemu_co_rwlock_unlock(&job->flush_rwlock);
hbitmap_free(job->copy_bitmap);
- data = g_malloc(sizeof(*data));
- data->ret = ret;
- job_defer_to_main_loop(&job->common.job, backup_complete, data);
return ret;
}
diff --git a/block/create.c b/block/create.c
index 26a385c6c7..95341219ef 100644
--- a/block/create.c
+++ b/block/create.c
@@ -34,28 +34,20 @@ typedef struct BlockdevCreateJob {
Job common;
BlockDriver *drv;
BlockdevCreateOptions *opts;
- int ret;
} BlockdevCreateJob;
-static void blockdev_create_complete(Job *job, void *opaque)
-{
- BlockdevCreateJob *s = container_of(job, BlockdevCreateJob, common);
-
- job_completed(job, s->ret);
-}
-
static int coroutine_fn blockdev_create_run(Job *job, Error **errp)
{
BlockdevCreateJob *s = container_of(job, BlockdevCreateJob, common);
+ int ret;
job_progress_set_remaining(&s->common, 1);
- s->ret = s->drv->bdrv_co_create(s->opts, errp);
+ ret = s->drv->bdrv_co_create(s->opts, errp);
job_progress_update(&s->common, 1);
qapi_free_BlockdevCreateOptions(s->opts);
- job_defer_to_main_loop(&s->common, blockdev_create_complete, NULL);
- return s->ret;
+ return ret;
}
static const JobDriver blockdev_create_job_driver = {
diff --git a/block/stream.c b/block/stream.c
index 26a775386b..67e1e72e23 100644
--- a/block/stream.c
+++ b/block/stream.c
@@ -54,20 +54,16 @@ static int coroutine_fn stream_populate(BlockBackend *blk,
return blk_co_preadv(blk, offset, qiov.size, &qiov, BDRV_REQ_COPY_ON_READ);
}
-typedef struct {
- int ret;
-} StreamCompleteData;
-
-static void stream_complete(Job *job, void *opaque)
+static void stream_exit(Job *job)
{
StreamBlockJob *s = container_of(job, StreamBlockJob, common.job);
BlockJob *bjob = &s->common;
- StreamCompleteData *data = opaque;
BlockDriverState *bs = blk_bs(bjob->blk);
BlockDriverState *base = s->base;
Error *local_err = NULL;
+ int ret = job->ret;
- if (!job_is_cancelled(job) && bs->backing && data->ret == 0) {
+ if (!job_is_cancelled(job) && bs->backing && ret == 0) {
const char *base_id = NULL, *base_fmt = NULL;
if (base) {
base_id = s->backing_file_str;
@@ -75,11 +71,11 @@ static void stream_complete(Job *job, void *opaque)
base_fmt = base->drv->format_name;
}
}
- data->ret = bdrv_change_backing_file(bs, base_id, base_fmt);
+ ret = bdrv_change_backing_file(bs, base_id, base_fmt);
bdrv_set_backing_hd(bs, base, &local_err);
if (local_err) {
error_report_err(local_err);
- data->ret = -EPERM;
+ ret = -EPERM;
goto out;
}
}
@@ -93,14 +89,12 @@ out:
}
g_free(s->backing_file_str);
- job_completed(job, data->ret);
- g_free(data);
+ job->ret = ret;
}
static int coroutine_fn stream_run(Job *job, Error **errp)
{
StreamBlockJob *s = container_of(job, StreamBlockJob, common.job);
- StreamCompleteData *data;
BlockBackend *blk = s->common.blk;
BlockDriverState *bs = blk_bs(blk);
BlockDriverState *base = s->base;
@@ -203,9 +197,6 @@ static int coroutine_fn stream_run(Job *job, Error **errp)
out:
/* Modify backing chain and close BDSes in main loop */
- data = g_malloc(sizeof(*data));
- data->ret = ret;
- job_defer_to_main_loop(&s->common.job, stream_complete, data);
return ret;
}
@@ -215,6 +206,7 @@ static const BlockJobDriver stream_job_driver = {
.job_type = JOB_TYPE_STREAM,
.free = block_job_free,
.run = stream_run,
+ .exit = stream_exit,
.user_resume = block_job_user_resume,
.drain = block_job_drain,
},
diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c
index 6bda4451c1..89ac15e88a 100644
--- a/tests/test-bdrv-drain.c
+++ b/tests/test-bdrv-drain.c
@@ -752,11 +752,6 @@ typedef struct TestBlockJob {
bool should_complete;
} TestBlockJob;
-static void test_job_completed(Job *job, void *opaque)
-{
- job_completed(job, 0);
-}
-
static int coroutine_fn test_job_run(Job *job, Error **errp)
{
TestBlockJob *s = container_of(job, TestBlockJob, common.job);
@@ -770,7 +765,6 @@ static int coroutine_fn test_job_run(Job *job, Error **errp)
job_pause_point(&s->common.job);
}
- job_defer_to_main_loop(&s->common.job, test_job_completed, NULL);
return 0;
}
diff --git a/tests/test-blockjob-txn.c b/tests/test-blockjob-txn.c
index 82cedee78b..ef29f35e44 100644
--- a/tests/test-blockjob-txn.c
+++ b/tests/test-blockjob-txn.c
@@ -24,17 +24,11 @@ typedef struct {
int *result;
} TestBlockJob;
-static void test_block_job_complete(Job *job, void *opaque)
+static void test_block_job_exit(Job *job)
{
BlockJob *bjob = container_of(job, BlockJob, job);
BlockDriverState *bs = blk_bs(bjob->blk);
- int rc = (intptr_t)opaque;
- if (job_is_cancelled(job)) {
- rc = -ECANCELED;
- }
-
- job_completed(job, rc);
bdrv_unref(bs);
}
@@ -54,8 +48,6 @@ static int coroutine_fn test_block_job_run(Job *job, Error **errp)
}
}
- job_defer_to_main_loop(job, test_block_job_complete,
- (void *)(intptr_t)s->rc);
return s->rc;
}
@@ -81,6 +73,7 @@ static const BlockJobDriver test_block_job_driver = {
.user_resume = block_job_user_resume,
.drain = block_job_drain,
.run = test_block_job_run,
+ .exit = test_block_job_exit,
},
};
diff --git a/tests/test-blockjob.c b/tests/test-blockjob.c
index 408a226939..ad4a65bc78 100644
--- a/tests/test-blockjob.c
+++ b/tests/test-blockjob.c
@@ -163,11 +163,10 @@ typedef struct CancelJob {
bool completed;
} CancelJob;
-static void cancel_job_completed(Job *job, void *opaque)
+static void cancel_job_exit(Job *job)
{
- CancelJob *s = opaque;
+ CancelJob *s = container_of(job, CancelJob, common.job);
s->completed = true;
- job_completed(job, 0);
}
static void cancel_job_complete(Job *job, Error **errp)
@@ -182,7 +181,7 @@ static int coroutine_fn cancel_job_run(Job *job, Error **errp)
while (!s->should_complete) {
if (job_is_cancelled(&s->common.job)) {
- goto defer;
+ return 0;
}
if (!job_is_ready(&s->common.job) && s->should_converge) {
@@ -192,8 +191,6 @@ static int coroutine_fn cancel_job_run(Job *job, Error **errp)
job_sleep_ns(&s->common.job, 100000);
}
- defer:
- job_defer_to_main_loop(&s->common.job, cancel_job_completed, s);
return 0;
}
@@ -204,6 +201,7 @@ static const BlockJobDriver test_cancel_driver = {
.user_resume = block_job_user_resume,
.drain = block_job_drain,
.run = cancel_job_run,
+ .exit = cancel_job_exit,
.complete = cancel_job_complete,
},
};
--
2.17.1
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 09/11] block/backup: make function variables consistently named
2018-08-31 14:24 [Qemu-devel] [PULL 00/11] Block patches Max Reitz
` (7 preceding siblings ...)
2018-08-31 14:24 ` [Qemu-devel] [PULL 08/11] jobs: " Max Reitz
@ 2018-08-31 14:24 ` Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 10/11] jobs: remove ret argument to job_completed; privatize it Max Reitz
` (2 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Max Reitz @ 2018-08-31 14:24 UTC (permalink / raw)
To: qemu-block; +Cc: qemu-devel, Max Reitz, Peter Maydell, Kevin Wolf
From: John Snow <jsnow@redhat.com>
Rename opaque_job to job to be consistent with other job implementations.
Rename 'job', the BackupBlockJob object, to 's' to also be consistent.
Suggested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 20180830015734.19765-8-jsnow@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
block/backup.c | 62 +++++++++++++++++++++++++-------------------------
1 file changed, 31 insertions(+), 31 deletions(-)
diff --git a/block/backup.c b/block/backup.c
index a67b7fa96b..4d084f6ca6 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -468,59 +468,59 @@ static void backup_incremental_init_copy_bitmap(BackupBlockJob *job)
bdrv_dirty_iter_free(dbi);
}
-static int coroutine_fn backup_run(Job *opaque_job, Error **errp)
+static int coroutine_fn backup_run(Job *job, Error **errp)
{
- BackupBlockJob *job = container_of(opaque_job, BackupBlockJob, common.job);
- BlockDriverState *bs = blk_bs(job->common.blk);
+ BackupBlockJob *s = container_of(job, BackupBlockJob, common.job);
+ BlockDriverState *bs = blk_bs(s->common.blk);
int64_t offset, nb_clusters;
int ret = 0;
- QLIST_INIT(&job->inflight_reqs);
- qemu_co_rwlock_init(&job->flush_rwlock);
+ QLIST_INIT(&s->inflight_reqs);
+ qemu_co_rwlock_init(&s->flush_rwlock);
- nb_clusters = DIV_ROUND_UP(job->len, job->cluster_size);
- job_progress_set_remaining(&job->common.job, job->len);
+ nb_clusters = DIV_ROUND_UP(s->len, s->cluster_size);
+ job_progress_set_remaining(job, s->len);
- job->copy_bitmap = hbitmap_alloc(nb_clusters, 0);
- if (job->sync_mode == MIRROR_SYNC_MODE_INCREMENTAL) {
- backup_incremental_init_copy_bitmap(job);
+ s->copy_bitmap = hbitmap_alloc(nb_clusters, 0);
+ if (s->sync_mode == MIRROR_SYNC_MODE_INCREMENTAL) {
+ backup_incremental_init_copy_bitmap(s);
} else {
- hbitmap_set(job->copy_bitmap, 0, nb_clusters);
+ hbitmap_set(s->copy_bitmap, 0, nb_clusters);
}
- job->before_write.notify = backup_before_write_notify;
- bdrv_add_before_write_notifier(bs, &job->before_write);
+ s->before_write.notify = backup_before_write_notify;
+ bdrv_add_before_write_notifier(bs, &s->before_write);
- if (job->sync_mode == MIRROR_SYNC_MODE_NONE) {
+ if (s->sync_mode == MIRROR_SYNC_MODE_NONE) {
/* All bits are set in copy_bitmap to allow any cluster to be copied.
* This does not actually require them to be copied. */
- while (!job_is_cancelled(&job->common.job)) {
+ while (!job_is_cancelled(job)) {
/* Yield until the job is cancelled. We just let our before_write
* notify callback service CoW requests. */
- job_yield(&job->common.job);
+ job_yield(job);
}
- } else if (job->sync_mode == MIRROR_SYNC_MODE_INCREMENTAL) {
- ret = backup_run_incremental(job);
+ } else if (s->sync_mode == MIRROR_SYNC_MODE_INCREMENTAL) {
+ ret = backup_run_incremental(s);
} else {
/* Both FULL and TOP SYNC_MODE's require copying.. */
- for (offset = 0; offset < job->len;
- offset += job->cluster_size) {
+ for (offset = 0; offset < s->len;
+ offset += s->cluster_size) {
bool error_is_read;
int alloced = 0;
- if (yield_and_check(job)) {
+ if (yield_and_check(s)) {
break;
}
- if (job->sync_mode == MIRROR_SYNC_MODE_TOP) {
+ if (s->sync_mode == MIRROR_SYNC_MODE_TOP) {
int i;
int64_t n;
/* Check to see if these blocks are already in the
* backing file. */
- for (i = 0; i < job->cluster_size;) {
+ for (i = 0; i < s->cluster_size;) {
/* bdrv_is_allocated() only returns true/false based
* on the first set of sectors it comes across that
* are are all in the same state.
@@ -529,7 +529,7 @@ static int coroutine_fn backup_run(Job *opaque_job, Error **errp)
* needed but at some point that is always the case. */
alloced =
bdrv_is_allocated(bs, offset + i,
- job->cluster_size - i, &n);
+ s->cluster_size - i, &n);
i += n;
if (alloced || n == 0) {
@@ -547,29 +547,29 @@ static int coroutine_fn backup_run(Job *opaque_job, Error **errp)
if (alloced < 0) {
ret = alloced;
} else {
- ret = backup_do_cow(job, offset, job->cluster_size,
+ ret = backup_do_cow(s, offset, s->cluster_size,
&error_is_read, false);
}
if (ret < 0) {
/* Depending on error action, fail now or retry cluster */
BlockErrorAction action =
- backup_error_action(job, error_is_read, -ret);
+ backup_error_action(s, error_is_read, -ret);
if (action == BLOCK_ERROR_ACTION_REPORT) {
break;
} else {
- offset -= job->cluster_size;
+ offset -= s->cluster_size;
continue;
}
}
}
}
- notifier_with_return_remove(&job->before_write);
+ notifier_with_return_remove(&s->before_write);
/* wait until pending backup_do_cow() calls have completed */
- qemu_co_rwlock_wrlock(&job->flush_rwlock);
- qemu_co_rwlock_unlock(&job->flush_rwlock);
- hbitmap_free(job->copy_bitmap);
+ qemu_co_rwlock_wrlock(&s->flush_rwlock);
+ qemu_co_rwlock_unlock(&s->flush_rwlock);
+ hbitmap_free(s->copy_bitmap);
return ret;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 10/11] jobs: remove ret argument to job_completed; privatize it
2018-08-31 14:24 [Qemu-devel] [PULL 00/11] Block patches Max Reitz
` (8 preceding siblings ...)
2018-08-31 14:24 ` [Qemu-devel] [PULL 09/11] block/backup: make function variables consistently named Max Reitz
@ 2018-08-31 14:24 ` Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 11/11] jobs: remove job_defer_to_main_loop Max Reitz
2018-08-31 14:27 ` [Qemu-devel] [PULL 00/11] Block patches Max Reitz
11 siblings, 0 replies; 40+ messages in thread
From: Max Reitz @ 2018-08-31 14:24 UTC (permalink / raw)
To: qemu-block; +Cc: qemu-devel, Max Reitz, Peter Maydell, Kevin Wolf
From: John Snow <jsnow@redhat.com>
Jobs are now expected to return their retcode on the stack, from the
.run callback, so we can remove that argument.
job_cancel does not need to set -ECANCELED because job_completed will
update the return code itself if the job was canceled.
While we're here, make job_completed static to job.c and remove it from
job.h; move the documentation of return code to the .run() callback and
to the job->ret property, accordingly.
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20180830015734.19765-9-jsnow@redhat.com
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
include/qemu/job.h | 28 +++++++++++++++-------------
job.c | 11 ++++++-----
trace-events | 2 +-
3 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/include/qemu/job.h b/include/qemu/job.h
index 1144d671a1..23395c17fa 100644
--- a/include/qemu/job.h
+++ b/include/qemu/job.h
@@ -124,7 +124,11 @@ typedef struct Job {
/** Estimated progress_current value at the completion of the job */
int64_t progress_total;
- /** ret code passed to job_completed. */
+ /**
+ * Return code from @run and/or @prepare callback(s).
+ * Not final until the job has reached the CONCLUDED status.
+ * 0 on success, -errno on failure.
+ */
int ret;
/**
@@ -172,7 +176,16 @@ struct JobDriver {
/** Enum describing the operation */
JobType job_type;
- /** Mandatory: Entrypoint for the Coroutine. */
+ /**
+ * Mandatory: Entrypoint for the Coroutine.
+ *
+ * This callback will be invoked when moving from CREATED to RUNNING.
+ *
+ * If this callback returns nonzero, the job transaction it is part of is
+ * aborted. If it returns zero, the job moves into the WAITING state. If it
+ * is the last job to complete in its transaction, all jobs in the
+ * transaction move from WAITING to PENDING.
+ */
int coroutine_fn (*run)(Job *job, Error **errp);
/**
@@ -496,17 +509,6 @@ void job_early_fail(Job *job);
/** Moves the @job from RUNNING to READY */
void job_transition_to_ready(Job *job);
-/**
- * @job: The job being completed.
- * @ret: The status code.
- *
- * Marks @job as completed. If @ret is non-zero, the job transaction it is part
- * of is aborted. If @ret is zero, the job moves into the WAITING state. If it
- * is the last job to complete in its transaction, all jobs in the transaction
- * move from WAITING to PENDING.
- */
-void job_completed(Job *job, int ret);
-
/** Asynchronously complete the specified @job. */
void job_complete(Job *job, Error **errp);
diff --git a/job.c b/job.c
index 5df7791ad8..37d828f964 100644
--- a/job.c
+++ b/job.c
@@ -535,6 +535,8 @@ void job_drain(Job *job)
}
}
+static void job_completed(Job *job);
+
static void job_exit(void *opaque)
{
Job *job = (Job *)opaque;
@@ -545,7 +547,7 @@ static void job_exit(void *opaque)
job->driver->exit(job);
aio_context_release(aio_context);
}
- job_completed(job, job->ret);
+ job_completed(job);
}
/**
@@ -883,13 +885,12 @@ static void job_completed_txn_success(Job *job)
}
}
-void job_completed(Job *job, int ret)
+static void job_completed(Job *job)
{
assert(job && job->txn && !job_is_completed(job));
- job->ret = ret;
job_update_rc(job);
- trace_job_completed(job, ret, job->ret);
+ trace_job_completed(job, job->ret);
if (job->ret) {
job_completed_txn_abort(job);
} else {
@@ -905,7 +906,7 @@ void job_cancel(Job *job, bool force)
}
job_cancel_async(job, force);
if (!job_started(job)) {
- job_completed(job, -ECANCELED);
+ job_completed(job);
} else if (job->deferred_to_main_loop) {
job_completed_txn_abort(job);
} else {
diff --git a/trace-events b/trace-events
index c445f54773..4fd2cb4b97 100644
--- a/trace-events
+++ b/trace-events
@@ -107,7 +107,7 @@ gdbstub_err_checksum_incorrect(uint8_t expected, uint8_t got) "got command packe
# job.c
job_state_transition(void *job, int ret, const char *legal, const char *s0, const char *s1) "job %p (ret: %d) attempting %s transition (%s-->%s)"
job_apply_verb(void *job, const char *state, const char *verb, const char *legal) "job %p in state %s; applying verb %s (%s)"
-job_completed(void *job, int ret, int jret) "job %p ret %d corrected ret %d"
+job_completed(void *job, int ret) "job %p ret %d"
# job-qmp.c
qmp_job_cancel(void *job) "job %p"
--
2.17.1
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 11/11] jobs: remove job_defer_to_main_loop
2018-08-31 14:24 [Qemu-devel] [PULL 00/11] Block patches Max Reitz
` (9 preceding siblings ...)
2018-08-31 14:24 ` [Qemu-devel] [PULL 10/11] jobs: remove ret argument to job_completed; privatize it Max Reitz
@ 2018-08-31 14:24 ` Max Reitz
2018-08-31 14:27 ` [Qemu-devel] [PULL 00/11] Block patches Max Reitz
11 siblings, 0 replies; 40+ messages in thread
From: Max Reitz @ 2018-08-31 14:24 UTC (permalink / raw)
To: qemu-block; +Cc: qemu-devel, Max Reitz, Peter Maydell, Kevin Wolf
From: John Snow <jsnow@redhat.com>
Now that the job infrastructure is handling the job_completed call for
all implemented jobs, we can remove the interface that allowed jobs to
schedule their own completion.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 20180830015734.19765-10-jsnow@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
include/qemu/job.h | 17 -----------------
job.c | 40 ++--------------------------------------
2 files changed, 2 insertions(+), 55 deletions(-)
diff --git a/include/qemu/job.h b/include/qemu/job.h
index 23395c17fa..e0cff702b7 100644
--- a/include/qemu/job.h
+++ b/include/qemu/job.h
@@ -568,23 +568,6 @@ void job_finalize(Job *job, Error **errp);
*/
void job_dismiss(Job **job, Error **errp);
-typedef void JobDeferToMainLoopFn(Job *job, void *opaque);
-
-/**
- * @job: The job
- * @fn: The function to run in the main loop
- * @opaque: The opaque value that is passed to @fn
- *
- * This function must be called by the main job coroutine just before it
- * returns. @fn is executed in the main loop with the job AioContext acquired.
- *
- * Block jobs must call bdrv_unref(), bdrv_close(), and anything that uses
- * bdrv_drain_all() in the main loop.
- *
- * The @job AioContext is held while @fn executes.
- */
-void job_defer_to_main_loop(Job *job, JobDeferToMainLoopFn *fn, void *opaque);
-
/**
* Synchronously finishes the given @job. If @finish is given, it is called to
* trigger completion or cancellation of the job.
diff --git a/job.c b/job.c
index 37d828f964..b960e72710 100644
--- a/job.c
+++ b/job.c
@@ -561,12 +561,8 @@ static void coroutine_fn job_co_entry(void *opaque)
assert(job && job->driver && job->driver->run);
job_pause_point(job);
job->ret = job->driver->run(job, &job->err);
- if (!job->deferred_to_main_loop) {
- job->deferred_to_main_loop = true;
- aio_bh_schedule_oneshot(qemu_get_aio_context(),
- job_exit,
- job);
- }
+ job->deferred_to_main_loop = true;
+ aio_bh_schedule_oneshot(qemu_get_aio_context(), job_exit, job);
}
@@ -969,38 +965,6 @@ void job_complete(Job *job, Error **errp)
job->driver->complete(job, errp);
}
-
-typedef struct {
- Job *job;
- JobDeferToMainLoopFn *fn;
- void *opaque;
-} JobDeferToMainLoopData;
-
-static void job_defer_to_main_loop_bh(void *opaque)
-{
- JobDeferToMainLoopData *data = opaque;
- Job *job = data->job;
- AioContext *aio_context = job->aio_context;
-
- aio_context_acquire(aio_context);
- data->fn(data->job, data->opaque);
- aio_context_release(aio_context);
-
- g_free(data);
-}
-
-void job_defer_to_main_loop(Job *job, JobDeferToMainLoopFn *fn, void *opaque)
-{
- JobDeferToMainLoopData *data = g_malloc(sizeof(*data));
- data->job = job;
- data->fn = fn;
- data->opaque = opaque;
- job->deferred_to_main_loop = true;
-
- aio_bh_schedule_oneshot(qemu_get_aio_context(),
- job_defer_to_main_loop_bh, data);
-}
-
int job_finish_sync(Job *job, void (*finish)(Job *, Error **errp), Error **errp)
{
Error *local_err = NULL;
--
2.17.1
^ permalink raw reply related [flat|nested] 40+ messages in thread
* Re: [Qemu-devel] [PULL 00/11] Block patches
2018-08-31 14:24 [Qemu-devel] [PULL 00/11] Block patches Max Reitz
` (10 preceding siblings ...)
2018-08-31 14:24 ` [Qemu-devel] [PULL 11/11] jobs: remove job_defer_to_main_loop Max Reitz
@ 2018-08-31 14:27 ` Max Reitz
11 siblings, 0 replies; 40+ messages in thread
From: Max Reitz @ 2018-08-31 14:27 UTC (permalink / raw)
To: qemu-block; +Cc: qemu-devel, Peter Maydell, Kevin Wolf
[-- Attachment #1: Type: text/plain, Size: 961 bytes --]
On 2018-08-31 16:24, Max Reitz wrote:
> The following changes since commit 19b599f7664b2ebfd0f405fb79c14dd241557452:
>
> Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-08-27-v2' into staging (2018-08-27 16:44:20 +0100)
>
> are available in the Git repository at:
>
> https://git.xanclic.moe/XanClic/qemu.git tags/pull-block-2018-08-31
>
> for you to fetch changes up to 40954cc7831c4f95f9ce6402ae3d6761f44f31ff:
>
> jobs: remove job_defer_to_main_loop (2018-08-31 16:11:27 +0200)
>
> ----------------------------------------------------------------
> Block patches:
> - (Block) job exit refactoring, part 1
> (removing job_defer_to_main_loop())
> - Locking fix for the file-posix block driver
> - test-bdrv-drain leak fix
>
> ----------------------------------------------------------------
Self-NACK. Sorry, I don't quite know how the locking fix slipped in
there, but it shouldn't be here.
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Qemu-devel] [PULL 00/11] Block patches
@ 2019-05-07 15:18 Max Reitz
2019-05-09 8:49 ` Peter Maydell
0 siblings, 1 reply; 40+ messages in thread
From: Max Reitz @ 2019-05-07 15:18 UTC (permalink / raw)
To: qemu-block; +Cc: Kevin Wolf, Peter Maydell, qemu-devel, Max Reitz
The following changes since commit 19eb2d4e736dc895f31fbd6b520e514f10cc08e0:
Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2019-05-07 10:43:32 +0100)
are available in the Git repository at:
https://git.xanclic.moe/XanClic/qemu.git tags/pull-block-2019-05-07
for you to fetch changes up to 1278dce7927301bf3d004a40061dbd2c1e0846a8:
iotests: Fix iotests 110 and 126 (2019-05-07 17:14:21 +0200)
----------------------------------------------------------------
Block patches:
- Fixes to qcow2's implementation of qemu-img check
- Our SSH driver now supports bdrv_refresh_filename()
- Miscellaneous fixes
----------------------------------------------------------------
Alberto Garcia (2):
block: Assert that drv->bdrv_child_perm is set in bdrv_child_perm()
commit: Use bdrv_append() in commit_start()
Andrey Shinkevich (1):
qcow2: discard bitmap when removed
Max Reitz (3):
block/ssh: Implement .bdrv_refresh_filename()
block/ssh: Implement .bdrv_dirname()
iotests: Fix iotests 110 and 126
Vladimir Sementsov-Ogievskiy (5):
qcow2-refcount: fix check_oflag_copied
qcow2-refcount: avoid eating RAM
qcow2-refcount: check_refcounts_l2: reduce ignored overlaps
qcow2-refcount: check_refcounts_l2: don't count fixed cluster as
allocated
qcow2-refcount: don't mask corruptions under internal errors
block.c | 9 ++--
block/commit.c | 11 +----
block/qcow2-bitmap.c | 2 +-
block/qcow2-refcount.c | 80 ++++++++++++++++++++++-------------
block/ssh.c | 73 +++++++++++++++++++++++++++++---
tests/qemu-iotests/110 | 10 +++--
tests/qemu-iotests/126 | 10 +++--
tests/qemu-iotests/138 | 12 +++---
tests/qemu-iotests/138.out | 5 ++-
tests/qemu-iotests/207 | 10 ++---
tests/qemu-iotests/207.out | 10 ++---
tests/qemu-iotests/common.rc | 2 +-
tests/qemu-iotests/iotests.py | 2 +-
13 files changed, 159 insertions(+), 77 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [Qemu-devel] [PULL 00/11] Block patches
2019-05-07 15:18 Max Reitz
@ 2019-05-09 8:49 ` Peter Maydell
2019-05-09 13:27 ` Max Reitz
0 siblings, 1 reply; 40+ messages in thread
From: Peter Maydell @ 2019-05-09 8:49 UTC (permalink / raw)
To: Max Reitz; +Cc: Kevin Wolf, QEMU Developers, Qemu-block
On Tue, 7 May 2019 at 16:18, Max Reitz <mreitz@redhat.com> wrote:
>
> The following changes since commit 19eb2d4e736dc895f31fbd6b520e514f10cc08e0:
>
> Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2019-05-07 10:43:32 +0100)
>
> are available in the Git repository at:
>
> https://git.xanclic.moe/XanClic/qemu.git tags/pull-block-2019-05-07
>
> for you to fetch changes up to 1278dce7927301bf3d004a40061dbd2c1e0846a8:
>
> iotests: Fix iotests 110 and 126 (2019-05-07 17:14:21 +0200)
Attempting to fetch from this remote hangs:
$ git fetch -v xanclic
POST git-upload-pack (gzip 1798 to 966 bytes)
POST git-upload-pack (gzip 1798 to 965 bytes)
POST git-upload-pack (gzip 2648 to 1393 bytes)
POST git-upload-pack (gzip 4248 to 2201 bytes)
POST git-upload-pack (gzip 7498 to 3833 bytes)
POST git-upload-pack (gzip 13998 to 7092 bytes)
POST git-upload-pack (gzip 27648 to 13930 bytes)
POST git-upload-pack (gzip 55148 to 27782 bytes)
POST git-upload-pack (gzip 108948 to 54371 bytes)
POST git-upload-pack (gzip 215798 to 107233 bytes)
[no further output]
thanks
-- PMM
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [Qemu-devel] [PULL 00/11] Block patches
2019-05-09 8:49 ` Peter Maydell
@ 2019-05-09 13:27 ` Max Reitz
2019-05-09 16:17 ` Peter Maydell
0 siblings, 1 reply; 40+ messages in thread
From: Max Reitz @ 2019-05-09 13:27 UTC (permalink / raw)
To: Peter Maydell; +Cc: Kevin Wolf, QEMU Developers, Qemu-block
[-- Attachment #1: Type: text/plain, Size: 1441 bytes --]
On 09.05.19 10:49, Peter Maydell wrote:
> On Tue, 7 May 2019 at 16:18, Max Reitz <mreitz@redhat.com> wrote:
>>
>> The following changes since commit 19eb2d4e736dc895f31fbd6b520e514f10cc08e0:
>>
>> Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2019-05-07 10:43:32 +0100)
>>
>> are available in the Git repository at:
>>
>> https://git.xanclic.moe/XanClic/qemu.git tags/pull-block-2019-05-07
>>
>> for you to fetch changes up to 1278dce7927301bf3d004a40061dbd2c1e0846a8:
>>
>> iotests: Fix iotests 110 and 126 (2019-05-07 17:14:21 +0200)
>
> Attempting to fetch from this remote hangs:
>
> $ git fetch -v xanclic
> POST git-upload-pack (gzip 1798 to 966 bytes)
> POST git-upload-pack (gzip 1798 to 965 bytes)
> POST git-upload-pack (gzip 2648 to 1393 bytes)
> POST git-upload-pack (gzip 4248 to 2201 bytes)
> POST git-upload-pack (gzip 7498 to 3833 bytes)
> POST git-upload-pack (gzip 13998 to 7092 bytes)
> POST git-upload-pack (gzip 27648 to 13930 bytes)
> POST git-upload-pack (gzip 55148 to 27782 bytes)
> POST git-upload-pack (gzip 108948 to 54371 bytes)
> POST git-upload-pack (gzip 215798 to 107233 bytes)
> [no further output]
Hm, that's unfortunate. It works for me. (At least now.)
I've pushed the tag to Github:
https://github.com/XanClic/qemu.git tags/pull-block-2019-05-07
I hope that works better.
Sorry for the inconvenience,
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [Qemu-devel] [PULL 00/11] Block patches
2019-05-09 13:27 ` Max Reitz
@ 2019-05-09 16:17 ` Peter Maydell
0 siblings, 0 replies; 40+ messages in thread
From: Peter Maydell @ 2019-05-09 16:17 UTC (permalink / raw)
To: Max Reitz; +Cc: Kevin Wolf, QEMU Developers, Qemu-block
On Thu, 9 May 2019 at 14:27, Max Reitz <mreitz@redhat.com> wrote:
>
> On 09.05.19 10:49, Peter Maydell wrote:
> > On Tue, 7 May 2019 at 16:18, Max Reitz <mreitz@redhat.com> wrote:
> >>
> >> The following changes since commit 19eb2d4e736dc895f31fbd6b520e514f10cc08e0:
> >>
> >> Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2019-05-07 10:43:32 +0100)
> >>
> >> are available in the Git repository at:
> >>
> >> https://git.xanclic.moe/XanClic/qemu.git tags/pull-block-2019-05-07
> >>
> >> for you to fetch changes up to 1278dce7927301bf3d004a40061dbd2c1e0846a8:
> >>
> >> iotests: Fix iotests 110 and 126 (2019-05-07 17:14:21 +0200)
> >
> > Attempting to fetch from this remote hangs:
> >
> > $ git fetch -v xanclic
> > POST git-upload-pack (gzip 1798 to 966 bytes)
> > POST git-upload-pack (gzip 1798 to 965 bytes)
> > POST git-upload-pack (gzip 2648 to 1393 bytes)
> > POST git-upload-pack (gzip 4248 to 2201 bytes)
> > POST git-upload-pack (gzip 7498 to 3833 bytes)
> > POST git-upload-pack (gzip 13998 to 7092 bytes)
> > POST git-upload-pack (gzip 27648 to 13930 bytes)
> > POST git-upload-pack (gzip 55148 to 27782 bytes)
> > POST git-upload-pack (gzip 108948 to 54371 bytes)
> > POST git-upload-pack (gzip 215798 to 107233 bytes)
> > [no further output]
>
> Hm, that's unfortunate. It works for me. (At least now.)
>
> I've pushed the tag to Github:
>
> https://github.com/XanClic/qemu.git tags/pull-block-2019-05-07
>
> I hope that works better.
Yep, that worked fine: I've applied that.
Please update the changelog at https://wiki.qemu.org/ChangeLog/4.1
for any user-visible changes.
(Strace says that we seem to successfully connect to
the git.xanclic.moe server and do some talking to it,
but the first time the client issues a "fetch" command
the server never replies and the client is just blocked
in read().)
thanks
-- PMM
^ permalink raw reply [flat|nested] 40+ messages in thread
end of thread, other threads:[~2019-05-09 16:18 UTC | newest]
Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-31 14:24 [Qemu-devel] [PULL 00/11] Block patches Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 01/11] file-posix: Skip effectiveless OFD lock operations Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 02/11] tests: fix bdrv-drain leak Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 03/11] jobs: change start callback to run callback Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 04/11] jobs: canonize Error object Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 05/11] jobs: add exit shim Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 06/11] block/commit: utilize job_exit shim Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 07/11] block/mirror: " Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 08/11] jobs: " Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 09/11] block/backup: make function variables consistently named Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 10/11] jobs: remove ret argument to job_completed; privatize it Max Reitz
2018-08-31 14:24 ` [Qemu-devel] [PULL 11/11] jobs: remove job_defer_to_main_loop Max Reitz
2018-08-31 14:27 ` [Qemu-devel] [PULL 00/11] Block patches Max Reitz
-- strict thread matches above, loose matches on Subject: below --
2019-05-07 15:18 Max Reitz
2019-05-09 8:49 ` Peter Maydell
2019-05-09 13:27 ` Max Reitz
2019-05-09 16:17 ` Peter Maydell
2018-06-04 11:20 Stefan Hajnoczi
2018-06-05 9:38 ` Peter Maydell
2017-01-16 13:39 Stefan Hajnoczi
2017-01-17 13:53 ` Peter Maydell
2014-09-26 18:58 Kevin Wolf
2014-09-29 13:03 ` Peter Maydell
2014-02-14 17:29 Stefan Hajnoczi
2014-02-15 16:37 ` Peter Maydell
2013-09-20 17:42 Stefan Hajnoczi
2013-05-24 14:32 Stefan Hajnoczi
2013-06-17 21:18 ` Anthony Liguori
2013-04-26 11:44 Stefan Hajnoczi
2013-04-15 8:22 Stefan Hajnoczi
2012-09-14 12:39 Kevin Wolf
2012-09-17 18:19 ` Anthony Liguori
2012-09-18 17:49 ` Michael Tokarev
2012-09-19 8:42 ` Kevin Wolf
2012-08-10 16:47 Kevin Wolf
2012-08-12 18:14 ` Anthony Liguori
2011-04-27 13:42 Kevin Wolf
2011-04-27 14:26 ` Aurelien Jarno
2010-10-22 13:43 Kevin Wolf
2010-05-07 15:13 Kevin Wolf
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).