All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu-block@nongnu.org
Cc: fam@euphon.net, kwolf@redhat.com, vsementsov@virtuozzo.com,
	wencongyang2@huawei.com, xiechanglong.d@gmail.com,
	qemu-devel@nongnu.org, armbru@redhat.com, jsnow@redhat.com,
	stefanha@redhat.com, den@openvz.org, mreitz@redhat.com
Subject: [Qemu-devel] [PATCH v10 05/14] block/backup: fix block-comment style
Date: Fri, 30 Aug 2019 19:12:19 +0300	[thread overview]
Message-ID: <20190830161228.54238-6-vsementsov@virtuozzo.com> (raw)
In-Reply-To: <20190830161228.54238-1-vsementsov@virtuozzo.com>

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 <vsementsov@virtuozzo.com>
---
 block/backup.c | 35 +++++++++++++++++++++++------------
 1 file changed, 23 insertions(+), 12 deletions(-)

diff --git a/block/backup.c b/block/backup.c
index 002dee4d7f..7d1188e52a 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -205,8 +205,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,
@@ -251,8 +253,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,
@@ -323,7 +327,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,
@@ -566,7 +570,8 @@ static void backup_drain(BlockJob *job)
 {
     BackupBlockJob *s = container_of(job, BackupBlockJob, common);
 
-    /* Need to keep a reference in case blk_drain triggers execution
+    /*
+     * Need to keep a reference in case blk_drain triggers execution
      * of backup_complete...
      */
     if (s->bcs) {
@@ -597,8 +602,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);
@@ -697,11 +704,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



  parent reply	other threads:[~2019-08-30 16:33 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-30 16:12 [Qemu-devel] [PATCH v10 00/14] backup-top filter driver for backup Vladimir Sementsov-Ogievskiy
2019-08-30 16:12 ` [Qemu-devel] [PATCH v10 01/14] block/backup: fix backup_cow_with_offload for last cluster Vladimir Sementsov-Ogievskiy
2019-08-30 16:12 ` [Qemu-devel] [PATCH v10 02/14] block/backup: split shareable copying part from backup_do_cow Vladimir Sementsov-Ogievskiy
2019-09-09 12:19   ` Max Reitz
2019-08-30 16:12 ` [Qemu-devel] [PATCH v10 03/14] block/backup: improve comment about image fleecing Vladimir Sementsov-Ogievskiy
2019-09-09 12:23   ` Max Reitz
2019-08-30 16:12 ` [Qemu-devel] [PATCH v10 04/14] block/backup: introduce BlockCopyState Vladimir Sementsov-Ogievskiy
2019-09-09 12:59   ` Max Reitz
2019-09-09 14:12     ` Vladimir Sementsov-Ogievskiy
2019-09-09 14:24       ` Max Reitz
2019-09-09 15:11         ` Vladimir Sementsov-Ogievskiy
2019-09-10  7:42           ` Max Reitz
2019-09-10  8:12             ` Vladimir Sementsov-Ogievskiy
2019-09-10  8:39               ` Max Reitz
2019-09-10  9:22                 ` Vladimir Sementsov-Ogievskiy
2019-09-10 10:14                   ` Max Reitz
2019-09-10 10:18                     ` Vladimir Sementsov-Ogievskiy
2019-08-30 16:12 ` Vladimir Sementsov-Ogievskiy [this message]
2019-09-09 13:05   ` [Qemu-devel] [PATCH v10 05/14] block/backup: fix block-comment style Max Reitz
2019-08-30 16:12 ` [Qemu-devel] [PATCH v10 06/14] block: move block_copy from block/backup.c to separate file Vladimir Sementsov-Ogievskiy
2019-08-30 16:12 ` [Qemu-devel] [PATCH v10 07/14] block: teach bdrv_debug_breakpoint skip filters with backing Vladimir Sementsov-Ogievskiy
2019-08-30 16:12 ` [Qemu-devel] [PATCH v10 08/14] iotests: prepare 124 and 257 bitmap querying for backup-top filter Vladimir Sementsov-Ogievskiy
2019-09-09 13:25   ` Max Reitz
2019-09-09 13:49     ` Vladimir Sementsov-Ogievskiy
2019-09-09 14:14       ` Max Reitz
2019-08-30 16:12 ` [Qemu-devel] [PATCH v10 09/14] iotests: 257: drop unused Drive.device field Vladimir Sementsov-Ogievskiy
2019-08-30 16:12 ` [Qemu-devel] [PATCH v10 10/14] iotests: 257: drop device_add Vladimir Sementsov-Ogievskiy
2019-08-30 16:12 ` [Qemu-devel] [PATCH v10 11/14] block/io: refactor wait_serialising_requests Vladimir Sementsov-Ogievskiy
2019-08-30 16:12 ` [Qemu-devel] [PATCH v10 12/14] block: add lock/unlock range functions Vladimir Sementsov-Ogievskiy
2019-08-30 16:12 ` [Qemu-devel] [PATCH v10 13/14] block: introduce backup-top filter driver Vladimir Sementsov-Ogievskiy
2019-09-09 13:32   ` Max Reitz
2019-08-30 16:12 ` [Qemu-devel] [PATCH v10 14/14] block/backup: use backup-top instead of write notifiers Vladimir Sementsov-Ogievskiy
2019-09-09 13:44   ` Max Reitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190830161228.54238-6-vsementsov@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=armbru@redhat.com \
    --cc=den@openvz.org \
    --cc=fam@euphon.net \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=wencongyang2@huawei.com \
    --cc=xiechanglong.d@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.