X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=init.c;h=af4cc6b75babde048f72c77de353e1f3ae031d94;hp=8d382602f4539bd75a2d8bc493c0dd6d1176c1ac;hb=53c508dd3f4013ed85d623f58a356c3937ddcfc6;hpb=1cce3c66140206967462f85646a50b0065da87e9 diff --git a/init.c b/init.c index 8d382602..af4cc6b7 100644 --- a/init.c +++ b/init.c @@ -594,6 +594,12 @@ static int fixup_options(struct thread_data *td) struct thread_options *o = &td->o; int ret = 0; + if (read_only && (td_write(td) || td_trim(td))) { + log_err("fio: trim and write operations are not allowed" + " with the --readonly parameter.\n"); + ret |= 1; + } + #ifndef CONFIG_PSHARED if (!o->use_thread) { log_info("fio: this platform does not support process shared"