qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 4085f5: block: reintroduce bdrv_flush_all


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 4085f5: block: reintroduce bdrv_flush_all
Date: Tue, 04 Oct 2016 08:00:04 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 4085f5c7a239567a292876f46cb59d9b19bcf6ac
      
https://github.com/qemu/qemu/commit/4085f5c7a239567a292876f46cb59d9b19bcf6ac
  Author: John Snow <address@hidden>
  Date:   2016-09-29 (Thu, 29 Sep 2016)

  Changed paths:
    M block/io.c
    M include/block/block.h

  Log Message:
  -----------
  block: reintroduce bdrv_flush_all

Commit fe1a9cbc moved the flush_all routine from the bdrv layer to the
block-backend layer. In doing so, however, the semantics of the routine
changed slightly such that flush_all now used blk_flush instead of
bdrv_flush.

blk_flush can fail if the attached device model reports that it is not
"available," (i.e. the tray is open.) This changed the semantics of
flush_all such that it can now fail for e.g. open CDROM drives.

Reintroduce bdrv_flush_all to regain the old semantics without having to
alter the behavior of blk_flush or blk_flush_all, which are already
'doing the right thing.'

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Acked-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 22af08eacf6b5aa0e6c0581e547380b3eb4f95e9
      
https://github.com/qemu/qemu/commit/22af08eacf6b5aa0e6c0581e547380b3eb4f95e9
  Author: John Snow <address@hidden>
  Date:   2016-09-29 (Thu, 29 Sep 2016)

  Changed paths:
    M cpus.c

  Log Message:
  -----------
  qemu: use bdrv_flush_all for vm_stop et al

Reimplement bdrv_flush_all for vm_stop. In contrast to blk_flush_all,
bdrv_flush_all does not have device model restrictions. This allows
us to flush and halt unconditionally without error.

This allows us to do things like migrate when we have a device with
an open tray, but has a node that may need to be flushed, or nodes
that aren't currently attached to any device and need to be flushed.

Specifically, this allows us to migrate when we have a CDROM with
an open tray.

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Acked-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 49137bf6845eaecad51a047fc06dd11c56118460
      
https://github.com/qemu/qemu/commit/49137bf6845eaecad51a047fc06dd11c56118460
  Author: John Snow <address@hidden>
  Date:   2016-09-29 (Thu, 29 Sep 2016)

  Changed paths:
    M block/block-backend.c
    M hw/i386/xen/xen_platform.c
    M hw/ide/piix.c
    M include/sysemu/block-backend.h

  Log Message:
  -----------
  block-backend: remove blk_flush_all

We can teach Xen to drain and flush each device as it needs to, instead
of trying to flush ALL devices. This removes the last user of
blk_flush_all.

The function is therefore removed under the premise that any new uses
of blk_flush_all would be the wrong paradigm: either flush the single
device that requires flushing, or use an appropriate flush_all mechanism
from outside of the BlkBackend layer.

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Acked-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 24df38b00e23f76558ac12d7055c2df8d4b05150
      
https://github.com/qemu/qemu/commit/24df38b00e23f76558ac12d7055c2df8d4b05150
  Author: Kevin Wolf <address@hidden>
  Date:   2016-09-29 (Thu, 29 Sep 2016)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  block: Fix error path in qmp_blockdev_change_medium()

Commit 00949bab incorrectly changed one instance of &err into errp while
touching the line. Change it back.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>


  Commit: 0ffcdd9c06343a3fe0b2b3e1ca93ce8aa5366f98
      
https://github.com/qemu/qemu/commit/0ffcdd9c06343a3fe0b2b3e1ca93ce8aa5366f98
  Author: Kevin Wolf <address@hidden>
  Date:   2016-09-29 (Thu, 29 Sep 2016)

  Changed paths:
    M blockdev.c
    M tests/qemu-iotests/087.out

  Log Message:
  -----------
  block: Drop aio/cache consistency check from qmp_blockdev_add()

The TODO comment has been addressed a while ago and this is now checked
in raw-posix, so we don't have to special case this in blockdev-add any
more.

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


  Commit: 685552850bf29ef1cd4bef0e2629cbc3ebf0a23b
      
https://github.com/qemu/qemu/commit/685552850bf29ef1cd4bef0e2629cbc3ebf0a23b
  Author: Kevin Wolf <address@hidden>
  Date:   2016-09-29 (Thu, 29 Sep 2016)

  Changed paths:
    M qapi/block-core.json

  Log Message:
  -----------
  block/qapi: Use separate options type for curl driver

We're going to add an option to the file drivers which doesn't apply to
the curl drivers, so give them a separate option type.

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


  Commit: 0a4279d97c501254f6164b8abcd89055a11e2dc5
      
https://github.com/qemu/qemu/commit/0a4279d97c501254f6164b8abcd89055a11e2dc5
  Author: Kevin Wolf <address@hidden>
  Date:   2016-09-29 (Thu, 29 Sep 2016)

  Changed paths:
    M block/raw-posix.c
    M block/raw-win32.c
    M qapi/block-core.json
    M tests/qemu-iotests/087

  Log Message:
  -----------
  block/qapi: Move 'aio' option to file driver

The option whether or not to use a native AIO interface really isn't a
generic option for all drivers, but only applies to the native file
protocols. This patch moves the option in blockdev-add to the
appropriate places (raw-posix and raw-win32).

We still have to keep the flag BDRV_O_NATIVE_AIO for compatibility
because so far the AIO option was usually specified on the wrong layer
(the top-level format driver, which didn't even look at it) and then
inherited by the protocol driver (where it was actually used). We can't
forbid this use except in new interfaces.

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


  Commit: 692e01a27ccde4120f1371227d4011f668d67a76
      
https://github.com/qemu/qemu/commit/692e01a27ccde4120f1371227d4011f668d67a76
  Author: Kevin Wolf <address@hidden>
  Date:   2016-09-29 (Thu, 29 Sep 2016)

  Changed paths:
    M block.c
    M blockdev.c

  Log Message:
  -----------
  block: Parse 'detect-zeroes' in bdrv_open_common()

Amongst others, this means that you can now use the 'detect-zeroes'
option for non-top-level nodes in blockdev-add, like the QAPI schema
promises.

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


  Commit: b85114f8cfbede8b153db68875973ef0790bf296
      
https://github.com/qemu/qemu/commit/b85114f8cfbede8b153db68875973ef0790bf296
  Author: Kevin Wolf <address@hidden>
  Date:   2016-09-29 (Thu, 29 Sep 2016)

  Changed paths:
    M block/block-backend.c
    M blockdev.c
    M include/sysemu/block-backend.h

  Log Message:
  -----------
  block: Use 'detect-zeroes' option for 'blockdev-change-medium'

Instead of modifying the new BDS after it has been opened, use the newly
supported 'detect-zeroes' option in bdrv_open_common() so that all
requirements are checked (detect-zeroes=unmap requires discard=unmap).

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


  Commit: 818584a43ab0ef52c131865128ef110f867726cd
      
https://github.com/qemu/qemu/commit/818584a43ab0ef52c131865128ef110f867726cd
  Author: Kevin Wolf <address@hidden>
  Date:   2016-09-29 (Thu, 29 Sep 2016)

  Changed paths:
    M block.c
    M blockdev.c
    M include/block/block.h

  Log Message:
  -----------
  block: Move 'discard' option to bdrv_open_common()

This enables its use for nested child nodes. The compatibility
between the 'discard' and 'detect-zeroes' setting is checked in
bdrv_open_common() now as the former setting isn't available before
calling bdrv_open() any more.

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


  Commit: 74e1ae7c0b66d85d2b04c153ffdf6294e6a40798
      
https://github.com/qemu/qemu/commit/74e1ae7c0b66d85d2b04c153ffdf6294e6a40798
  Author: Kevin Wolf <address@hidden>
  Date:   2016-09-29 (Thu, 29 Sep 2016)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  block: Remove qemu_root_bds_opts

The remaining options in qemu_root_bds_opts (aio and copy-on-read)
aren't used any more, the QAPI schema doesn't contain them. Therefore
all the code processing qemu_root_bds_opts options is dead and can be
removed.

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


  Commit: 8737d9e0c4017aaa5ab1fcf1356c8ee4f7caf1df
      
https://github.com/qemu/qemu/commit/8737d9e0c4017aaa5ab1fcf1356c8ee4f7caf1df
  Author: Peter Lieven <address@hidden>
  Date:   2016-09-29 (Thu, 29 Sep 2016)

  Changed paths:
    M include/sysemu/os-posix.h
    M util/oslib-posix.c

  Log Message:
  -----------
  oslib-posix: add helpers for stack alloc and free

the allocated stack will be adjusted to the minimum supported stack size
by the OS and rounded up to be a multiple of the system pagesize.
Additionally an architecture dependent guard page is added to the stack
to catch stack overflows.

Signed-off-by: Peter Lieven <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: be87a393f9aed6f9406a728d4d55199aee0ebbb4
      
https://github.com/qemu/qemu/commit/be87a393f9aed6f9406a728d4d55199aee0ebbb4
  Author: Peter Lieven <address@hidden>
  Date:   2016-09-29 (Thu, 29 Sep 2016)

  Changed paths:
    M util/coroutine-sigaltstack.c

  Log Message:
  -----------
  coroutine-sigaltstack: rename coroutine struct appropriately

The name of the sigaltstack coroutine struct was misleading.

Signed-off-by: Peter Lieven <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 8adcd6fb6d14ff7fbb47179384dcddbd6dfd95a3
      
https://github.com/qemu/qemu/commit/8adcd6fb6d14ff7fbb47179384dcddbd6dfd95a3
  Author: Peter Lieven <address@hidden>
  Date:   2016-09-29 (Thu, 29 Sep 2016)

  Changed paths:
    M include/qemu/coroutine_int.h
    M util/coroutine-sigaltstack.c
    M util/coroutine-ucontext.c
    M util/coroutine-win32.c

  Log Message:
  -----------
  coroutine: add a macro for the coroutine stack size

Signed-off-by: Peter Lieven <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: ddba15919bd51b45d0d1425cc2de0c0c0bae3877
      
https://github.com/qemu/qemu/commit/ddba15919bd51b45d0d1425cc2de0c0c0bae3877
  Author: Peter Lieven <address@hidden>
  Date:   2016-09-29 (Thu, 29 Sep 2016)

  Changed paths:
    M util/coroutine-ucontext.c

  Log Message:
  -----------
  coroutine-ucontext: use helper for allocating stack memory

Signed-off-by: Peter Lieven <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 2f4aa2329945c741e10fd5b6631e99a4be25ea60
      
https://github.com/qemu/qemu/commit/2f4aa2329945c741e10fd5b6631e99a4be25ea60
  Author: Peter Lieven <address@hidden>
  Date:   2016-09-29 (Thu, 29 Sep 2016)

  Changed paths:
    M util/coroutine-sigaltstack.c

  Log Message:
  -----------
  coroutine-sigaltstack: use helper for allocating stack memory

Signed-off-by: Peter Lieven <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 7d992e4d5a95d0b21c6c33bd32cef8671805e39b
      
https://github.com/qemu/qemu/commit/7d992e4d5a95d0b21c6c33bd32cef8671805e39b
  Author: Peter Lieven <address@hidden>
  Date:   2016-09-29 (Thu, 29 Sep 2016)

  Changed paths:
    M configure
    M util/oslib-posix.c

  Log Message:
  -----------
  oslib-posix: add a configure switch to debug stack usage

this adds a knob to track the maximum stack usage of stacks
created by qemu_alloc_stack.

Signed-off-by: Peter Lieven <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: bbc4c3f4f3c624e2de64fdcb79f4dd8c1a508e9d
      
https://github.com/qemu/qemu/commit/bbc4c3f4f3c624e2de64fdcb79f4dd8c1a508e9d
  Author: Peter Maydell <address@hidden>
  Date:   2016-10-04 (Tue, 04 Oct 2016)

  Changed paths:
    M block.c
    M block/block-backend.c
    M block/io.c
    M block/raw-posix.c
    M block/raw-win32.c
    M blockdev.c
    M configure
    M cpus.c
    M hw/i386/xen/xen_platform.c
    M hw/ide/piix.c
    M include/block/block.h
    M include/qemu/coroutine_int.h
    M include/sysemu/block-backend.h
    M include/sysemu/os-posix.h
    M qapi/block-core.json
    M tests/qemu-iotests/087
    M tests/qemu-iotests/087.out
    M util/coroutine-sigaltstack.c
    M util/coroutine-ucontext.c
    M util/coroutine-win32.c
    M util/oslib-posix.c

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

Block layer patches

# gpg: Signature made Thu 29 Sep 2016 14:11:30 BST
# 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:
  oslib-posix: add a configure switch to debug stack usage
  coroutine-sigaltstack: use helper for allocating stack memory
  coroutine-ucontext: use helper for allocating stack memory
  coroutine: add a macro for the coroutine stack size
  coroutine-sigaltstack: rename coroutine struct appropriately
  oslib-posix: add helpers for stack alloc and free
  block: Remove qemu_root_bds_opts
  block: Move 'discard' option to bdrv_open_common()
  block: Use 'detect-zeroes' option for 'blockdev-change-medium'
  block: Parse 'detect-zeroes' in bdrv_open_common()
  block/qapi: Move 'aio' option to file driver
  block/qapi: Use separate options type for curl driver
  block: Drop aio/cache consistency check from qmp_blockdev_add()
  block: Fix error path in qmp_blockdev_change_medium()
  block-backend: remove blk_flush_all
  qemu: use bdrv_flush_all for vm_stop et al
  block: reintroduce bdrv_flush_all

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


Compare: https://github.com/qemu/qemu/compare/6e11eb2d2b96...bbc4c3f4f3c6

reply via email to

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