All of lore.kernel.org
 help / color / mirror / Atom feed
From: kusumi.tomohiro@gmail.com
To: axboe@kernel.dk, fio@vger.kernel.org
Cc: Tomohiro Kusumi <tkusumi@tuxera.com>
Subject: [PATCH 09/13] Ignore pre-read for character devices
Date: Tue, 28 Mar 2017 23:02:57 +0300	[thread overview]
Message-ID: <20170328200301.8622-9-tkusumi@tuxera.com> (raw)
In-Reply-To: <20170328200301.8622-1-tkusumi@tuxera.com>

From: Tomohiro Kusumi <tkusumi@tuxera.com>

pre_read_file() could ignore a chrdev due to its purpose of providing
unbuffered access to devices not limited to seekable disk devices,
while the purpose of this function (i.e. pre_read= option) is to
lseek(2) the given offset and page cache whatever read via read(2)
which is basically for filesystems and blkdevs.

(This commit directly goes on top of the one before previous one)

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
---
 filesetup.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/filesetup.c b/filesetup.c
index cd486ea..612e794 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -239,6 +239,9 @@ static int pre_read_file(struct thread_data *td, struct fio_file *f)
 	    td_ioengine_flagged(td, FIO_NOIO))
 		return 0;
 
+	if (f->filetype == FIO_TYPE_CHAR)
+		return 0;
+
 	if (!fio_file_open(f)) {
 		if (td->io_ops->open_file(td, f)) {
 			log_err("fio: cannot pre-read, failed to open file\n");
-- 
2.9.3



  parent reply	other threads:[~2017-03-28 20:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 20:02 [PATCH 01/13] Fix return value of make_filename() when no filename_format kusumi.tomohiro
2017-03-28 20:02 ` [PATCH 02/13] Use GOLDEN_RATIO_PRIME kusumi.tomohiro
2017-03-28 20:44   ` Jens Axboe
2017-03-28 21:17     ` Tomohiro Kusumi
2017-03-28 21:19       ` Jens Axboe
2017-03-28 20:02 ` [PATCH 03/13] Test malloc result when allocation size is tunable kusumi.tomohiro
2017-03-28 20:02 ` [PATCH 04/13] Don't malloc more than necessary on extending/prereading file kusumi.tomohiro
2017-03-28 20:02 ` [PATCH 05/13] HOWTO: Mention niche detail of range format options kusumi.tomohiro
2017-03-28 20:02 ` [PATCH 06/13] Drop redundant "ignore invalidate option" message from 21c1b29e kusumi.tomohiro
2017-03-28 20:02 ` [PATCH 07/13] Ignore pre-read for FIO_NOIO td kusumi.tomohiro
2017-03-28 20:02 ` [PATCH 08/13] Don't proceed with error set when failed to pre-read files/devices kusumi.tomohiro
2017-03-28 20:02 ` kusumi.tomohiro [this message]
2017-03-28 20:02 ` [PATCH 10/13] Drop prototype of unused function td_io_sync() kusumi.tomohiro
2017-03-28 20:02 ` [PATCH 11/13] Separate io_u from ioengine [1/3] - add io_u.h kusumi.tomohiro
2017-03-28 20:03 ` [PATCH 12/13] Separate io_u from ioengine [2/3] - move io_u functions kusumi.tomohiro
2017-03-28 20:03 ` [PATCH 13/13] Separate io_u from ioengine [3/3] - rename ioengine.h to ioengines.h kusumi.tomohiro
2017-03-28 21:14 ` [PATCH 01/13] Fix return value of make_filename() when no filename_format Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170328200301.8622-9-tkusumi@tuxera.com \
    --to=kusumi.tomohiro@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=tkusumi@tuxera.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.