[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v11 05/14] block/backup: fix block-comment style
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[Qemu-block] [PATCH v11 05/14] block/backup: fix block-comment style |
Date: |
Tue, 10 Sep 2019 13:23:23 +0300 |
We need to fix comment style around block-copy functions before further
moving them to separate file to satisfy checkpatch. But do more: fix
all comments style. Also, seems like doubled first asterisk is not
forbidden, but drop it too for consistency.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
---
block/backup.c | 32 +++++++++++++++++++++-----------
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/block/backup.c b/block/backup.c
index e5bcfe7177..7a99ff14aa 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -214,8 +214,10 @@ fail:
return NULL;
}
-/* Copy range to target with a bounce buffer and return the bytes copied. If
- * error occurred, return a negative error number */
+/*
+ * Copy range to target with a bounce buffer and return the bytes copied. If
+ * error occurred, return a negative error number
+ */
static int coroutine_fn block_copy_with_bounce_buffer(BlockCopyState *s,
int64_t start,
int64_t end,
@@ -260,8 +262,10 @@ fail:
}
-/* Copy range to target and return the bytes copied. If error occurred, return
a
- * negative error number. */
+/*
+ * Copy range to target and return the bytes copied. If error occurred, return
a
+ * negative error number.
+ */
static int coroutine_fn block_copy_with_offload(BlockCopyState *s,
int64_t start,
int64_t end,
@@ -332,7 +336,7 @@ static int block_copy_is_cluster_allocated(BlockCopyState
*s, int64_t offset,
}
}
-/**
+/*
* Reset bits in copy_bitmap starting at offset if they represent unallocated
* data in the image. May reset subsequent contiguous bits.
* @return 0 when the cluster at @offset was unallocated,
@@ -583,8 +587,10 @@ static bool coroutine_fn yield_and_check(BackupBlockJob
*job)
return true;
}
- /* We need to yield even for delay_ns = 0 so that bdrv_drain_all() can
- * return. Without a yield, the VM would not reboot. */
+ /*
+ * We need to yield even for delay_ns = 0 so that bdrv_drain_all() can
+ * return. Without a yield, the VM would not reboot.
+ */
delay_ns = block_job_ratelimit_get_delay(&job->common, job->bytes_read);
job->bytes_read = 0;
job_sleep_ns(&job->common.job, delay_ns);
@@ -683,11 +689,15 @@ static int coroutine_fn backup_run(Job *job, Error **errp)
}
if (s->sync_mode == MIRROR_SYNC_MODE_NONE) {
- /* All bits are set in copy_bitmap to allow any cluster to be copied.
- * This does not actually require them to be copied. */
+ /*
+ * All bits are set in copy_bitmap to allow any cluster to be copied.
+ * This does not actually require them to be copied.
+ */
while (!job_is_cancelled(job)) {
- /* Yield until the job is cancelled. We just let our before_write
- * notify callback service CoW requests. */
+ /*
+ * Yield until the job is cancelled. We just let our before_write
+ * notify callback service CoW requests.
+ */
job_yield(job);
}
} else {
--
2.18.0
- [Qemu-block] [PATCH v11 00/14] backup-top filter driver for backup, Vladimir Sementsov-Ogievskiy, 2019/09/10
- [Qemu-block] [PATCH v11 03/14] block/backup: improve comment about image fleecing, Vladimir Sementsov-Ogievskiy, 2019/09/10
- [Qemu-block] [PATCH v11 11/14] block/io: refactor wait_serialising_requests, Vladimir Sementsov-Ogievskiy, 2019/09/10
- [Qemu-block] [PATCH v11 09/14] iotests: 257: drop unused Drive.device field, Vladimir Sementsov-Ogievskiy, 2019/09/10
- [Qemu-block] [PATCH v11 02/14] block/backup: split shareable copying part from backup_do_cow, Vladimir Sementsov-Ogievskiy, 2019/09/10
- [Qemu-block] [PATCH v11 06/14] block: move block_copy from block/backup.c to separate file, Vladimir Sementsov-Ogievskiy, 2019/09/10
- [Qemu-block] [PATCH v11 07/14] block: teach bdrv_debug_breakpoint skip filters with backing, Vladimir Sementsov-Ogievskiy, 2019/09/10
- [Qemu-block] [PATCH v11 12/14] block: add lock/unlock range functions, Vladimir Sementsov-Ogievskiy, 2019/09/10
- [Qemu-block] [PATCH v11 01/14] block/backup: fix backup_cow_with_offload for last cluster, Vladimir Sementsov-Ogievskiy, 2019/09/10
- [Qemu-block] [PATCH v11 05/14] block/backup: fix block-comment style,
Vladimir Sementsov-Ogievskiy <=
- [Qemu-block] [PATCH v11 08/14] iotests: prepare 124 and 257 bitmap querying for backup-top filter, Vladimir Sementsov-Ogievskiy, 2019/09/10
- [Qemu-block] [PATCH v11 13/14] block: introduce backup-top filter driver, Vladimir Sementsov-Ogievskiy, 2019/09/10
- [Qemu-block] [PATCH v11 04/14] block/backup: introduce BlockCopyState, Vladimir Sementsov-Ogievskiy, 2019/09/10
- Re: [Qemu-block] [PATCH v11 04/14] block/backup: introduce BlockCopyState, Vladimir Sementsov-Ogievskiy, 2019/09/13
- Re: [PATCH v11 04/14] block/backup: introduce BlockCopyState, Max Reitz, 2019/09/20
- Re: [PATCH v11 04/14] block/backup: introduce BlockCopyState, Vladimir Sementsov-Ogievskiy, 2019/09/20
- Re: [PATCH v11 04/14] block/backup: introduce BlockCopyState, Vladimir Sementsov-Ogievskiy, 2019/09/20
- Re: [PATCH v11 04/14] block/backup: introduce BlockCopyState, Max Reitz, 2019/09/20
- Re: [PATCH v11 04/14] block/backup: introduce BlockCopyState, Vladimir Sementsov-Ogievskiy, 2019/09/20
[Qemu-block] [PATCH v11 10/14] iotests: 257: drop device_add, Vladimir Sementsov-Ogievskiy, 2019/09/10