Skip to contentSkip to conversation

add a filecreate engine

PATCH In review Josef Bacik 2 participants 2 messages Oct 6, 2017 – Oct 9, 2017 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add a filecreate engine

This is for doing empty file creation jobs much like what we do with fs_mark. You still need to specify a filesize so that fio will pretend to do something, but the IO won't actually be done on the file.

---
 HOWTO                |  4 +++
 Makefile             |  2 +-
 engines/filecreate.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 fio.1                |  4 +++
 4 files changed, 98 insertions(+), 1 deletion(-)
 create mode 100644 engines/filecreate.c
HOWTO +4 -0
index 8fad2ce6f4d8..df79e2dffb30 100644
@@ -1797,6 +1797,10 @@ I/O engine
 			absolute or relative. See :file:`engines/skeleton_external.c` for
 			details of writing an external I/O engine.
 
+		**filecreate**
+			Simply create the files and do no IO to them.  You still need to
+			set  `filesize` so that all the accounting still occurs, but no
+			actual IO will be done other than creating the file.
 
 I/O engine specific parameters
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Makefile +1 -1
index 3764da550851..76243ffb056e 100644
@@ -42,7 +42,7 @@ SOURCE :=	$(sort $(patsubst $(SRCDIR)/%,%,$(wildcard $(SRCDIR)/crc/*.c)) \
 		eta.c verify.c memory.c io_u.c parse.c mutex.c options.c \
 		smalloc.c filehash.c profile.c debug.c engines/cpu.c \
 		engines/mmap.c engines/sync.c engines/null.c engines/net.c \
-		engines/ftruncate.c \
+		engines/ftruncate.c engines/filecreate.c \
 		server.c client.c iolog.c backend.c libfio.c flow.c cconv.c \
 		gettime-thread.c helpers.c json.c idletime.c td_error.c \
 		profiles/tiobench.c profiles/act.c io_u_queue.c filelock.c \
engines/filecreate.c new file +89 -0

89 lines not on this page · raw message

fio.1 +4 -0
index b943db2289d6..68ed3ba457b9 100644
@@ -1577,6 +1577,10 @@ the engine filename, e.g. `ioengine=external:/tmp/foo.o' to load
 ioengine `foo.o' in `/tmp'. The path can be either
 absolute or relative. See `engines/skeleton_external.c' in the fio source for
 details of writing an external I/O engine.
+.TP
+.B filecreate
+Create empty files only.  \fBfilesize\fR still needs to be specified so that fio
+will run and grab latency results, but no IO will actually be done on the files.
 .SS "I/O engine specific parameters"
 In addition, there are some parameters which are only valid when a specific
 \fBioengine\fR is in use. These are used identically to normal parameters,
Signature · 1 line
2.7.4
#1 lore raw
Quoted 3 lines · Josef Bacik

This is for doing empty file creation jobs much like what we do with fs_mark. You still need to specify a filesize so that fio will pretend to do something, but the IO won't actually be done on the file.

Looks fine to me, though the HOWTO/man page bit could use some explanation of how latencies are tracked as reads. Should also have an example job file to go with it. Just looking at the documentation now, it's pretty much impossible to figure out how to use this, without looking at the source code.

Signature · 1 line
Jens Axboe