Prevent file_append=1 with IO engine that can't extend files
authorJens Axboe <axboe@fb.com>
Tue, 18 Mar 2014 19:30:32 +0000 (13:30 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 18 Mar 2014 19:30:32 +0000 (13:30 -0600)
Signed-off-by: Jens Axboe <axboe@fb.com>
init.c

diff --git a/init.c b/init.c
index 73ec9eb22a8d2f36ff773f4e468fb1c4e3744bd5..9b0666d74e5651aa566dbae890715e644c62acc7 100644 (file)
--- a/init.c
+++ b/init.c
@@ -676,6 +676,11 @@ static int fixup_options(struct thread_data *td)
        if (td->o.rand_seed)
                td->o.rand_repeatable = 0;
 
+       if ((td->io_ops->flags & FIO_NOEXTEND) && td->o.file_append) {
+               log_err("fio: can't append/extent with IO engine %s\n", td->io_ops->name);
+               ret = 1;
+       }
+
        return ret;
 }