Recent changes

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

 



The following changes since commit f8a75c992b8f7166c423f9282b660640c1d6c397:

  Default verify backlog batch to verify backlog setting if not given (2010-06-15 14:27:28 +0200)

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

Jens Axboe (3):
      md5: fix bug in hash size
      Only apply verify interval to meta verifier, which uses it
      Ensure we never overlap with existing blocks

 init.c   |    8 +++++---
 io_u.c   |   23 +++++++++++++++--------
 verify.h |    2 +-
 3 files changed, 21 insertions(+), 12 deletions(-)

---

Diff of recent changes:

diff --git a/init.c b/init.c
index 966a065..b97c802 100644
--- a/init.c
+++ b/init.c
@@ -360,9 +360,11 @@ static int fixup_options(struct thread_data *td)
 
 	if (o->verify != VERIFY_NONE) {
 		o->refill_buffers = 1;
-		if (o->max_bs[DDIR_WRITE] != o->min_bs[DDIR_WRITE] &&
-		    !o->verify_interval)
-			o->verify_interval = o->min_bs[DDIR_WRITE];
+		if (o->verify == VERIFY_META) {
+			if (o->max_bs[DDIR_WRITE] != o->min_bs[DDIR_WRITE] &&
+			    !o->verify_interval)
+				o->verify_interval = o->min_bs[DDIR_WRITE];
+		}
 	}
 
 	if (o->pre_read) {
diff --git a/io_u.c b/io_u.c
index bffacb4..f451d1a 100644
--- a/io_u.c
+++ b/io_u.c
@@ -54,11 +54,8 @@ static void mark_random_map(struct thread_data *td, struct io_u *io_u)
 		 * If we have a mixed random workload, we may
 		 * encounter blocks we already did IO to.
 		 */
-		if ((td->o.ddir_nr == 1) && !random_map_free(f, block)) {
-			if (!blocks)
-				blocks = 1;
+		if ((td->o.ddir_nr == 1) && !random_map_free(f, block))
 			break;
-		}
 
 		idx = RAND_MAP_IDX(f, block);
 		bit = RAND_MAP_BIT(f, block);
@@ -69,10 +66,20 @@ static void mark_random_map(struct thread_data *td, struct io_u *io_u)
 		if (this_blocks + bit > BLOCKS_PER_MAP)
 			this_blocks = BLOCKS_PER_MAP - bit;
 
-		if (this_blocks == BLOCKS_PER_MAP)
-			mask = -1U;
-		else
-			mask = ((1U << this_blocks) - 1) << bit;
+		do {
+			if (this_blocks == BLOCKS_PER_MAP)
+				mask = -1U;
+			else
+				mask = ((1U << this_blocks) - 1) << bit;
+	
+			if (!(f->file_map[idx] & mask))
+				break;
+
+			this_blocks--;
+		} while (this_blocks);
+
+		if (!this_blocks)
+			break;
 
 		f->file_map[idx] |= mask;
 		nr_blocks -= this_blocks;
diff --git a/verify.h b/verify.h
index be98c54..a4a8cfe 100644
--- a/verify.h
+++ b/verify.h
@@ -31,7 +31,7 @@ struct verify_header {
 };
 
 struct vhdr_md5 {
-	uint32_t md5_digest[16];
+	uint32_t md5_digest[4];
 };
 struct vhdr_sha512 {
 	uint8_t sha512[128];
--
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