qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] ddc411: block/mirror: honor ratelimit again


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] ddc411: block/mirror: honor ratelimit again
Date: Tue, 08 May 2018 09:54:37 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: ddc4115efdfa6619689fe18871aa2d37890b3463
      
https://github.com/qemu/qemu/commit/ddc4115efdfa6619689fe18871aa2d37890b3463
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2018-05-08 (Tue, 08 May 2018)

  Changed paths:
    M block/mirror.c
    M tests/qemu-iotests/185.out

  Log Message:
  -----------
  block/mirror: honor ratelimit again

Commit b76e4458b1eb3c32e9824fe6aa51f67d2b251748 ("block/mirror: change
the semantic of 'force' of block-job-cancel") accidentally removed the
ratelimit in the mirror job.

Reintroduce the ratelimit but keep the block-job-cancel force=true
behavior that was added in commit
b76e4458b1eb3c32e9824fe6aa51f67d2b251748.

Note that block_job_sleep_ns() returns immediately when the job is
cancelled.  Therefore it's safe to unconditionally call
block_job_sleep_ns() - a cancelled job does not sleep.

This commit fixes the non-deterministic qemu-iotests 185 output.  The
test relies on the ratelimit to make the job sleep until the 'quit'
command is processed.  Previously the job could complete before the
'quit' command was received since there was no ratelimit.

Cc: Liang Li <address@hidden>
Cc: Jeff Cody <address@hidden>
Cc: Kevin Wolf <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Jeff Cody <address@hidden>


  Commit: eb36639f7bbc16055e551593b81365e8ae3b0b05
      
https://github.com/qemu/qemu/commit/eb36639f7bbc16055e551593b81365e8ae3b0b05
  Author: Max Reitz <address@hidden>
  Date:   2018-05-08 (Tue, 08 May 2018)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  block/mirror: Make cancel always cancel pre-READY

Commit b76e4458b1eb3c32e9824fe6aa51f67d2b251748 made the mirror block
job respect block-job-cancel's @force flag: With that flag set, it would
now always really cancel, even post-READY.

Unfortunately, it had a side effect: Without that flag set, it would now
never cancel, not even before READY.  Considering that is an
incompatible change and not noted anywhere in the commit or the
description of block-job-cancel's @force parameter, this seems
unintentional and we should revert to the previous behavior, which is to
immediately cancel the job when block-job-cancel is called before source
and target are in sync (i.e. before the READY event).

Cc: address@hidden
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1572856
Reported-by: Yanan Fu <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Reviewed-by: Jeff Cody <address@hidden>
Signed-off-by: Jeff Cody <address@hidden>


  Commit: dc885fff972c447f51572afc4c921a26b880731b
      
https://github.com/qemu/qemu/commit/dc885fff972c447f51572afc4c921a26b880731b
  Author: Max Reitz <address@hidden>
  Date:   2018-05-08 (Tue, 08 May 2018)

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

  Log Message:
  -----------
  iotests: Add test for cancelling a mirror job

We already have an extensive mirror test (041) which does cover
cancelling a mirror job, especially after it has emitted the READY
event.  However, it does not check what exact events are emitted after
block-job-cancel is executed.  More importantly, it does not use
throttling to ensure that it covers the case of block-job-cancel before
READY.

It would be possible to add this case to 041, but considering it is
already our largest test file, it makes sense to create a new file for
these cases.

Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Jeff Cody <address@hidden>


  Commit: a2cb9239b7610ffb00f9ced5cd7640d40b0e1ccf
      
https://github.com/qemu/qemu/commit/a2cb9239b7610ffb00f9ced5cd7640d40b0e1ccf
  Author: Kevin Wolf <address@hidden>
  Date:   2018-05-08 (Tue, 08 May 2018)

  Changed paths:
    M block/sheepdog.c

  Log Message:
  -----------
  sheepdog: Fix sd_co_create_opts() memory leaks

Both the option string for the 'redundancy' option and the
SheepdogRedundancy object that is created accordingly could be leaked in
error paths. This fixes the memory leaks.

Reported by Coverity (CID 1390614 and 1390641).

Signed-off-by: Kevin Wolf <address@hidden>
Message-id: address@hidden
Reviewed-by: Jeff Cody <address@hidden>
Signed-off-by: Jeff Cody <address@hidden>


  Commit: e5cd695266c5709308aa95b1baae499e4b5d4544
      
https://github.com/qemu/qemu/commit/e5cd695266c5709308aa95b1baae499e4b5d4544
  Author: Peter Maydell <address@hidden>
  Date:   2018-05-08 (Tue, 08 May 2018)

  Changed paths:
    M block/mirror.c
    M block/sheepdog.c
    M tests/qemu-iotests/185.out
    A tests/qemu-iotests/218
    A tests/qemu-iotests/218.out
    M tests/qemu-iotests/group

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into 
staging

# gpg: Signature made Tue 08 May 2018 16:18:22 BST
# gpg:                using RSA key BDBE7B27C0DE3057
# gpg: Good signature from "Jeffrey Cody <address@hidden>"
# gpg:                 aka "Jeffrey Cody <address@hidden>"
# gpg:                 aka "Jeffrey Cody <address@hidden>"
# Primary key fingerprint: 9957 4B4D 3474 90E7 9D98  D624 BDBE 7B27 C0DE 3057

* remotes/cody/tags/block-pull-request:
  sheepdog: Fix sd_co_create_opts() memory leaks
  iotests: Add test for cancelling a mirror job
  block/mirror: Make cancel always cancel pre-READY
  block/mirror: honor ratelimit again

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


Compare: https://github.com/qemu/qemu/compare/cc8f8ba754bb...e5cd695266c5
      **NOTE:** This service been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

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