[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/7] commit: Remove unused bytes_written
From: |
Kevin Wolf |
Subject: |
[PATCH 2/7] commit: Remove unused bytes_written |
Date: |
Fri, 14 Feb 2020 21:08:07 +0100 |
The bytes_written variable is only ever written to, it serves no
purpose. This has actually been the case since the commit job was first
introduced in commit 747ff602636.
Signed-off-by: Kevin Wolf <address@hidden>
---
block/commit.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/block/commit.c b/block/commit.c
index 23c90b3b91..cce898a4f3 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -140,7 +140,6 @@ static int coroutine_fn commit_run(Job *job, Error **errp)
int ret = 0;
int64_t n = 0; /* bytes */
void *buf = NULL;
- int bytes_written = 0;
int64_t len, base_len;
ret = len = blk_getlength(s->top);
@@ -180,7 +179,6 @@ static int coroutine_fn commit_run(Job *job, Error **errp)
trace_commit_one_iteration(s, offset, n, ret);
if (copy) {
ret = commit_populate(s->top, s->base, offset, n, buf);
- bytes_written += n;
}
if (ret < 0) {
BlockErrorAction action =
--
2.20.1
- [PATCH 0/7] commit: Expose on-error option in QMP, Kevin Wolf, 2020/02/14
- [PATCH 1/7] qapi: Document meaning of 'ignore' BlockdevOnError for jobs, Kevin Wolf, 2020/02/14
- [PATCH 2/7] commit: Remove unused bytes_written,
Kevin Wolf <=
- [PATCH 3/7] commit: Fix argument order for block_job_error_action(), Kevin Wolf, 2020/02/14
- [PATCH 4/7] commit: Inline commit_populate(), Kevin Wolf, 2020/02/14
- [PATCH 5/7] commit: Fix is_read for block_job_error_action(), Kevin Wolf, 2020/02/14
- [PATCH 6/7] commit: Expose on-error option in QMP, Kevin Wolf, 2020/02/14
- [PATCH 7/7] iotests: Test error handling policies with block-commit, Kevin Wolf, 2020/02/14