Recent changes

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

 



The following changes since commit e12d2800f811cb64d376cfdaed9a1257f3fa9c99:

  engine: fix error handling for e4defrag/falloc (2012-09-23 20:33:27 +0200)

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

Jens Axboe (2):
      backend: don't allocate memory buffers for non-data workloads
      parser: fix overflowing integer type options

 backend.c |    8 ++++++--
 parse.c   |   12 ++++++++----
 2 files changed, 14 insertions(+), 6 deletions(-)

---

Diff of recent changes:

diff --git a/backend.c b/backend.c
index 39d13a3..88623be 100644
--- a/backend.c
+++ b/backend.c
@@ -802,6 +802,7 @@ static int init_io_u(struct thread_data *td)
 	struct io_u *io_u;
 	unsigned int max_bs, min_write;
 	int cl_align, i, max_units;
+	int data_xfer = 1;
 	char *p;
 
 	max_units = td->o.iodepth;
@@ -811,6 +812,9 @@ static int init_io_u(struct thread_data *td)
 	td->orig_buffer_size = (unsigned long long) max_bs
 					* (unsigned long long) max_units;
 
+	if ((td->io_ops->flags & FIO_NOIO) || !td_rw(td))
+		data_xfer = 0;
+
 	if (td->o.mem_type == MEM_SHMHUGE || td->o.mem_type == MEM_MMAPHUGE) {
 		unsigned long bs;
 
@@ -823,7 +827,7 @@ static int init_io_u(struct thread_data *td)
 		return 1;
 	}
 
-	if (allocate_io_mem(td))
+	if (data_xfer && allocate_io_mem(td))
 		return 1;
 
 	if (td->o.odirect || td->o.mem_align ||
@@ -851,7 +855,7 @@ static int init_io_u(struct thread_data *td)
 		INIT_FLIST_HEAD(&io_u->list);
 		dprint(FD_MEM, "io_u alloc %p, index %u\n", io_u, i);
 
-		if (!(td->io_ops->flags & FIO_NOIO)) {
+		if (data_xfer) {
 			io_u->buf = p;
 			dprint(FD_MEM, "io_u %p, mem %p\n", io_u, io_u->buf);
 
diff --git a/parse.c b/parse.c
index c8b7545..1a686e4 100644
--- a/parse.c
+++ b/parse.c
@@ -430,13 +430,13 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data,
 			break;
 
 		if (o->maxval && ull > o->maxval) {
-			log_err("max value out of range: %lld"
-					" (%d max)\n", ull, o->maxval);
+			log_err("max value out of range: %llu"
+					" (%u max)\n", ull, o->maxval);
 			return 1;
 		}
 		if (o->minval && ull < o->minval) {
-			log_err("min value out of range: %lld"
-					" (%d min)\n", ull, o->minval);
+			log_err("min value out of range: %llu"
+					" (%u min)\n", ull, o->minval);
 			return 1;
 		}
 
@@ -1087,6 +1087,10 @@ void option_init(struct fio_option *o)
 		o->minval = 0;
 		o->maxval = 1;
 	}
+	if (o->type == FIO_OPT_INT) {
+		if (!o->maxval)
+			o->maxval = UINT_MAX;
+	}
 	if (o->type == FIO_OPT_FLOAT_LIST) {
 		o->minfp = NAN;
 		o->maxfp = NAN;
--
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