Skip to contentSkip to conversation

block: Fix typos in comments (found by codespell)

PATCH Applied Stefan Weil 5 participants 5 messages Jul 12, 2018 – Jul 20, 2018 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: Fix typos in comments (found by codespell)

---
 block.c         | 2 +-
 block/backup.c  | 4 ++--
 block/curl.c    | 2 +-
 block/gluster.c | 2 +-
 block/vhdx.c    | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
block.c +1 -1
index a2fe05ea96..39f373e035 100644
@@ -3002,7 +3002,7 @@ BlockReopenQueue *bdrv_reopen_queue(BlockReopenQueue *bs_queue,
  *
  * Reopens all BDS specified in the queue, with the appropriate
  * flags.  All devices are prepared for reopen, and failure of any
- * device will cause all device changes to be abandonded, and intermediate
+ * device will cause all device changes to be abandoned, and intermediate
  * data cleaned up.
  *
  * If all devices prepare successfully, then the changes are committed
block/backup.c +2 -2
index 319fc922e8..8630d32926 100644
@@ -91,7 +91,7 @@ static void cow_request_end(CowRequest *req)
 }
 
 /* Copy range to target with a bounce buffer and return the bytes copied. If
- * error occured, return a negative error number */
+ * error occurred, return a negative error number */
 static int coroutine_fn backup_cow_with_bounce_buffer(BackupBlockJob *job,
                                                       int64_t start,
                                                       int64_t end,
@@ -148,7 +148,7 @@ fail:
 
 }
 
-/* Copy range to target and return the bytes copied. If error occured, return a
+/* Copy range to target and return the bytes copied. If error occurred, return a
  * negative error number. */
 static int coroutine_fn backup_cow_with_offload(BackupBlockJob *job,
                                                 int64_t start,
block/curl.c +1 -1
index aa42535783..229bb84a27 100644
@@ -804,7 +804,7 @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags,
     }
     /* Prior CURL 7.19.4 return value of 0 could mean that the file size is not
      * know or the size is zero. From 7.19.4 CURL returns -1 if size is not
-     * known and zero if it is realy zero-length file. */
+     * known and zero if it is really zero-length file. */
 #if LIBCURL_VERSION_NUM >= 0x071304
     if (d < 0) {
         pstrcpy(state->errmsg, CURL_ERROR_SIZE,
block/gluster.c +1 -1
index a4e1c8ecd8..4fd55a9cc5 100644
@@ -1326,7 +1326,7 @@ static int qemu_gluster_has_zero_init(BlockDriverState *bs)
  * If @start is in a trailing hole or beyond EOF, return -ENXIO.
  * If we can't find out, return a negative errno other than -ENXIO.
  *
- * (Shamefully copied from file-posix.c, only miniscule adaptions.)
+ * (Shamefully copied from file-posix.c, only minuscule adaptions.)
  */
 static int find_allocation(BlockDriverState *bs, off_t start,
                            off_t *data, off_t *hole)
block/vhdx.c +1 -1
index 4d0819750f..0795ca1985 100644
@@ -185,7 +185,7 @@ uint32_t vhdx_checksum_calc(uint32_t crc, uint8_t *buf, size_t size,
 /* Validates the checksum of the buffer, with an in-place CRC.
  *
  * Zero is substituted during crc calculation for the original crc field,
- * and the crc field is restored afterwards.  But the buffer will be modifed
+ * and the crc field is restored afterwards.  But the buffer will be modified
  * during the calculation, so this may not be not suitable for multi-threaded
  * use.
  *
Signature · 1 line
2.11.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 62 lines · Stefan Weil
---
 block.c         | 2 +-
 block/backup.c  | 4 ++--
 block/curl.c    | 2 +-
 block/gluster.c | 2 +-
 block/vhdx.c    | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
block.c +1 -1
index a2fe05ea96..39f373e035 100644
@@ -3002,7 +3002,7 @@ BlockReopenQueue *bdrv_reopen_queue(BlockReopenQueue *bs_queue,
  *
  * Reopens all BDS specified in the queue, with the appropriate
  * flags.  All devices are prepared for reopen, and failure of any
- * device will cause all device changes to be abandonded, and intermediate
+ * device will cause all device changes to be abandoned, and intermediate
  * data cleaned up.
  *
  * If all devices prepare successfully, then the changes are committed
block/backup.c +2 -2
index 319fc922e8..8630d32926 100644
@@ -91,7 +91,7 @@ static void cow_request_end(CowRequest *req)
 }
 
 /* Copy range to target with a bounce buffer and return the bytes copied. If
- * error occured, return a negative error number */
+ * error occurred, return a negative error number */
 static int coroutine_fn backup_cow_with_bounce_buffer(BackupBlockJob *job,
                                                       int64_t start,
                                                       int64_t end,
@@ -148,7 +148,7 @@ fail:
 
 }
 
-/* Copy range to target and return the bytes copied. If error occured, return a
+/* Copy range to target and return the bytes copied. If error occurred, return a
  * negative error number. */
 static int coroutine_fn backup_cow_with_offload(BackupBlockJob *job,
                                                 int64_t start,
block/curl.c +1 -1
index aa42535783..229bb84a27 100644
@@ -804,7 +804,7 @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags,
     }
     /* Prior CURL 7.19.4 return value of 0 could mean that the file size is not
      * know or the size is zero. From 7.19.4 CURL returns -1 if size is not
-     * known and zero if it is realy zero-length file. */
+     * known and zero if it is really zero-length file. */
 #if LIBCURL_VERSION_NUM >= 0x071304
     if (d < 0) {
         pstrcpy(state->errmsg, CURL_ERROR_SIZE,
block/gluster.c +0 -0
index a4e1c8ecd8..4fd55a9cc5 100644

block/gluster.c static int qemu_gluster_has_zero_init(BlockDriverState *bs) · line 1329

Quoted 5 lines
block/gluster.c +1 -1
@@ -1326,7 +1326,7 @@ static int qemu_gluster_has_zero_init(BlockDriverState *bs)
  * If @start is in a trailing hole or beyond EOF, return -ENXIO.
  * If we can't find out, return a negative errno other than -ENXIO.
  *
- * (Shamefully copied from file-posix.c, only miniscule adaptions.)
+ * (Shamefully copied from file-posix.c, only minuscule adaptions.)

Huh!

Merriam-Webster lists miniscule as a "disputed" spelling of minuscule. Dictionary.com simply lists it as an acceptable alternative.

Anyway, this is a change from something dubiously correct to something unambiguously correct, so it's fine.

(Learned something today.)

Quoted 9 lines
block/gluster.c +0 -0
  */
 static int find_allocation(BlockDriverState *bs, off_t start,
                            off_t *data, off_t *hole)
block/vhdx.c +0 -0
index 4d0819750f..0795ca1985 100644

block/vhdx.c uint32_t vhdx_checksum_calc(uint32_t crc, uint8_t *buf, size_t size, · line 191

Quoted 8 lines
block/vhdx.c +1 -1
@@ -185,7 +185,7 @@ uint32_t vhdx_checksum_calc(uint32_t crc, uint8_t *buf, size_t size,
 /* Validates the checksum of the buffer, with an in-place CRC.
  *
  * Zero is substituted during crc calculation for the original crc field,
- * and the crc field is restored afterwards.  But the buffer will be modifed
+ * and the crc field is restored afterwards.  But the buffer will be modified
  * during the calculation, so this may not be not suitable for multi-threaded
  * use.
  *

thanks!

#2 lore raw
Quoted 10 lines · John Snow

block/gluster.c static int qemu_gluster_has_zero_init(BlockDriverState *bs) · line 1329

Quoted 7 lines

+++ b/block/gluster.c

block/gluster.c +1 -1
@@ -1326,7 +1326,7 @@ static int qemu_gluster_has_zero_init(BlockDriverState *bs)
   * If @start is in a trailing hole or beyond EOF, return -ENXIO.
   * If we can't find out, return a negative errno other than -ENXIO.
   *
- * (Shamefully copied from file-posix.c, only miniscule adaptions.)
+ * (Shamefully copied from file-posix.c, only minuscule adaptions.)

Huh!

Quoted 5 lines

Merriam-Webster lists miniscule as a "disputed" spelling of minuscule. Dictionary.com simply lists it as an acceptable alternative.

Anyway, this is a change from something dubiously correct to something unambiguously correct, so it's fine.

While at it, I would s/adaptions/adaptations/

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
Reviewed-by on v1 1/1
#3 lore raw
In reply to Stefan Weil
Quoted 75 lines · Stefan Weil
---
 block.c         | 2 +-
 block/backup.c  | 4 ++--
 block/curl.c    | 2 +-
 block/gluster.c | 2 +-
 block/vhdx.c    | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
block.c +1 -1
index a2fe05ea96..39f373e035 100644
@@ -3002,7 +3002,7 @@ BlockReopenQueue *bdrv_reopen_queue(BlockReopenQueue *bs_queue,
  *
  * Reopens all BDS specified in the queue, with the appropriate
  * flags.  All devices are prepared for reopen, and failure of any
- * device will cause all device changes to be abandonded, and intermediate
+ * device will cause all device changes to be abandoned, and intermediate
  * data cleaned up.
  *
  * If all devices prepare successfully, then the changes are committed
block/backup.c +2 -2
index 319fc922e8..8630d32926 100644
@@ -91,7 +91,7 @@ static void cow_request_end(CowRequest *req)
 }
 
 /* Copy range to target with a bounce buffer and return the bytes copied. If
- * error occured, return a negative error number */
+ * error occurred, return a negative error number */
 static int coroutine_fn backup_cow_with_bounce_buffer(BackupBlockJob *job,
                                                       int64_t start,
                                                       int64_t end,
@@ -148,7 +148,7 @@ fail:
 
 }
 
-/* Copy range to target and return the bytes copied. If error occured, return a
+/* Copy range to target and return the bytes copied. If error occurred, return a
  * negative error number. */
 static int coroutine_fn backup_cow_with_offload(BackupBlockJob *job,
                                                 int64_t start,
block/curl.c +1 -1
index aa42535783..229bb84a27 100644
@@ -804,7 +804,7 @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags,
     }
     /* Prior CURL 7.19.4 return value of 0 could mean that the file size is not
      * know or the size is zero. From 7.19.4 CURL returns -1 if size is not
-     * known and zero if it is realy zero-length file. */
+     * known and zero if it is really zero-length file. */
 #if LIBCURL_VERSION_NUM >= 0x071304
     if (d < 0) {
         pstrcpy(state->errmsg, CURL_ERROR_SIZE,
block/gluster.c +1 -1
index a4e1c8ecd8..4fd55a9cc5 100644
@@ -1326,7 +1326,7 @@ static int qemu_gluster_has_zero_init(BlockDriverState *bs)
  * If @start is in a trailing hole or beyond EOF, return -ENXIO.
  * If we can't find out, return a negative errno other than -ENXIO.
  *
- * (Shamefully copied from file-posix.c, only miniscule adaptions.)
+ * (Shamefully copied from file-posix.c, only minuscule adaptions.)
  */
 static int find_allocation(BlockDriverState *bs, off_t start,
                            off_t *data, off_t *hole)
block/vhdx.c +0 -0
index 4d0819750f..0795ca1985 100644

block/vhdx.c uint32_t vhdx_checksum_calc(uint32_t crc, uint8_t *buf, size_t size, · line 188

Quoted 5 lines
block/vhdx.c +1 -1
@@ -185,7 +185,7 @@ uint32_t vhdx_checksum_calc(uint32_t crc, uint8_t *buf, size_t size,
 /* Validates the checksum of the buffer, with an in-place CRC.
  *
  * Zero is substituted during crc calculation for the original crc field,
- * and the crc field is restored afterwards.  But the buffer will be modifed
+ * and the crc field is restored afterwards.  But the buffer will be modified

Oops, that one was mine.

Quoted 6 lines
block/vhdx.c +0 -0
  * during the calculation, so this may not be not suitable for multi-threaded
  * use.
  *
Signature · 1 line
2.11.0