qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Hanna Czenczek <hreitz@redhat.com>,
	qemu-devel@nongnu.org, Fam Zheng <fam@euphon.net>,
	qemu-block@nongnu.org
Subject: Re: [PATCH v2 1/2] file-posix: probe discard alignment on Linux block devices
Date: Wed, 16 Apr 2025 12:43:07 +0200	[thread overview]
Message-ID: <Z_-JuzabVntIfGgm@redhat.com> (raw)
In-Reply-To: <20250414153451.GC117758@fedora>

[-- Attachment #1: Type: text/plain, Size: 1148 bytes --]

Am 14.04.2025 um 17:34 hat Stefan Hajnoczi geschrieben:
> On Fri, Apr 11, 2025 at 10:15:13AM +0200, Hanna Czenczek wrote:
> > On 10.04.25 20:41, Stefan Hajnoczi wrote:
> > > Populate the pdiscard_alignment block limit so the block layer is able
> > > align discard requests correctly.
> > > 
> > > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> > > ---
> > >   block/file-posix.c | 56 +++++++++++++++++++++++++++++++++++++++++++++-
> > >   1 file changed, 55 insertions(+), 1 deletion(-)
> > 
> > Ah, I didn’t know sysfs is actually fair game.  Should we not also get the
> > maximum discard length then, too?
> 
> The maximum discard length behaves differently: the Linux block layer
> splits requests according to the maximum discard length. If the guest
> submits a discard request that is too large for the host, the host block
> layer will split it and the request succeeds. That is why I didn't make
> any changes to the maximum discard length in this series.

Do we need to do something with it for SCSI passthrough? Similar to how
we expose bs->bl.max_hw_transfer/iov in the block limits VPD page?

Kevin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2025-04-16 10:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10 18:41 [PATCH v2 0/2] block: discard alignment fixes Stefan Hajnoczi
2025-04-10 18:41 ` [PATCH v2 1/2] file-posix: probe discard alignment on Linux block devices Stefan Hajnoczi
2025-04-11  8:15   ` Hanna Czenczek
2025-04-14 15:34     ` Stefan Hajnoczi
2025-04-16 10:43       ` Kevin Wolf [this message]
2025-04-10 18:41 ` [PATCH v2 2/2] block/io: skip head/tail requests on EINVAL Stefan Hajnoczi
2025-04-11  8:18   ` Hanna Czenczek
2025-04-11 17:28     ` Eric Blake
2025-04-14 13:39       ` Hanna Czenczek

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=Z_-JuzabVntIfGgm@redhat.com \
    --to=kwolf@redhat.com \
    --cc=fam@euphon.net \
    --cc=hreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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).