Make the iolog sample number uint64_t as well, so we have
the same size across 32 and 64-bit archs.
Signed-off-by: Jens Axboe <axboe@fb.com>
/*
* Get header first, it's not compressed
*/
- nr_samples = le32_to_cpu(pdu->nr_samples);
+ nr_samples = le64_to_cpu(pdu->nr_samples);
- total = nr_samples * __log_entry_sz(pdu->log_offset);
+ total = nr_samples * __log_entry_sz(le32_to_cpu(pdu->log_offset));
ret = malloc(total + sizeof(*pdu));
ret->nr_samples = nr_samples;
/*
* Entries already logged
*/
- unsigned long nr_samples;
- unsigned long max_samples;
+ uint64_t nr_samples;
+ uint64_t max_samples;
void *log;
unsigned int log_type;