From: Kevin Wolf <kwolf@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 0/2] block/file-posix: Fix unaligned O_DIRECT block status
Date: Mon, 20 May 2019 15:25:31 +0200 [thread overview]
Message-ID: <20190520132530.GF5699@localhost.localdomain> (raw)
In-Reply-To: <20190515041541.12367-1-mreitz@redhat.com>
Am 15.05.2019 um 06:15 hat Max Reitz geschrieben:
> The user-visible problem:
> $ echo > foo
> $ qemu-img map --image-opts driver=file,filename=foo,cache.direct=on
> Offset Length Mapped to File
> qemu-img: block/io.c:2093: bdrv_co_block_status: Assertion `*pnum &&
> QEMU_IS_ALIGNED(*pnum, align) && align > offset - aligned_offset'
> failed.
>
> The internal problem: file-posix truncates status requests to the EOF.
> If the EOF is not aligned at the request_alignment,
> bdrv_co_block_status() won't like that.
>
> See patch 1 for a deeper discussion (including two possible alternatives
> how we could address the problem).
> (As I note there, I’ve looked through all block drivers, and I didn’t
> find any other which could have the same problem. gluster uses the same
> block-status code, but it doesn’t set a request_alignment. NBD
> force-aligns the server response in nbd_parse_blockstatus_payload().
> qcow2... Should be fine as long as no crypto driver has a block limit
> exceeding the qcow2 cluster size. And so on.)
>
> Patch 2 adds a test. After writing that test, I noticed that we already
> had one: 109 fails with -c none before patch 1. Er, well, at least the
> new test is more succinct and has the correct default cache mode, so it
> will actually do the test if you run ./check without enforcing any cache
> on a filesystem that supports O_DIRECT.
Thanks, applied to the block branch.
Kevin
prev parent reply other threads:[~2019-05-20 13:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-15 4:15 [Qemu-devel] [PATCH v2 0/2] block/file-posix: Fix unaligned O_DIRECT block status Max Reitz
2019-05-15 4:15 ` [Qemu-devel] [PATCH v2 1/2] block/file-posix: Unaligned O_DIRECT block-status Max Reitz
2019-05-15 4:15 ` [Qemu-devel] [PATCH v2 2/2] iotests: Test unaligned raw images with O_DIRECT Max Reitz
2019-05-20 13:25 ` Kevin Wolf [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=20190520132530.GF5699@localhost.localdomain \
--to=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/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).