On Thu, May 28, 2026 at 10:32:32AM +0200, Fiona Ebner wrote:
> Am 27.05.26 um 11:06 PM schrieb Stefan Hajnoczi:
> > On Thu, Feb 5, 2026 at 11:03 AM Kevin Wolf <[email protected]> wrote:
> >>
> >> Am 05.02.2026 um 13:13 hat Fiona Ebner geschrieben:
> >>> Hi Stefan,
> >>>
> >>> Am 02.02.26 um 11:15 PM schrieb Stefan Hajnoczi:
> >>>> On Fri, Jan 09, 2026 at 01:08:27PM +0100, Fiona Ebner wrote:
> >>>>> Previous discussion here:
> >>>>> https://lore.kernel.org/qemu-devel/[email protected]/
> >>>>>
> >>>>> Commit 5634622bcb ("file-posix: allow BLKZEROOUT with -t writeback")
> >>>>> enables the BLKZEROOUT ioctl when using 'writeback' cache, regressing
> >>>>> certain 'qemu-img convert' invocations, because of a pre-existing
> >>>>> issue. Namely, the BLKZEROOUT ioctl might fail with errno EINVAL when
> >>>>> the request is shorter than the block size of the block device.
> >>>>>
> >>>>> Stefan suggested prioritizing bl.pwrite_zeroes_alignment in
> >>>>> bdrv_co_do_zero_pwritev(). This RFC explores that approach and the
> >>>>> issues with qcow2 I encountered, where
> >>>>> bl.pwrite_zeroes_alignment = s->subcluster_size;
> >>>>> I would be happy to discuss potential solutions and whether we should
> >>>>> use this approach after all.
> >>>>
> >>>> Hi Fiona,
> >>>> I wanted to continue this discussion. My thoughts are that making
> >>>> bdrv_co_do_zero_pwritev() use bl.pwrite_zeroes_alignment is the right
> >>>> long-term solution to keep all the padding logic in one place.
> >>>>
> >>>> On the other hand, your series shows it involves fixing a bunch of test
> >>>> failures and that's not fun. The original bug that is being solved here
> >>>> is my doing, so feel free to hand this over to me if you decide you
> >>>> don't want to work on it.
> >>>
> >>> in your other mail, you mentioned you'll ask Kevin for his opinion. So
> >>> in part, I was waiting for that. But I also was side-tracked by other
> >>> things, and it will be 1-2 more weeks until I can really focus on this
> >>> again. If that is too long, please go ahead and pick it up.
> >>
> >> I didn't review this thoroughly yet, but I agree that considering the
> >> alignment from the start is the better solution and also more consistent
> >> with what we're already doing for normal reads and writes.
> >>
> >> We just need to make sure that we use the right alignments in the right
> >> places, which can be a bit confusing with the fallbacks to buffered zero
> >> writes here and there.
> >>
> >> I assume that there is enough time left to do this before the 11.0
> >> release and there is no need to take something like v1 as an
> >> intermediate solution?
> > 
> > No progress has been made and I'm unable to commit time at the moment.
> 
> Me neither unfortunately.
> 
> > Is everyone okay with merging Fiona's smaller original patch? While it
> > would be nice to implement a deeper fix, it's better to have a fix and
> > I think there is no great risk merging the original patch.
> > 
> > https://lore.kernel.org/qemu-devel/[email protected]/
> 
> FWIW, we have been using that patch downstream since mid-February [0]
> and nobody reported issues with it as far as I'm aware. I suppose it
> could use a 'TODO' code comment that the proper fix looks different. If
> you choose to go with that patch, should I send a v2 with such a comment
> or can that be added when applying?

I can add the comment when merging the patch. I will merge it on Monday
so Kevin still has some time to reply in case he has an opinion.

Stefan

> 
> Best Regards,
> Fiona
> 
> [0]:
> https://git.proxmox.com/?p=pve-qemu.git;a=commitdiff;h=6960b5e033fa911f9882751950df28a193255683
> 

Attachment: signature.asc
Description: PGP signature

Reply via email to