From: Stefan Hajnoczi <stefanha@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH] file-posix: Fix crash on discard_granularity == 0
Date: Wed, 30 Apr 2025 11:37:26 -0400 [thread overview]
Message-ID: <20250430153726.GA56296@fedora> (raw)
In-Reply-To: <20250429155654.102735-1-kwolf@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 642 bytes --]
On Tue, Apr 29, 2025 at 05:56:54PM +0200, Kevin Wolf wrote:
> Block devices that don't support discard have a discard_granularity of
> 0. Currently, this results in a division by zero when we try to make
> sure that it's a multiple of request_alignment. Only try to update
> bs->bl.pdiscard_alignment when we got a non-zero discard_granularity
> from sysfs.
>
> Fixes: f605796aae4 ('file-posix: probe discard alignment on Linux block devices')
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> block/file-posix.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2025-04-30 15:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 15:56 [PATCH] file-posix: Fix crash on discard_granularity == 0 Kevin Wolf
2025-04-29 21:09 ` Eric Blake
2025-04-30 15:54 ` Kevin Wolf
2025-04-30 15:37 ` Stefan Hajnoczi [this message]
2025-04-30 15:40 ` Stefan Hajnoczi
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=20250430153726.GA56296@fedora \
--to=stefanha@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.