Agree with this change:
buffer_readv_encode_error(&result_one, is_temp,
*zeroed_buffer,
*ignored_checksum,
-
*buffer_invalid,
+
*buffer_invalid ? 1 : 0,
*zeroed_buffer ? 1 : 0,
*failed_checksum ? 1 : 0,
buf_off, buf_off, buf_off);
The function prototype of buffer_readv_encode_error() is,
static inline void
buffer_readv_encode_error(PgAioResult *result,
bool is_temp,
bool zeroed_any,
bool ignored_any,
uint8 error_count,
uint8 zeroed_count,
uint8 checkfail_count,
uint8 first_error_off,
uint8 first_zeroed_off,
uint8 first_ignored_off)
Apparently the error_count argument should behave same as zeroed_count and
checkfail_count.
Regards,
Steven
________________________________________
From: Antonin Houska <[email protected]>
Sent: Wednesday, October 14, 2026 14:31
To: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Incorrect argument passed to buffer_readv_encode_error()
Although there's no compiler warning, and probably no correctness issue, I
think the intended coding was as I propose in the diff attached.
--
Antonin Houska
Web: https://www.cybertec-postgresql.com