Set O_NOATIME on open for non-regular files
authorJens Axboe <jens.axboe@oracle.com>
Thu, 11 Oct 2007 19:41:41 +0000 (21:41 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 11 Oct 2007 19:41:41 +0000 (21:41 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
filesetup.c

index 47ddacfcddef8083b97e6c7f487af14d79475ae4..fca90be71f56b585ed73ce6a90996f74ca6fe030 100644 (file)
@@ -231,6 +231,8 @@ int generic_open_file(struct thread_data *td, struct fio_file *f)
                flags |= OS_O_DIRECT;
        if (td->o.sync_io)
                flags |= O_SYNC;
+       if (f->filetype != FIO_TYPE_FILE)
+               flags |= O_NOATIME;
 
        if (td_write(td)) {
                assert(!read_only);