aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2018-09-19 15:43:43 +0300
committerKevin Wolf <kwolf@redhat.com>2018-12-14 11:52:40 +0100
commit3a75187fd878be685e38d94583aa14bb87b892e9 (patch)
treecf0f9ff3ebc4bcc02efbe2e82fbe3fec5abb8e29
parente4f9752c4a9c1b5d33bf6494aaff261b401933f2 (diff)
block/backup: drop unused synchronization interface
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--block/backup.c38
-rw-r--r--include/block/block_backup.h13
2 files changed, 7 insertions, 44 deletions
diff --git a/block/backup.c b/block/backup.c
index 4d084f6ca6..b829b251eb 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -28,6 +28,13 @@
#define BACKUP_CLUSTER_SIZE_DEFAULT (1 << 16)
+typedef struct CowRequest {
+ int64_t start_byte;
+ int64_t end_byte;
+ QLIST_ENTRY(CowRequest) list;
+ CoQueue wait_queue; /* coroutines blocked on this request */
+} CowRequest;
+
typedef struct BackupBlockJob {
BlockJob common;
BlockBackend *target;
@@ -322,37 +329,6 @@ void backup_do_checkpoint(BlockJob *job, Error **errp)
hbitmap_set(backup_job->copy_bitmap, 0, len);
}
-void backup_wait_for_overlapping_requests(BlockJob *job, int64_t offset,
- uint64_t bytes)
-{
- BackupBlockJob *backup_job = container_of(job, BackupBlockJob, common);
- int64_t start, end;
-
- assert(block_job_driver(job) == &backup_job_driver);
-
- start = QEMU_ALIGN_DOWN(offset, backup_job->cluster_size);
- end = QEMU_ALIGN_UP(offset + bytes, backup_job->cluster_size);
- wait_for_overlapping_requests(backup_job, start, end);
-}
-
-void backup_cow_request_begin(CowRequest *req, BlockJob *job,
- int64_t offset, uint64_t bytes)
-{
- BackupBlockJob *backup_job = container_of(job, BackupBlockJob, common);
- int64_t start, end;
-
- assert(block_job_driver(job) == &backup_job_driver);
-
- start = QEMU_ALIGN_DOWN(offset, backup_job->cluster_size);
- end = QEMU_ALIGN_UP(offset + bytes, backup_job->cluster_size);
- cow_request_begin(req, backup_job, start, end);
-}
-
-void backup_cow_request_end(CowRequest *req)
-{
- cow_request_end(req);
-}
-
static void backup_drain(BlockJob *job)
{
BackupBlockJob *s = container_of(job, BackupBlockJob, common);
diff --git a/include/block/block_backup.h b/include/block/block_backup.h
index 994a3bd2ec..157596c296 100644
--- a/include/block/block_backup.h
+++ b/include/block/block_backup.h
@@ -20,19 +20,6 @@
#include "block/block_int.h"
-typedef struct CowRequest {
- int64_t start_byte;
- int64_t end_byte;
- QLIST_ENTRY(CowRequest) list;
- CoQueue wait_queue; /* coroutines blocked on this request */
-} CowRequest;
-
-void backup_wait_for_overlapping_requests(BlockJob *job, int64_t offset,
- uint64_t bytes);
-void backup_cow_request_begin(CowRequest *req, BlockJob *job,
- int64_t offset, uint64_t bytes);
-void backup_cow_request_end(CowRequest *req);
-
void backup_do_checkpoint(BlockJob *job, Error **errp);
#endif