qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] c16de8: block-backend: Refactor inactivate ch


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] c16de8: block-backend: Refactor inactivate check
Date: Wed, 23 Aug 2017 11:52:06 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: c16de8f59a2bcbe2dc037524cc648de896f581a4
      
https://github.com/qemu/qemu/commit/c16de8f59a2bcbe2dc037524cc648de896f581a4
  Author: Fam Zheng <address@hidden>
  Date:   2017-08-23 (Wed, 23 Aug 2017)

  Changed paths:
    M block/block-backend.c

  Log Message:
  -----------
  block-backend: Refactor inactivate check

The logic will be fixed (extended), move it to a separate function.

Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Eric Blake <address@hidden>


  Commit: ca2e214411598154d6b36ea70ba7900fbaeedc93
      
https://github.com/qemu/qemu/commit/ca2e214411598154d6b36ea70ba7900fbaeedc93
  Author: Fam Zheng <address@hidden>
  Date:   2017-08-23 (Wed, 23 Aug 2017)

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

  Log Message:
  -----------
  block-backend: Allow more "can inactivate" cases

These two conditions corresponds to mirror job's source and target,
which need to be allowed as they are part of the non-shared storage
migration workflow: failing to inactivate either will result in a
failure during migration completion.

Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
[eblake: improve comment grammar]
Signed-off-by: Eric Blake <address@hidden>


  Commit: 045a2f8254c64c4de32a8dc3671a93d4bfd04ee7
      
https://github.com/qemu/qemu/commit/045a2f8254c64c4de32a8dc3671a93d4bfd04ee7
  Author: Fam Zheng <address@hidden>
  Date:   2017-08-23 (Wed, 23 Aug 2017)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  mirror: Mark target BB as "force allow inactivate"

Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Eric Blake <address@hidden>


  Commit: 7d5b5261104235cd6cc86930ab0d0a7372bfe04b
      
https://github.com/qemu/qemu/commit/7d5b5261104235cd6cc86930ab0d0a7372bfe04b
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2017-08-23 (Wed, 23 Aug 2017)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Update open_flags after ->inactivate() callback

In the ->inactivate() callbacks, permissions are updated, which
typically involves a recursive check of the whole graph. Setting
BDRV_O_INACTIVE right before doing that creates a state that
bdrv_is_writable() returns false, which causes permission update
failure.

Reorder them so the flag is updated after calling the function. Note
that this doesn't break the assert in bdrv_child_cb_inactivate() because
for any specific BDS, we still update its flags first before calling
->inactivate() on it one level deeper in the recursion.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Tested-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Eric Blake <address@hidden>


  Commit: 12314f2d145c656f0a1f9aebcbe5e21be60c5ca5
      
https://github.com/qemu/qemu/commit/12314f2d145c656f0a1f9aebcbe5e21be60c5ca5
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2017-08-23 (Wed, 23 Aug 2017)

  Changed paths:
    A tests/qemu-iotests/194
    A tests/qemu-iotests/194.out
    M tests/qemu-iotests/group
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  qemu-iotests: add 194 non-shared storage migration test

Non-shared storage migration with NBD and drive-mirror is currently not
tested by qemu-iotests.  This test case covers the basic migration
scenario.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Based-on: <address@hidden>
Message-Id: <address@hidden>
Tested-by: Eric Blake <address@hidden>
Signed-off-by: Eric Blake <address@hidden>


  Commit: 40f4a21895b5a7eae4011593837069f63460d983
      
https://github.com/qemu/qemu/commit/40f4a21895b5a7eae4011593837069f63460d983
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2017-08-23 (Wed, 23 Aug 2017)

  Changed paths:
    M block/nbd-client.c
    M block/nbd-client.h

  Log Message:
  -----------
  nbd-client: avoid spurious qio_channel_yield() re-entry

The following scenario leads to an assertion failure in
qio_channel_yield():

1. Request coroutine calls qio_channel_yield() successfully when sending
   would block on the socket.  It is now yielded.
2. nbd_read_reply_entry() calls nbd_recv_coroutines_enter_all() because
   nbd_receive_reply() failed.
3. Request coroutine is entered and returns from qio_channel_yield().
   Note that the socket fd handler has not fired yet so
   ioc->write_coroutine is still set.
4. Request coroutine attempts to send the request body with nbd_rwv()
   but the socket would still block.  qio_channel_yield() is called
   again and assert(!ioc->write_coroutine) is hit.

The problem is that nbd_read_reply_entry() does not distinguish between
request coroutines that are waiting to receive a reply and those that
are not.

This patch adds a per-request bool receiving flag so
nbd_read_reply_entry() can avoid spurious aio_wake() calls.

Reported-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Tested-by: Eric Blake <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Eric Blake <address@hidden>


  Commit: 1eed33994e28d4a0437ba6e944bbc3ec5e4a29a0
      
https://github.com/qemu/qemu/commit/1eed33994e28d4a0437ba6e944bbc3ec5e4a29a0
  Author: Peter Maydell <address@hidden>
  Date:   2017-08-23 (Wed, 23 Aug 2017)

  Changed paths:
    M block.c
    M block/block-backend.c
    M block/mirror.c
    M block/nbd-client.c
    M block/nbd-client.h
    M include/sysemu/block-backend.h
    A tests/qemu-iotests/194
    A tests/qemu-iotests/194.out
    M tests/qemu-iotests/group
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2017-08-23' into 
staging

nbd patches for 2017-08-23

- Fam Zheng: 0/4 block: Fix non-shared storage migration
- Stefan Hajnoczi: qemu-iotests: add 194 non-shared storage migration test
- Stefan Hajnoczi: nbd-client: avoid spurious qio_channel_yield() re-entry

# gpg: Signature made Wed 23 Aug 2017 17:22:53 BST
# gpg:                using RSA key 0xA7A16B4A2527436A
# gpg: Good signature from "Eric Blake <address@hidden>"
# gpg:                 aka "Eric Blake (Free Software Programmer) 
<address@hidden>"
# gpg:                 aka "[jpeg image of size 6874]"
# Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2  F3AA A7A1 6B4A 2527 436A

* remotes/ericb/tags/pull-nbd-2017-08-23:
  nbd-client: avoid spurious qio_channel_yield() re-entry
  qemu-iotests: add 194 non-shared storage migration test
  block: Update open_flags after ->inactivate() callback
  mirror: Mark target BB as "force allow inactivate"
  block-backend: Allow more "can inactivate" cases
  block-backend: Refactor inactivate check

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


Compare: https://github.com/qemu/qemu/compare/3da2bd8c4a80...1eed33994e28

reply via email to

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