From: Kevin Wolf <kwolf@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"stefanha@redhat.com" <stefanha@redhat.com>,
"qemu-block@nongnu.org" <qemu-block@nongnu.org>,
"mreitz@redhat.com" <mreitz@redhat.com>
Subject: Re: [PATCH for-4.2? v3 0/8] block: Fix resize (extending) of short overlays
Date: Thu, 19 Dec 2019 11:13:12 +0100 [thread overview]
Message-ID: <20191219101312.GD5230@linux.fritz.box> (raw)
In-Reply-To: <eed0efba-aa38-4901-8f10-6ec3ee339437@virtuozzo.com>
Am 19.12.2019 um 10:24 hat Vladimir Sementsov-Ogievskiy geschrieben:
> 10.12.2019 20:46, Kevin Wolf wrote:
> > Am 22.11.2019 um 17:05 hat Kevin Wolf geschrieben:
> >> See patch 4 for the description of the bug fixed.
> >
> > I'm applying patches 3 and 5-7 to the block branch because they make
> > sense on their own.
> >
> > The real fix will need another approach because the error handling is
> > broken in this one: If zeroing out fails (either because of NO_FALLBACK
> > or because of some other I/O error), bdrv_co_truncate() will return
> > failure, but the image size has already been increased, with potentially
> > incorrect data in the new area.
> >
> > To fix this, we need to make sure that zeros will be read before we
> > commit the new image size to the image file (e.g. qcow2 header) and to
> > bs->total_sectors. In other words, it must become the responsibility of
> > the block driver.
> >
> > To this effect, I'm planning to introduce a PREALLOC_MODE_ZERO_INIT flag
> > that can be or'ed to the preallocation mode. This will fail by default
> > because it looks like just another unimplemented preallocation mode to
> > block drivers. It will be requested explicitly by commit jobs and
> > automatically added by bdrv_co_truncate() if the backing file would
> > become visible (like in this series, but now for all preallocation
> > modes). I'm planning to implement it for qcow2 and file-posix for now,
> > which should cover most interesting cases.
> >
> > Does this make sense to you?
>
> This should work. Do you still have this plan in a timeline?
Still planning to do this, but tomorrow is my last working day for this
year. So I guess I'll get to it sometime in January.
Kevin
next prev parent reply other threads:[~2019-12-19 10:14 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-22 16:05 [PATCH for-4.2? v3 0/8] block: Fix resize (extending) of short overlays Kevin Wolf
2019-11-22 16:05 ` [PATCH v3 1/8] block: bdrv_co_do_pwrite_zeroes: 64 bit 'bytes' parameter Kevin Wolf
2019-11-22 16:05 ` [PATCH v3 2/8] block: Add no_fallback parameter to bdrv_co_truncate() Kevin Wolf
2019-11-22 16:48 ` Eric Blake
2019-11-25 12:00 ` Max Reitz
2019-11-25 15:06 ` Alberto Garcia
2019-11-25 16:05 ` Kevin Wolf
2019-11-22 16:05 ` [PATCH v3 3/8] qcow2: Declare BDRV_REQ_NO_FALLBACK supported Kevin Wolf
2019-11-22 18:03 ` Eric Blake
2019-11-25 12:02 ` Max Reitz
2019-11-25 14:53 ` Alberto Garcia
2019-11-22 16:05 ` [PATCH v3 4/8] block: truncate: Don't make backing file data visible Kevin Wolf
2019-11-22 18:06 ` Eric Blake
2019-11-25 12:08 ` Max Reitz
2019-11-22 16:05 ` [PATCH v3 5/8] iotests: Add qemu_io_log() Kevin Wolf
2019-11-22 16:05 ` [PATCH v3 6/8] iotests: Fix timeout in run_job() Kevin Wolf
2019-11-22 16:05 ` [PATCH v3 7/8] iotests: Support job-complete " Kevin Wolf
2019-11-22 16:05 ` [PATCH v3 8/8] iotests: Test committing to short backing file Kevin Wolf
2019-11-22 18:09 ` Eric Blake
2019-11-25 9:56 ` Vladimir Sementsov-Ogievskiy
2019-11-25 12:19 ` Max Reitz
2019-11-22 16:17 ` [PATCH for-4.2? v3 0/8] block: Fix resize (extending) of short overlays Peter Maydell
2019-11-22 16:41 ` Eric Blake
2019-11-25 12:21 ` Max Reitz
2019-11-25 12:24 ` Max Reitz
2019-12-10 17:46 ` Kevin Wolf
2019-12-11 7:09 ` Max Reitz
2019-12-19 9:24 ` Vladimir Sementsov-Ogievskiy
2019-12-19 10:13 ` Kevin Wolf [this message]
2019-12-19 10:20 ` Vladimir Sementsov-Ogievskiy
2020-02-05 13:43 ` Vladimir Sementsov-Ogievskiy
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=20191219101312.GD5230@linux.fritz.box \
--to=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--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).