X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=filesetup.c;h=bb25cd5c20bf43ea46646f3b5fb799637e23f5f2;hp=bd975d82470ce4dc7bedb82a5f1cbd151e5574c1;hb=b5605e9ded4188ed91faae1a43ecd333a9856f62;hpb=cbf5c1d7a2286fa1cf548c0678b3b0bf13bcda7e;ds=sidebyside diff --git a/filesetup.c b/filesetup.c index bd975d82..bb25cd5c 100644 --- a/filesetup.c +++ b/filesetup.c @@ -181,7 +181,7 @@ int file_invalidate_cache(struct thread_data *td, struct fio_file *f) log_err("fio: only root may flush block devices. Cache flush bypassed!\n"); ret = 0; } - } else if (f->filetype == FIO_TYPE_CHAR) + } else if (f->filetype == FIO_TYPE_CHAR || f->filetype == FIO_TYPE_PIPE) ret = 0; if (ret < 0) { @@ -485,6 +485,8 @@ static void get_file_type(struct fio_file *f) f->filetype = FIO_TYPE_BD; else if (S_ISCHR(sb.st_mode)) f->filetype = FIO_TYPE_CHAR; + else if (S_ISFIFO(sb.st_mode)) + f->filetype = FIO_TYPE_PIPE; } }