From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id CD8C7670D0 for ; Tue, 25 Aug 2020 15:16:17 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id BCAB827646 for ; Tue, 25 Aug 2020 15:15:47 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 4746227629 for ; Tue, 25 Aug 2020 15:15:45 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 0D44844873 for ; Tue, 25 Aug 2020 15:15:45 +0200 (CEST) From: Stefan Reiter To: pve-devel@lists.proxmox.com Date: Tue, 25 Aug 2020 15:15:36 +0200 Message-Id: <20200825131538.26359-2-s.reiter@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200825131538.26359-1-s.reiter@proxmox.com> References: <20200825131538.26359-1-s.reiter@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.052 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [RFC v2 qemu 1/3] Revert "PVE-Backup: modify job api" X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2020 13:16:17 -0000 This reverts commit 640d758d467962e7e67b4aea867037f1304424af. Signed-off-by: Stefan Reiter --- Added in v2. Not necessary anymore with the transaction patches, the jobs are automatically created in "JOB_STATUS_CREATED" and not running, so the sequential transactions work without this as well. Removes even more custom patch code :) On applying to pve-qemu you can of course just remove the patch instead of applying the revert. block/backup.c | 3 --- block/replication.c | 2 +- blockdev.c | 3 +-- include/block/block_int.h | 1 - job.c | 2 +- 5 files changed, 3 insertions(+), 8 deletions(-) diff --git a/block/backup.c b/block/backup.c index 1bcc7faa32..cd42236b79 100644 --- a/block/backup.c +++ b/block/backup.c @@ -320,7 +320,6 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs, BlockdevOnError on_target_error, int creation_flags, BlockCompletionFunc *cb, void *opaque, - int pause_count, JobTxn *txn, Error **errp) { int64_t len, target_len; @@ -459,8 +458,6 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs, block_job_add_bdrv(&job->common, "target", target, 0, BLK_PERM_ALL, &error_abort); - job->common.job.pause_count += pause_count; - return &job->common; error: diff --git a/block/replication.c b/block/replication.c index 59270a0468..0c70215784 100644 --- a/block/replication.c +++ b/block/replication.c @@ -560,7 +560,7 @@ static void replication_start(ReplicationState *rs, ReplicationMode mode, 0, MIRROR_SYNC_MODE_NONE, NULL, 0, false, NULL, BLOCKDEV_ON_ERROR_REPORT, BLOCKDEV_ON_ERROR_REPORT, JOB_INTERNAL, - backup_job_completed, bs, 0, NULL, &local_err); + backup_job_completed, bs, NULL, &local_err); if (local_err) { error_propagate(errp, local_err); backup_job_cleanup(bs); diff --git a/blockdev.c b/blockdev.c index 1db0cbcad5..be87d65c02 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2833,8 +2833,7 @@ static BlockJob *do_backup_common(BackupCommon *backup, backup->filter_node_name, backup->on_source_error, backup->on_target_error, - job_flags, NULL, NULL, 0, txn, errp); - + job_flags, NULL, NULL, txn, errp); return job; } diff --git a/include/block/block_int.h b/include/block/block_int.h index befdae125b..279bd4ab61 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -1286,7 +1286,6 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs, BlockdevOnError on_target_error, int creation_flags, BlockCompletionFunc *cb, void *opaque, - int pause_count, JobTxn *txn, Error **errp); BdrvChild *bdrv_root_attach_child(BlockDriverState *child_bs, diff --git a/job.c b/job.c index bcbbb0be02..b8139c80a4 100644 --- a/job.c +++ b/job.c @@ -919,7 +919,7 @@ void job_start(Job *job) job->co = qemu_coroutine_create(job_co_entry, job); job->pause_count--; job->busy = true; - job->paused = job->pause_count > 0; + job->paused = false; job_state_transition(job, JOB_STATUS_RUNNING); aio_co_enter(job->aio_context, job->co); } -- 2.20.1