All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Cc: vsementsov@virtuozzo.com, jsnow@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH v2 3/4] mirror: Make sure that source and target size match
Date: Mon, 11 May 2020 17:32:18 +0200	[thread overview]
Message-ID: <7a748796-0744-59d6-fe15-8b4b21117b5a@redhat.com> (raw)
In-Reply-To: <20200511135825.219437-4-kwolf@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 891 bytes --]

On 11.05.20 15:58, Kevin Wolf wrote:
> If the target is shorter than the source, mirror would copy data until
> it reaches the end of the target and then fail with an I/O error when
> trying to write past the end.
> 
> If the target is longer than the source, the mirror job would complete
> successfully, but the target wouldn't actually be an accurate copy of
> the source image (it would contain some additional garbage at the end).
> 
> Fix this by checking that both images have the same size when the job
> starts.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> Message-Id: <20200507145228.323412-3-kwolf@redhat.com>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  block/mirror.c | 21 ++++++++++++---------
>  1 file changed, 12 insertions(+), 9 deletions(-)

Reviewed-by: Max Reitz <mreitz@redhat.com>


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-05-11 15:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 13:58 [PATCH v2 0/4] mirror: Make sure that source and target size match Kevin Wolf
2020-05-11 13:58 ` [PATCH v2 1/4] iotests/109: Don't mirror with mismatched size Kevin Wolf
2020-05-11 15:08   ` Max Reitz
2020-05-11 15:29     ` Kevin Wolf
2020-05-11 15:37       ` Max Reitz
2020-05-12 15:00   ` Vladimir Sementsov-Ogievskiy
2020-05-11 13:58 ` [PATCH v2 2/4] iotests/229: Use blkdebug to inject an error Kevin Wolf
2020-05-11 15:18   ` Max Reitz
2020-05-11 15:33     ` Kevin Wolf
2020-05-12 15:54   ` Vladimir Sementsov-Ogievskiy
2020-05-11 13:58 ` [PATCH v2 3/4] mirror: Make sure that source and target size match Kevin Wolf
2020-05-11 15:32   ` Max Reitz [this message]
2020-05-12 17:15   ` Vladimir Sementsov-Ogievskiy
2020-05-12 17:16     ` Vladimir Sementsov-Ogievskiy
2020-05-12 18:48     ` Kevin Wolf
2020-05-13 10:44       ` Vladimir Sementsov-Ogievskiy
2020-05-11 13:58 ` [PATCH v2 4/4] iotests: Mirror with different source/target size Kevin Wolf
2020-05-11 15:42   ` Max Reitz
2020-05-13 11:17   ` Vladimir Sementsov-Ogievskiy
2020-05-13 14:21     ` Kevin Wolf

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=7a748796-0744-59d6-fe15-8b4b21117b5a@redhat.com \
    --to=mreitz@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.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.