[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] pflash: fix sectors vs bytes confusion in blk_pread_nonzeroe
From: |
Michael Tokarev |
Subject: |
Re: [PATCH] pflash: fix sectors vs bytes confusion in blk_pread_nonzeroes() |
Date: |
Fri, 9 Feb 2024 10:44:21 +0300 |
User-agent: |
Mozilla Thunderbird |
09.02.2024 00:21, Stefan Hajnoczi wrote:
On Thu, 1 Feb 2024 at 06:37, Michael Tokarev <mjt@tls.msk.ru> wrote:
for (;;) {
- bytes = MIN(size - offset, BDRV_REQUEST_MAX_SECTORS);
+ bytes = MIN(size - offset, BDRV_REQUEST_MAX_BYTES);
Hmm. This smells like a -stable material, but you know better not
to Cc: qemu-stable@ for unrelated stuff... Is it not for stable?
This is not a user-visible bug. The code still works with the smaller
MAX_SECTORS value thanks to the loop.
Yeah, that's my thoughts exactly. Also, most of the time, the cap will
be `size' anyway, not MAX. Still thought I'd ask :)
Thank you for the confirmation!
/mjt
It doesn't hurt to include it in -stable but I also think it doesn't
help :-). It's just an inconsistency in the code.