Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Mar 19, 2015

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit 7d1bb70f3d85d041b4b7dd926e98054fea980bdc:

Scramble IO buffers unless explicitly told not (2015-03-17 18:11:07 -0600)

are available in the git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to d8f1f7d4ef536ea04a6a5fbd0399d46f69ff4e60:

Pack io_u/fio_file (2015-03-18 16:17:41 -0600)

----------------------------------------------------------------
Jens Axboe (3):
Update documentation for zero_buffers
Revert "Scramble IO buffers unless explicitly told not" Pack io_u/fio_file

Luca Maranzano (1):
Addedd -z option to specify file size for filepaths fio files

 HOWTO        |    2 --
 file.h       |    2 +-
 fio.1        |    2 --
 io_u.c       |    3 +--
 ioengine.h   |    6 +++++-
 tools/genfio |    8 +++++++-
 6 files changed, 14 insertions(+), 9 deletions(-)

---

Diff of recent changes:

HOWTO +0 -2
index 0f7909d..f43f3ec 100644
@@ -578,8 +578,6 @@ bs_is_seq_rand	If this option is set, fio will use the normal read,write
 
 zero_buffers	If this option is given, fio will init the IO buffers to
 		all zeroes. The default is to fill them with random data.
-		The resulting IO buffers will not be completely zeroed,
-		unless scramble_buffers is also turned off.
 
 refill_buffers	If this option is given, fio will refill the IO buffers
 		on every submit. The default is to only fill it at init
file.h +1 -1
index f7a1eae..fc47310 100644
@@ -75,9 +75,9 @@ struct fio_file {
 	/*
 	 * filename and possible memory mapping
 	 */
-	char *file_name;
 	unsigned int major, minor;
 	int fileno;
+	char *file_name;
 
 	/*
 	 * size of the file, offset into file, and io size from that offset
fio.1 +0 -2
index 84d71a0..3859753 100644
@@ -462,8 +462,6 @@ blocksize setting.
 .TP
 .B zero_buffers
 Initialize buffers with all zeros. Default: fill buffers with random data.
-The resulting IO buffers will not be completely zeroed, unless
-\fPscramble_buffers\fR is also turned off.
 .TP
 .B refill_buffers
 If this option is given, fio will refill the IO buffers on every submit. The
io_u.c +1 -2
index a45dd40..975d242 100644
@@ -1484,8 +1484,7 @@ struct io_u *get_io_u(struct thread_data *td)
 				io_u_fill_buffer(td, io_u,
 					td->o.min_bs[DDIR_WRITE],
 					io_u->xfer_buflen);
-			}
-			if ((td->flags & TD_F_SCRAMBLE_BUFFERS) &&
+			} else if ((td->flags & TD_F_SCRAMBLE_BUFFERS) &&
 				   !(td->flags & TD_F_COMPRESS))
 				do_scramble = 1;
 			if (td->flags & TD_F_VER_NONE) {
ioengine.h +5 -1
index 85923fc..f9a0235 100644
@@ -46,11 +46,15 @@ struct io_u {
 	enum fio_ddir acct_ddir;
 
 	/*
+	 * Write generation
+	 */
+	unsigned short numberio;
+
+	/*
 	 * Allocated/set buffer and length
 	 */
 	unsigned long buflen;
 	unsigned long long offset;
-	unsigned short numberio;
 	void *buf;
 
 	/*
tools/genfio +7 -1
index 4d32d13..6800452 100755
@@ -54,6 +54,8 @@ show_help() {
 					Default is $IODEPTH
 -d disk1[,disk2,disk3,..]	: Run the tests on the selected disks
 					Separated each disk with a comma
+-z filesize                     : Specify the working file size, if you are passing filepaths to -d
+                                        Disabled by default
 -r seconds			: Time in seconds per benchmark
 					0 means till the end of the device
 					Default is $RUNTIME seconds
@@ -203,7 +205,7 @@ esac
 }
 
 parse_cmdline() {
-while getopts "hacpsd:b:r:m:x:D:A:B:" opt; do
+while getopts "hacpsd:b:r:m:x:z:D:A:B:" opt; do
   case $opt in
     h)
 	show_help
@@ -260,6 +262,10 @@ while getopts "hacpsd:b:r:m:x:D:A:B:" opt; do
     A)
 	echo "exec_postrun=$OPTARG" >> $TEMPLATE
       ;;
+    z)
+	FSIZE=$OPTARG
+	echo "size=$FSIZE" >> $TEMPLATE
+      ;;
     \?)
       echo "Invalid option: -$OPTARG" >&2
       ;;