From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v4 0/7] qemu-img: Add salvaging mode to convert
Date: Thu, 13 Jun 2019 21:52:37 +0200 [thread overview]
Message-ID: <01c11e01-8ddb-4281-72ad-9e9b30eafdeb@redhat.com> (raw)
In-Reply-To: <20190507203508.18026-1-mreitz@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 1990 bytes --]
On 07.05.19 22:35, Max Reitz wrote:
> Hi,
>
> This series adds a --salvage option to qemu-img convert. With this,
> qemu-img will not abort when it encounters an I/O error. Instead, it
> tries to narrow it down and will treat the affected sectors as being
> completely 0 (and print a warning).
>
> Testing this is not so easy, because while real I/O errors during read
> operations should be treated as described above, errors encountered
> during bdrv_block_status() should just be ignored and the affected
> sectors should be considered allocated. But blkdebug does not yet have
> a way to intercept this, and:
>
> (1) Just adding a new block-status event would be silly, because I don't
> want an event, I want it to fail on a certain kind of operation, on
> a certain sector range, independently of any events, so why can't we
> just do that? See patch 4.
>
> (2) If we just make blkdebug intercept .bdrv_co_block_status() like all
> other kinds of operations, at least iotest 041 fails, which does
> exactly that silly thing: It uses the read_aio event to wait for any
> read. But it turns out that there may be a bdrv_*block_status()
> call in between, so suddenly the wrong operation yields an error.
> As I said, the real fault here is that it does not really make sense
> to pray that the operation you want to fail is the one that is
> immediately executed after some event that you hope will trigger
> that operation.
> See patch 3.
>
> So patch 3 allows blkdebug users to select which kind of I/O operation
> they actually want to make fail, and patch 4 allows them to not use any
> event, but to have a rule active all the time.
>
> Together, we can then enable error injection for block-status in patch 5
> and make use of event=none iotype=block-status in patch 6.
Applied the series to my block branch, and fixed _filter_offsets in
patch 6 as suggested by Vladimir.
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2019-06-13 19:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-07 20:35 [Qemu-devel] [PATCH v4 0/7] qemu-img: Add salvaging mode to convert Max Reitz
2019-05-07 20:35 ` [Qemu-devel] [PATCH v4 1/7] qemu-img: Move quiet into ImgConvertState Max Reitz
2019-05-07 20:35 ` [Qemu-devel] [PATCH v4 2/7] qemu-img: Add salvaging mode to convert Max Reitz
2019-05-07 20:35 ` [Qemu-devel] [PATCH v4 3/7] blkdebug: Add @iotype error option Max Reitz
2019-05-07 20:35 ` [Qemu-devel] [PATCH v4 4/7] blkdebug: Add "none" event Max Reitz
2019-05-07 20:35 ` [Qemu-devel] [PATCH v4 5/7] blkdebug: Inject errors on .bdrv_co_block_status() Max Reitz
2019-05-07 20:35 ` [Qemu-devel] [PATCH v4 6/7] iotests: Test qemu-img convert --salvage Max Reitz
2019-05-16 14:40 ` Vladimir Sementsov-Ogievskiy
2019-05-16 14:51 ` Max Reitz
2019-05-07 20:35 ` [Qemu-devel] [PATCH v4 7/7] iotests: Test qemu-img convert -C --salvage Max Reitz
2019-06-13 19:52 ` Max Reitz [this message]
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=01c11e01-8ddb-4281-72ad-9e9b30eafdeb@redhat.com \
--to=mreitz@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).