projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move stat_io_bytes/time to thread_data
[fio.git]
/
io_u.c
diff --git
a/io_u.c
b/io_u.c
index 38efcc16382874d685c1e7b027abff3a640ed560..77069c55277f8aeb0cd93d99754b12913cdfbaee 100644
(file)
--- a/
io_u.c
+++ b/
io_u.c
@@
-1137,7
+1137,7
@@
static void small_content_scramble(struct io_u *io_u)
return;
p = io_u->xfer_buf;
return;
p = io_u->xfer_buf;
- boffset= io_u->offset;
+ boffset
= io_u->offset;
for (i = 0; i < nr_blocks; i++) {
/*
for (i = 0; i < nr_blocks; i++) {
/*
@@
-1146,9
+1146,10
@@
static void small_content_scramble(struct io_u *io_u)
* and the actual offset.
*/
offset = (io_u->start_time.tv_usec ^ boffset) & 511;
* and the actual offset.
*/
offset = (io_u->start_time.tv_usec ^ boffset) & 511;
+ offset &= ~(sizeof(unsigned long long) - 1);
if (offset >= 512 - sizeof(unsigned long long))
offset -= sizeof(unsigned long long);
if (offset >= 512 - sizeof(unsigned long long))
offset -= sizeof(unsigned long long);
-
*((unsigned long long *) p + offset) = boffset
;
+
memcpy(p + offset, &boffset, sizeof(boffset))
;
end = p + 512 - sizeof(io_u->start_time);
memcpy(end, &io_u->start_time, sizeof(io_u->start_time));
end = p + 512 - sizeof(io_u->start_time);
memcpy(end, &io_u->start_time, sizeof(io_u->start_time));