allow dbengine to read at offsets above 4GiB - again (#19539)
allow dbengine to read at offsets above 4GiB
Costa Tsaousis committed
Jan 30, 2025 at 20:02 UTC
9da99959d90803fcd3c1c7c6ce60ddc43ee7c7a5
1 file changed
+2
-2
src/database/engine/pdc.c
+2
-2
@@ -1210,7 +1210,7 @@ static bool epdl_populate_pages_from_extent_data(
1210
return true;
1211
}
1212
1213
-static inline void *datafile_extent_read(struct rrdengine_instance *ctx, uv_file file, unsigned pos, unsigned size_bytes)
1213
+static inline void *datafile_extent_read(struct rrdengine_instance *ctx, uv_file file, uint64_t pos, unsigned size_bytes)
1214
{
1215
void *buffer = NULL;
1216
uv_fs_t request;
@@ -1221,7 +1221,7 @@ static inline void *datafile_extent_read(struct rrdengine_instance *ctx, uv_file
1221
fatal("DBENGINE: posix_memalign(): %s", strerror(ret));
1222
1223
uv_buf_t iov = uv_buf_init(buffer, real_io_size);
1224
- ret = uv_fs_read(NULL, &request, file, &iov, 1, pos, NULL);
1224
+ ret = uv_fs_read(NULL, &request, file, &iov, 1, (int64_t)pos, NULL);
1225
if (unlikely(-1 == ret)) {
1226
ctx_io_error(ctx);
1227
posix_memfree(buffer);