Recent changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following changes since commit e97c14423a5688d7adfb342c16363c263cb741f9:

  Fix aiocb compile warnings on HPUX (2011-09-21 09:38:01 +0200)

are available in the git repository at:
  git://git.kernel.dk/fio.git master

Jens Axboe (1):
      Scramble corruption fix

 io_u.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

---

Diff of recent changes:

diff --git a/io_u.c b/io_u.c
index 38efcc1..77069c5 100644
--- 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;
-	boffset= io_u->offset;
+	boffset = io_u->offset;
 
 	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;
+		offset &= ~(sizeof(unsigned long long) - 1);
 		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));
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux