qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Jean-Louis Dupond <jean-louis@dupond.be>,
	Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,
	Hanna Reitz <hreitz@redhat.com>
Subject: Re: [PATCH v2 0/3] block: use pwrite_zeroes_alignment when writing first sector
Date: Mon, 24 Nov 2025 18:45:56 +0100	[thread overview]
Message-ID: <aSSZ1Jbj2K-G4SnS@redhat.com> (raw)
In-Reply-To: <20251007141700.71891-1-stefanha@redhat.com>

Am 07.10.2025 um 16:16 hat Stefan Hajnoczi geschrieben:
> v2:
> - Simplify condition to if (!s->needs_alignment) in patch 1 [Vladimir]
> 
> This series fixes a bug I introduced in commit 5634622bcb33 ("file-posix: allow
> BLKZEROOUT with -t writeback"). The Linux fallocate(2) and ioctl(BLKZEROOUT)
> syscalls require logical block size alignment of the offset and length, even
> when the file is opened in buffered I/O mode where read/write operations do not
> require alignment.
> 
> The fix is to populate the pwrite_zeroes_alignment block limits field and to
> use that limit in create_file_fallback_zero_first_sector().
> 
> One issue I want to raise is that pwrite_zeroes_alignment is an "optimal
> alignment" hint. Hence create_file_fallback_zero_first_sector() had to be
> modified to honor the limit explicitly. The block layer doesn't automatically
> apply padding in order to align requests. This is different from how QEMU's
> block layer pwrite/pread works, where it does automatically apply padding and
> read/modify/write as necessary. If you want consistency, please let me know.

Thanks, applied to the block branch.

Kevin



      parent reply	other threads:[~2025-11-24 17:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-07 14:16 [PATCH v2 0/3] block: use pwrite_zeroes_alignment when writing first sector Stefan Hajnoczi
2025-10-07 14:16 ` [PATCH v2 1/3] file-posix: populate pwrite_zeroes_alignment Stefan Hajnoczi
2025-10-07 15:13   ` Vladimir Sementsov-Ogievskiy
2025-10-07 14:16 ` [PATCH v2 2/3] block: use pwrite_zeroes_alignment when writing first sector Stefan Hajnoczi
2025-10-07 14:17 ` [PATCH v2 3/3] iotests: add Linux loop device image creation test Stefan Hajnoczi
2025-10-07 15:48   ` Vladimir Sementsov-Ogievskiy
2025-11-19 15:40 ` [PATCH v2 0/3] block: use pwrite_zeroes_alignment when writing first sector Fiona Ebner
2025-11-19 15:43   ` Fiona Ebner
2025-11-24 17:45 ` 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=aSSZ1Jbj2K-G4SnS@redhat.com \
    --to=kwolf@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=jean-louis@dupond.be \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=vsementsov@yandex-team.ru \
    /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).