qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 4baaa8: qemu-img: fix in-flight count for qem


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 4baaa8: qemu-img: fix in-flight count for qemu-img bench
Date: Mon, 09 Jan 2017 08:00:03 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 4baaa8c3d891b57036fd2a7c6a890737793fe3a0
      
https://github.com/qemu/qemu/commit/4baaa8c3d891b57036fd2a7c6a890737793fe3a0
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-01-09 (Mon, 09 Jan 2017)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: fix in-flight count for qemu-img bench

With aio=native (qemu-img bench -n) one or more requests can be completed
when a new request is submitted.  This in turn can cause bench_cb to
recurse before b->in_flight is updated.  This causes multiple I/Os
to be submitted with the same offset and, furthermore, the blk_aio_*
coroutines are never freed and qemu-img aborts.

Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: John Snow <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 536fca7f7ea4913f71df7f420953e97619be74e1
      
https://github.com/qemu/qemu/commit/536fca7f7ea4913f71df7f420953e97619be74e1
  Author: Kevin Wolf <address@hidden>
  Date:   2017-01-09 (Mon, 09 Jan 2017)

  Changed paths:
    M include/qemu/coroutine.h
    M util/qemu-coroutine.c

  Log Message:
  -----------
  coroutine: Introduce qemu_coroutine_enter_if_inactive()

In the context of asynchronous work, if we have a worker coroutine that
didn't yield, the parent coroutine cannot be reentered because it hasn't
yielded yet. In this case we don't even have to reenter the parent
because it will see that the work is already done and won't even yield.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>


  Commit: 10c855196837059b5d988557183c8f8392033e52
      
https://github.com/qemu/qemu/commit/10c855196837059b5d988557183c8f8392033e52
  Author: Kevin Wolf <address@hidden>
  Date:   2017-01-09 (Mon, 09 Jan 2017)

  Changed paths:
    M block/quorum.c

  Log Message:
  -----------
  quorum: Remove s from quorum_aio_get() arguments

There is no point in passing the value of bs->opaque in order to
overwrite it with itself.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>


  Commit: ce15dc08ef13438ba7be75e6887162ad2cc5c6c9
      
https://github.com/qemu/qemu/commit/ce15dc08ef13438ba7be75e6887162ad2cc5c6c9
  Author: Kevin Wolf <address@hidden>
  Date:   2017-01-09 (Mon, 09 Jan 2017)

  Changed paths:
    M block/quorum.c

  Log Message:
  -----------
  quorum: Implement .bdrv_co_readv/writev

This converts the quorum block driver from implementing callback-based
interfaces for read/write to coroutine-based ones. This is the first
step that will allow us further simplification of the code.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>


  Commit: 0f31977d9dd659ae39aa42e3904c5c1b23da1475
      
https://github.com/qemu/qemu/commit/0f31977d9dd659ae39aa42e3904c5c1b23da1475
  Author: Kevin Wolf <address@hidden>
  Date:   2017-01-09 (Mon, 09 Jan 2017)

  Changed paths:
    M block/quorum.c

  Log Message:
  -----------
  quorum: Do cleanup in caller coroutine

Instead of calling quorum_aio_finalize() deeply nested in what used
to be an AIO callback, do it in the same functions that allocated the
AIOCB.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 7cd9b3964e2e8056c5863b6d9fd376bc0c1fcdf6
      
https://github.com/qemu/qemu/commit/7cd9b3964e2e8056c5863b6d9fd376bc0c1fcdf6
  Author: Kevin Wolf <address@hidden>
  Date:   2017-01-09 (Mon, 09 Jan 2017)

  Changed paths:
    M block/quorum.c

  Log Message:
  -----------
  quorum: Inline quorum_aio_cb()

This is a conversion to a more natural coroutine style and improves the
readability of the driver.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: dee66e2882e5b1fdf6184da7555e891b9057c944
      
https://github.com/qemu/qemu/commit/dee66e2882e5b1fdf6184da7555e891b9057c944
  Author: Kevin Wolf <address@hidden>
  Date:   2017-01-09 (Mon, 09 Jan 2017)

  Changed paths:
    M block/quorum.c

  Log Message:
  -----------
  quorum: Avoid bdrv_aio_writev() for rewrites

Replacing it with bdrv_co_pwritev() prepares us for byte granularity
requests and gets us rid of the last bdrv_aio_*() user in quorum.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 6847da380805c46e21162dac3e4b4123399769d0
      
https://github.com/qemu/qemu/commit/6847da380805c46e21162dac3e4b4123399769d0
  Author: Kevin Wolf <address@hidden>
  Date:   2017-01-09 (Mon, 09 Jan 2017)

  Changed paths:
    M block/quorum.c

  Log Message:
  -----------
  quorum: Implement .bdrv_co_preadv/pwritev()

This enables byte granularity requests on quorum nodes.

Note that the QMP events emitted by the driver are an external API that
we were careless enough to define as sector based. The offset and length
of requests reported in events are rounded therefore.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>


  Commit: a7e159025ed439011a47d56af5f34729bbb7247c
      
https://github.com/qemu/qemu/commit/a7e159025ed439011a47d56af5f34729bbb7247c
  Author: Kevin Wolf <address@hidden>
  Date:   2017-01-09 (Mon, 09 Jan 2017)

  Changed paths:
    M block/quorum.c

  Log Message:
  -----------
  quorum: Inline quorum_fifo_aio_cb()

Inlining the function removes some boilerplace code and replaces
recursion by a simple loop, so the code becomes somewhat easier to
understand.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 7c37f941d028e2a1bf350ffb292684f2e1a292c7
      
https://github.com/qemu/qemu/commit/7c37f941d028e2a1bf350ffb292684f2e1a292c7
  Author: Kevin Wolf <address@hidden>
  Date:   2017-01-09 (Mon, 09 Jan 2017)

  Changed paths:
    M block/quorum.c

  Log Message:
  -----------
  quorum: Clean up quorum_aio_get()

Make sure that all fields of the new QuorumAIOCB are zeroed when the
function returns even without explicitly setting them. This will protect
us when new fields are added, removes some explicit zero assignment and
makes the code a little nicer to read.

Suggested-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>


  Commit: 7c3a998531da0a77baaa2a6ccb48b8a7b5eb14d5
      
https://github.com/qemu/qemu/commit/7c3a998531da0a77baaa2a6ccb48b8a7b5eb14d5
  Author: Kevin Wolf <address@hidden>
  Date:   2017-01-09 (Mon, 09 Jan 2017)

  Changed paths:
    M block/blkdebug.c

  Log Message:
  -----------
  blkdebug: Implement bdrv_co_preadv/pwritev/flush

This enables byte granularity requests for blkdebug, and at the same
time gets us rid of another user of the BDS-level AIO emulation.

Note that unless align=512 is specified, this can behave subtly
different from the old behaviour because bdrv_co_preadv/pwritev don't
have to perform alignment adjustments any more.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 44b6789299a8acca3f25331bc411055cafc7bb06
      
https://github.com/qemu/qemu/commit/44b6789299a8acca3f25331bc411055cafc7bb06
  Author: Kevin Wolf <address@hidden>
  Date:   2017-01-09 (Mon, 09 Jan 2017)

  Changed paths:
    M block/blkverify.c
    M tests/qemu-iotests/071.out

  Log Message:
  -----------
  blkverify: Implement bdrv_co_preadv/pwritev/flush

This enables byte granularity requests for blkverify, and at the same
time gets us rid of another user of the BDS-level AIO emulation.

The reference output of a test case must be changed because the
verification failure message reports byte offsets instead of sectors
now.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 2e6fc7eb1a4af1b127df5f07b8bb28af891946fa
      
https://github.com/qemu/qemu/commit/2e6fc7eb1a4af1b127df5f07b8bb28af891946fa
  Author: Eric Blake <address@hidden>
  Date:   2017-01-09 (Mon, 09 Jan 2017)

  Changed paths:
    M MAINTAINERS
    M block/Makefile.objs
    A block/raw-format.c
    R block/raw_bsd.c

  Log Message:
  -----------
  block: Rename raw_bsd to raw-format.c

Given that we have raw-win32.c and raw-posix.c, my initial guess at
raw_bsd.c was that it was for dealing with raw files using code
specific to the BSD operating system (beyond what raw-posix could
do).  Not so - this name was chosen back in commit e1c66c6 to
distinguish that it was a BSD licensed file, in contrast to the
then-existing raw.c with an unclear and potentially unusable
license.  But since it has been more than three years since the
rewrite, it's time to pick a more useful name for this file to
avoid this type of confusion to future contributors that don't know
the backstory, as none of our other files are named solely by the
license they use.

In reality, this file deals with the raw format, which is useful
with any number of protocols, while raw-{win32,posix} deal with
the file protocol (and in turn, that protocol is not limited to
use with the raw format).  So rename raw_bsd to raw-format.c.  We
could have also used the shorter name raw.c, except that collides
with the earlier use of that filename for a different license,
and it's better to be safe than risk license pollution.

The next patch will also rename raw-win32.c and raw-posix.c to
further distinguish the difference in roles.

It doesn't hurt that this gets rid of an underscore in the filename,
thereby making tab-completion on 'ra<TAB>' easier (now I don't have
to type the shift key, which slows things down :)

Suggested-by: Daniel P. Berrange <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: c1bb86cd8ae67c14f79422b6e544d1e2bf40eeb2
      
https://github.com/qemu/qemu/commit/c1bb86cd8ae67c14f79422b6e544d1e2bf40eeb2
  Author: Eric Blake <address@hidden>
  Date:   2017-01-09 (Mon, 09 Jan 2017)

  Changed paths:
    M MAINTAINERS
    M block/Makefile.objs
    A block/file-posix.c
    A block/file-win32.c
    M block/gluster.c
    R block/raw-posix.c
    R block/raw-win32.c
    M block/trace-events
    M configure
    M include/block/block_int.h

  Log Message:
  -----------
  block: Rename raw-{posix,win32} to file-*.c

These files deal with the file protocol, not the raw format (the
file protocol is often used with other formats, and the raw
format is not forced to use the file protocol).  Rename things
to make it a bit easier to follow.

Suggested-by: Daniel P. Berrange <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: John Snow <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: dba5c337c83290d9559c171052c0a0de69fbab2f
      
https://github.com/qemu/qemu/commit/dba5c337c83290d9559c171052c0a0de69fbab2f
  Author: Peter Maydell <address@hidden>
  Date:   2017-01-09 (Mon, 09 Jan 2017)

  Changed paths:
    M MAINTAINERS
    M block/Makefile.objs
    M block/blkdebug.c
    M block/blkverify.c
    A block/file-posix.c
    A block/file-win32.c
    M block/gluster.c
    M block/quorum.c
    A block/raw-format.c
    R block/raw-posix.c
    R block/raw-win32.c
    R block/raw_bsd.c
    M block/trace-events
    M configure
    M include/block/block_int.h
    M include/qemu/coroutine.h
    M qemu-img.c
    M tests/qemu-iotests/071.out
    M util/qemu-coroutine.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging

Block layer patches

# gpg: Signature made Mon 09 Jan 2017 13:43:44 GMT
# gpg:                using RSA key 0x7F09B272C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>"
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* remotes/kevin/tags/for-upstream:
  block: Rename raw-{posix,win32} to file-*.c
  block: Rename raw_bsd to raw-format.c
  blkverify: Implement bdrv_co_preadv/pwritev/flush
  blkdebug: Implement bdrv_co_preadv/pwritev/flush
  quorum: Clean up quorum_aio_get()
  quorum: Inline quorum_fifo_aio_cb()
  quorum: Implement .bdrv_co_preadv/pwritev()
  quorum: Avoid bdrv_aio_writev() for rewrites
  quorum: Inline quorum_aio_cb()
  quorum: Do cleanup in caller coroutine
  quorum: Implement .bdrv_co_readv/writev
  quorum: Remove s from quorum_aio_get() arguments
  coroutine: Introduce qemu_coroutine_enter_if_inactive()
  qemu-img: fix in-flight count for qemu-img bench

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/8305f9bdf7ca...dba5c337c832

reply via email to

[Prev in Thread] Current Thread [Next in Thread]