X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=filesetup.c;h=6c241516ff9424f526e587b9acd620b817c9cdfb;hp=5134fdbb8af5a52e08e5ad8b60ea820e0caeab9f;hb=056f3459149a7670257350d84b49858718e4a0e6;hpb=046ee3021f5a8a951c41f6604341d26e74183df7 diff --git a/filesetup.c b/filesetup.c index 5134fdbb..6c241516 100644 --- a/filesetup.c +++ b/filesetup.c @@ -234,6 +234,7 @@ int generic_open_file(struct thread_data *td, struct fio_file *f) if (f->filetype != FIO_TYPE_FILE) flags |= O_NOATIME; +open_again: if (td_write(td)) { assert(!read_only); @@ -262,6 +263,11 @@ int generic_open_file(struct thread_data *td, struct fio_file *f) char buf[FIO_VERROR_SIZE]; int __e = errno; + if (errno == EPERM && (flags & O_NOATIME)) { + flags &= ~O_NOATIME; + goto open_again; + } + snprintf(buf, sizeof(buf) - 1, "open(%s)", f->file_name); td_verror(td, __e, buf);