Skip to content
Snippets Groups Projects
  1. Dec 31, 2021
  2. Dec 30, 2021
  3. Dec 29, 2021
    • Richard Henderson's avatar
      Merge tag 'pull-jobs-2021-12-29' of https://src.openvz.org/scm/~vsementsov/qemu into staging · d5a9f352
      Richard Henderson authored
      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: default avatarRichard Henderson <richard.henderson@linaro.org>
      d5a9f352
  4. Dec 28, 2021
    • Vladimir Sementsov-Ogievskiy's avatar
      blockjob: drop BlockJob.blk field · 985cac8f
      Vladimir Sementsov-Ogievskiy authored
      
      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: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Reviewed-by: default avatarNikita Lapshin <nikita.lapshin@virtuozzo.com>
      985cac8f
Loading