Recent changes

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

 



The following changes since commit 285d451f5c3e034463ea49a5ba99e8e0eb1b83a2:

  Check for syscall definitions, before declaring __weak helper (2010-03-15 13:38:11 +0100)

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

Jens Axboe (5):
      Fix bad type usage in parse.c for external options
      Verify log message
      Catch error on ->commit and ->get_events
      Set verify_interval to minimum blocksize if not given
      Use 'o' consistently in fixup_options()

 fio.c       |    4 ++++
 init.c      |   28 ++++++++++++++++------------
 ioengines.c |   12 ++++++++++--
 parse.c     |   12 ++++++------
 4 files changed, 36 insertions(+), 20 deletions(-)

---

Diff of recent changes:

diff --git a/fio.c b/fio.c
index c33f786..dfda268 100644
--- a/fio.c
+++ b/fio.c
@@ -433,6 +433,8 @@ static void do_verify(struct thread_data *td)
 	int ret, min_events;
 	unsigned int i;
 
+	dprint(FD_VERIFY, "starting loop\n");
+
 	/*
 	 * sync io first and invalidate cache, to make sure we really
 	 * read from disk.
@@ -570,6 +572,8 @@ sync_done:
 		cleanup_pending_aio(td);
 
 	td_set_runstate(td, TD_RUNNING);
+
+	dprint(FD_VERIFY, "exiting loop\n");
 }
 
 /*
diff --git a/init.c b/init.c
index 5d185fe..3d48467 100644
--- a/init.c
+++ b/init.c
@@ -236,11 +236,11 @@ static int fixup_options(struct thread_data *td)
 	struct thread_options *o = &td->o;
 
 #ifndef FIO_HAVE_PSHARED_MUTEX
-	if (!td->o.use_thread) {
+	if (!o->use_thread) {
 		log_info("fio: this platform does not support process shared"
 			 " mutexes, forcing use of threads. Use the 'thread'"
 			 " option to get rid of this warning.\n");
-		td->o.use_thread = 1;
+		o->use_thread = 1;
 	}
 #endif
 
@@ -283,9 +283,9 @@ static int fixup_options(struct thread_data *td)
 
 	if ((o->ba[DDIR_READ] != o->min_bs[DDIR_READ] ||
 	    o->ba[DDIR_WRITE] != o->min_bs[DDIR_WRITE]) &&
-	    !td->o.norandommap) {
+	    !o->norandommap) {
 		log_err("fio: Any use of blockalign= turns off randommap\n");
-		td->o.norandommap = 1;
+		o->norandommap = 1;
 	}
 
 	if (!o->file_size_high)
@@ -354,28 +354,32 @@ static int fixup_options(struct thread_data *td)
 	if (o->fill_device && !o->size)
 		o->size = -1ULL;
 
-	if (td_rw(td) && td->o.verify != VERIFY_NONE)
+	if (td_rw(td) && o->verify != VERIFY_NONE)
 		log_info("fio: mixed read/write workload with verify. May not "
 		 "work as expected, unless you pre-populated the file\n");
 
-	if (td->o.verify != VERIFY_NONE)
-		td->o.refill_buffers = 1;
+	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 (td->o.pre_read) {
-		td->o.invalidate_cache = 0;
+	if (o->pre_read) {
+		o->invalidate_cache = 0;
 		if (td->io_ops->flags & FIO_PIPEIO)
 			log_info("fio: cannot pre-read files with an IO engine"
 				 " that isn't seekable. Pre-read disabled.\n");
 	}
 
 #ifndef FIO_HAVE_FDATASYNC
-	if (td->o.fdatasync_blocks) {
+	if (o->fdatasync_blocks) {
 		log_info("fio: this platform does not support fdatasync()"
 			 " falling back to using fsync().  Use the 'fsync'"
 			 " option instead of 'fdatasync' to get rid of"
 			 " this warning\n");
-		td->o.fsync_blocks = td->o.fdatasync_blocks;
-		td->o.fdatasync_blocks = 0;
+		o->fsync_blocks = o->fdatasync_blocks;
+		o->fdatasync_blocks = 0;
 	}
 #endif
 
diff --git a/ioengines.c b/ioengines.c
index 366382e..7ab356a 100644
--- a/ioengines.c
+++ b/ioengines.c
@@ -207,6 +207,9 @@ int td_io_getevents(struct thread_data *td, unsigned int min, unsigned int max,
 out:
 	if (r >= 0)
 		io_u_mark_complete(td, r);
+	else
+		td_verror(td, -r, "get_events");
+
 	dprint(FD_IO, "getevents: %d\n", r);
 	return r;
 }
@@ -314,6 +317,8 @@ int td_io_init(struct thread_data *td)
 
 int td_io_commit(struct thread_data *td)
 {
+	int ret;
+
 	dprint(FD_IO, "calling ->commit(), depth %d\n", td->cur_depth);
 
 	if (!td->cur_depth || !td->io_u_queued)
@@ -322,8 +327,11 @@ int td_io_commit(struct thread_data *td)
 	io_u_mark_depth(td, td->io_u_queued);
 	td->io_u_queued = 0;
 
-	if (td->io_ops->commit)
-		return td->io_ops->commit(td);
+	if (td->io_ops->commit) {
+		ret = td->io_ops->commit(td);
+		if (ret)
+			td_verror(td, -ret, "io commit");
+	}
 
 	return 0;
 }
diff --git a/parse.c b/parse.c
index fb5d457..785d569 100644
--- a/parse.c
+++ b/parse.c
@@ -352,13 +352,13 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data,
 			if (o->type == FIO_OPT_INT) {
 				if (first) {
 					if (o->roff1)
-						*(unsigned long long *) o->roff1 = ull;
+						*(unsigned int *) o->roff1 = ull;
 					else
 						val_store(ilp, ull, o->off1, 0, data);
 				}
 				if (!more) {
 					if (o->roff2)
-						*(unsigned long long *) o->roff2 = ull;
+						*(unsigned int *) o->roff2 = ull;
 					else if (o->off2)
 						val_store(ilp, ull, o->off2, 0, data);
 				}
@@ -429,17 +429,17 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data,
 
 			if (first) {
 				if (o->roff1)
-					*(unsigned long *) o->roff1 = ul1;
+					*(unsigned int *) o->roff1 = ul1;
 				else
 					val_store(ilp, ul1, o->off1, 0, data);
 				if (o->roff2)
-					*(unsigned long *) o->roff2 = ul2;
+					*(unsigned int *) o->roff2 = ul2;
 				else
 					val_store(ilp, ul2, o->off2, 0, data);
 			}
 			if (o->roff3 && o->roff4) {
-				*(unsigned long *) o->roff3 = ul1;
-				*(unsigned long *) o->roff4 = ul2;
+				*(unsigned int *) o->roff3 = ul1;
+				*(unsigned int *) o->roff4 = ul2;
 			} else if (o->off3 && o->off4) {
 				val_store(ilp, ul1, o->off3, 0, data);
 				val_store(ilp, ul2, o->off4, 0, data);
--
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