From 761cd09399a13c532ca3f28814c557940adedede Mon Sep 17 00:00:00 2001 From: Sitsofe Wheeler Date: Mon, 10 Apr 2017 18:37:00 +0300 Subject: [PATCH] doc: add ftruncate engine documentation and example jobfile Signed-off-by: Sitsofe Wheeler --- HOWTO | 5 +++++ examples/ftruncate.fio | 27 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 examples/ftruncate.fio diff --git a/HOWTO b/HOWTO index 80b9e75a..ffdcb755 100644 --- a/HOWTO +++ b/HOWTO @@ -1675,6 +1675,11 @@ I/O engine DDIR_TRIM does fallocate(,mode = FALLOC_FL_KEEP_SIZE|FALLOC_FL_PUNCH_HOLE). + **ftruncate** + I/O engine that sends :manpage:`ftruncate(2)` operations in response + to write (DDIR_WRITE) events. Each ftruncate issued sets the file's + size to the current block offset. Block size is ignored. + **e4defrag** I/O engine that does regular EXT4_IOC_MOVE_EXT ioctls to simulate defragment activity in request to DDIR_WRITE event. diff --git a/examples/ftruncate.fio b/examples/ftruncate.fio new file mode 100644 index 00000000..a6ef457a --- /dev/null +++ b/examples/ftruncate.fio @@ -0,0 +1,27 @@ +# Example ftruncate engine jobs + +[global] +ioengine=ftruncate +directory=/scratch +size=102404k ; 100Mb+4k +stonewall +filename=truncate +runtime=10s +time_based +direct=1 +# +# bs option is stub here. Truncation is performed on the current block offset. +# blocksize value is ignored +bs=4k + +# truncate the file to 4Kbytes then repeatedly grow the file back to just over +# its original size using subsequent truncates +[grow-truncate] +rw=write + +# Repeatedly change a file to a random size between 0Kbytes and 100Mb +# using truncates +[rand-truncate] +rw=randwrite +norandommap + -- 2.25.1