qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 252f40: job.c: add missing notifier initializ


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 252f40: job.c: add missing notifier initialization
Date: Wed, 29 Dec 2021 14:35:00 -0800

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 252f40913a87e1e89539a08b57e1740b3482906d
      
https://github.com/qemu/qemu/commit/252f40913a87e1e89539a08b57e1740b3482906d
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2021-12-28 (Tue, 28 Dec 2021)

  Changed paths:
    M job.c

  Log Message:
  -----------
  job.c: add missing notifier initialization

It seems that on_idle list is not properly initialized like
the other notifiers.

Fixes: 34dc97b9a0e ("blockjob: Wake up BDS when job becomes idle")
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>


  Commit: df9a31650505278e72c6b453f1679f66eac6e633
      
https://github.com/qemu/qemu/commit/df9a31650505278e72c6b453f1679f66eac6e633
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-12-28 (Tue, 28 Dec 2021)

  Changed paths:
    M blockdev.c
    M blockjob.c
    M include/block/blockjob.h
    M qemu-img.c

  Log Message:
  -----------
  blockjob: implement and use block_job_get_aio_context

We are going to drop BlockJob.blk. So let's retrieve block job context
from underlying job instead of main node.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Nikita Lapshin <nikita.lapshin@virtuozzo.com>


  Commit: 7ac68e2920d32bd164862a6bb7931bfd167f4234
      
https://github.com/qemu/qemu/commit/7ac68e2920d32bd164862a6bb7931bfd167f4234
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-12-28 (Tue, 28 Dec 2021)

  Changed paths:
    M tests/unit/test-blockjob-txn.c

  Log Message:
  -----------
  test-blockjob-txn: don't abuse job->blk

Here we use job->blk to drop our own reference in job cleanup. Let's do
simpler: drop our reference immediately after job creation.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Nikita Lapshin <nikita.lapshin@virtuozzo.com>


  Commit: 048954e2f6d4e88383186db2d223f3a42ddb61f7
      
https://github.com/qemu/qemu/commit/048954e2f6d4e88383186db2d223f3a42ddb61f7
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-12-28 (Tue, 28 Dec 2021)

  Changed paths:
    M block/stream.c

  Log Message:
  -----------
  block/stream: add own blk

block-stream is the only block-job, that reasonably use BlockJob.blk.
We are going to drop BlockJob.blk soon. So, let block-stream have own
blk.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Nikita Lapshin <nikita.lapshin@virtuozzo.com>


  Commit: 1b177bbea0b8725e627eb18eb60b8866cd8e1df6
      
https://github.com/qemu/qemu/commit/1b177bbea0b8725e627eb18eb60b8866cd8e1df6
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-12-28 (Tue, 28 Dec 2021)

  Changed paths:
    M tests/unit/test-bdrv-drain.c

  Log Message:
  -----------
  test-bdrv-drain: don't use BlockJob.blk

We are going to drop BlockJob.blk in further commit. For tests it's
enough to simply pass bs pointer.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Nikita Lapshin <nikita.lapshin@virtuozzo.com>


  Commit: 985cac8f200443ad952becc03b07c51ff4f80983
      
https://github.com/qemu/qemu/commit/985cac8f200443ad952becc03b07c51ff4f80983
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-12-28 (Tue, 28 Dec 2021)

  Changed paths:
    M block/mirror.c
    M blockjob.c
    M include/block/blockjob.h
    M tests/qemu-iotests/141.out
    M tests/qemu-iotests/283
    M tests/qemu-iotests/283.out

  Log Message:
  -----------
  blockjob: drop BlockJob.blk field

It's unused now (except for permission handling)[*]. The only reasonable
user of it was block-stream job, recently updated to use own blk. And
other block jobs prefer to use own source node related objects.

So, the arguments of dropping the field are:

 - block jobs prefer not to use it
 - block jobs usually has more then one node to operate on, and better
   to operate symmetrically (for example has both source and target
   blk's in specific block-job state structure)

*: BlockJob.blk is used to keep some permissions. We simply move
permissions to block-job child created in block_job_create() together
with blk.

In mirror, we just should not care anymore about restoring state of
blk. Most probably this code could be dropped long ago, after dropping
bs->job pointer. Now it finally goes away together with BlockJob.blk
itself.

iotest 141 output is updated, as "bdrv_has_blk(bs)" check in
qmp_blockdev_del() doesn't fail (we don't have blk now). Still, new
error message looks even better.

In iotest 283 we need to add a job id, otherwise "Invalid job ID"
happens now earlier than permission check (as permissions moved from
blk to block-job node).

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Nikita Lapshin <nikita.lapshin@virtuozzo.com>


  Commit: d5a9f352896fe43183ef01072b374e89a3488315
      
https://github.com/qemu/qemu/commit/d5a9f352896fe43183ef01072b374e89a3488315
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2021-12-29 (Wed, 29 Dec 2021)

  Changed paths:
    M block/mirror.c
    M block/stream.c
    M blockdev.c
    M blockjob.c
    M include/block/blockjob.h
    M job.c
    M qemu-img.c
    M tests/qemu-iotests/141.out
    M tests/qemu-iotests/283
    M tests/qemu-iotests/283.out
    M tests/unit/test-bdrv-drain.c
    M tests/unit/test-blockjob-txn.c

  Log Message:
  -----------
  Merge tag 'pull-jobs-2021-12-29' of 
https://src.openvz.org/scm/~vsementsov/qemu into staging

Jobs patches:
 - small fix of job_create()
 - refactoring: drop BlockJob.blk field

# gpg: Signature made Wed 29 Dec 2021 11:11:25 AM PST
# gpg:                using RSA key 8B9C26CDB2FD147C880E86A1561F24C1F19F79FB
# gpg: Good signature from "Vladimir Sementsov-Ogievskiy 
<vsementsov@virtuozzo.com>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 8B9C 26CD B2FD 147C 880E  86A1 561F 24C1 F19F 79FB

* tag 'pull-jobs-2021-12-29' of https://src.openvz.org/scm/~vsementsov/qemu:
  blockjob: drop BlockJob.blk field
  test-bdrv-drain: don't use BlockJob.blk
  block/stream: add own blk
  test-blockjob-txn: don't abuse job->blk
  blockjob: implement and use block_job_get_aio_context
  job.c: add missing notifier initialization

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/99423bc1c3c3...d5a9f352896f



reply via email to

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