Stefan Hajnoczi d5eaeefbda pflash: fix sectors vs bytes confusion in blk_pread_nonzeroes()
The following expression is incorrect because blk_pread_nonzeroes()
deals in units of bytes, not sectors:

  bytes = MIN(size - offset, BDRV_REQUEST_MAX_SECTORS)
                                              ^^^^^^^

BDRV_REQUEST_MAX_BYTES is the appropriate constant.

Fixes: a4b15a8b9ef2 ("pflash: Only read non-zero parts of backend image")
Cc: Xiang Zheng <zhengxiang9@huawei.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240130002712.257815-1-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2024-01-30 16:17:59 -05:00
..
2023-12-29 11:17:30 +11:00
2024-01-26 12:23:04 +00:00
2023-12-31 09:11:28 +01:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2024-01-20 17:22:16 +00:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2024-01-11 15:19:14 +00:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2023-12-31 09:11:28 +01:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-11-10 18:19:13 +01:00
2024-01-20 17:22:16 +00:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-31 09:11:28 +01:00
2024-01-05 16:20:15 +01:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2024-01-05 13:35:25 +00:00
2023-12-30 07:38:06 +11:00