Recent changes

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

 



The following changes since commit 207b18e4238f281bfe044bfbdc23755f96d33185:

  Mark buffer_compress_chunk as child of buffer_compress_percentage (2012-03-09 19:11:25 +0100)

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

Jens Axboe (2):
      Fix failure to verify in mixed read/write workload with backlog
      Add regression test for 82af2a7c

 backend.c                 |    7 ++++---
 io_u.c                    |    1 +
 ioengine.h                |    1 +
 t/jobs/t0006-82af2a7c.fio |   16 ++++++++++++++++
 verify.c                  |    1 +
 5 files changed, 23 insertions(+), 3 deletions(-)
 create mode 100644 t/jobs/t0006-82af2a7c.fio

---

Diff of recent changes:

diff --git a/backend.c b/backend.c
index 814d244..7343286 100644
--- a/backend.c
+++ b/backend.c
@@ -586,11 +586,12 @@ static void do_io(struct thread_data *td)
 		ddir = io_u->ddir;
 
 		/*
-		 * Add verification end_io handler, if asked to verify
-		 * a previously written file.
+		 * Add verification end_io handler if:
+		 *	- Asked to verify (!td_rw(td))
+		 *	- Or the io_u is from our verify list (mixed write/ver)
 		 */
 		if (td->o.verify != VERIFY_NONE && io_u->ddir == DDIR_READ &&
-		    !td_rw(td)) {
+		    ((io_u->flags & IO_U_F_VER_LIST) || !td_rw(td))) {
 			if (td->o.verify_async)
 				io_u->end_io = verify_io_u_async;
 			else
diff --git a/io_u.c b/io_u.c
index a0020d2..20794c3 100644
--- a/io_u.c
+++ b/io_u.c
@@ -1070,6 +1070,7 @@ again:
 		assert(io_u->flags & IO_U_F_FREE);
 		io_u->flags &= ~(IO_U_F_FREE | IO_U_F_FREE_DEF);
 		io_u->flags &= ~(IO_U_F_TRIMMED | IO_U_F_BARRIER);
+		io_u->flags &= ~IO_U_F_VER_LIST;
 
 		io_u->error = 0;
 		flist_del(&io_u->list);
diff --git a/ioengine.h b/ioengine.h
index efca45e..61cb396 100644
--- a/ioengine.h
+++ b/ioengine.h
@@ -11,6 +11,7 @@ enum {
 	IO_U_F_BUSY_OK		= 1 << 4,
 	IO_U_F_TRIMMED		= 1 << 5,
 	IO_U_F_BARRIER		= 1 << 6,
+	IO_U_F_VER_LIST		= 1 << 7,
 };
 
 /*
diff --git a/t/jobs/t0006-82af2a7c.fio b/t/jobs/t0006-82af2a7c.fio
new file mode 100644
index 0000000..7117067
--- /dev/null
+++ b/t/jobs/t0006-82af2a7c.fio
@@ -0,0 +1,16 @@
+# Expected results: workload runs and switches between 'm' and 'V' state
+# Buggy result: workload stays in 'm' mode, never doing actual verifies
+[global]
+rw=randrw
+bs=4k
+direct=1
+ioengine=libaio
+iodepth=32
+verify=meta
+verify_backlog=1024
+verify_fatal=1
+
+[ver-test]
+filename=foo
+size=4g
+verify_pattern=0xaaa
diff --git a/verify.c b/verify.c
index 6dd7f6a..f25eab9 100644
--- a/verify.c
+++ b/verify.c
@@ -973,6 +973,7 @@ int get_next_verify(struct thread_data *td, struct io_u *io_u)
 		io_u->offset = ipo->offset;
 		io_u->buflen = ipo->len;
 		io_u->file = ipo->file;
+		io_u->flags |= IO_U_F_VER_LIST;
 
 		if (ipo->flags & IP_F_TRIMMED)
 			io_u->flags |= IO_U_F_TRIMMED;
--
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