From: Kevin Wolf <kwolf@redhat.com>
To: Fabian Ebner <f.ebner@proxmox.com>
Cc: qemu-devel@nongnu.org, hreitz@redhat.com, qemu-block@nongnu.org,
integration@gluster.org, qemu-stable@nongnu.org,
eblake@redhat.com, vsementsov@virtuozzo.com, sgarzare@redhat.com
Subject: Re: [PATCH v3] block/gluster: correctly set max_pdiscard
Date: Mon, 30 May 2022 15:15:26 +0200 [thread overview]
Message-ID: <YpTDbs6BReBLUJsW@redhat.com> (raw)
In-Reply-To: <20220520075922.43972-1-f.ebner@proxmox.com>
Am 20.05.2022 um 09:59 hat Fabian Ebner geschrieben:
> On 64-bit platforms, assigning SIZE_MAX to the int64_t max_pdiscard
> results in a negative value, and the following assertion would trigger
> down the line (it's not the same max_pdiscard, but computed from the
> other one):
> qemu-system-x86_64: ../block/io.c:3166: bdrv_co_pdiscard: Assertion
> `max_pdiscard >= bs->bl.request_alignment' failed.
>
> On 32-bit platforms, it's fine to keep using SIZE_MAX.
>
> The assertion in qemu_gluster_co_pdiscard() is checking that the value
> of 'bytes' can safely be passed to glfs_discard_async(), which takes a
> size_t for the argument in question, so it is kept as is. And since
> max_pdiscard is still <= SIZE_MAX, relying on max_pdiscard is still
> fine.
>
> Fixes: 0c8022876f ("block: use int64_t instead of int in driver discard handlers")
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Thanks, applied to the block branch.
Kevin
prev parent reply other threads:[~2022-05-30 13:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 7:59 [PATCH v3] block/gluster: correctly set max_pdiscard Fabian Ebner
2022-05-24 21:14 ` Eric Blake
2022-05-25 9:12 ` Stefano Garzarella
2022-05-27 16:45 ` Vladimir Sementsov-Ogievskiy
2022-05-30 13:15 ` 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=YpTDbs6BReBLUJsW@redhat.com \
--to=kwolf@redhat.com \
--cc=eblake@redhat.com \
--cc=f.ebner@proxmox.com \
--cc=hreitz@redhat.com \
--cc=integration@gluster.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=sgarzare@redhat.com \
--cc=vsementsov@virtuozzo.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 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.