Skip to contentSkip to conversation

minor fixes

PATCH Applied [email protected] 2 participants 6 messages Sep 18, 2017

lore
Share & tools
lore
#0 lore raw

v2 cover minor fixes

From: Tomohiro Kusumi <[email protected]>

v2 for the 2 patches out of 4 patches in v1.

1/2: Change "IO size" -> "block size".
2/2: Drop the conditional, since it's not really needed.

Tomohiro Kusumi (2):
add "invalid block size" to "first direct IO errored." message add fio_set_directio() error message for platforms without direct I/O

 filesetup.c | 1 +
 ioengines.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
Signature · 1 line
2.9.5
#1 lore raw

PATCH v2 1/2 add "invalid block size" to "first direct IO errored." message

From: Tomohiro Kusumi <[email protected]>

It could fail due to bs not multiple of sector size.

---
 ioengines.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
ioengines.c +2 -2
index fa4acab..9638d80 100644
@@ -342,8 +342,8 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u)
 	    td->o.odirect) {
 
 		log_info("fio: first direct IO errored. File system may not "
-			 "support direct IO, or iomem_align= is bad. Try "
-			 "setting direct=0.\n");
+			 "support direct IO, or iomem_align= is bad, or "
+			 "invalid block size. Try setting direct=0.\n");
 	}
 
 	if (!td->io_ops->commit || io_u->ddir == DDIR_TRIM) {
Signature · 1 line
2.9.5
Applied
#2 lore raw

Re: [PATCH v2 1/2] add "invalid block size" to "first direct IO errored." message

Quoted 3 lines · On 09/18/2017 12:23 PM, [email protected] wrote:

From: Tomohiro Kusumi <[email protected]>

It could fail due to bs not multiple of sector size.

Applied, thanks.

Signature · 1 line
Jens Axboe
#3 lore raw

PATCH v2 2/2 add fio_set_directio() error message for platforms without direct I/O

In reply to [email protected]

From: Tomohiro Kusumi <[email protected]>

This lets platforms without dio (e.g. OpenBSD) fail with an explicit message, otherwise they fail without a clue about dio even with --debug=all enabled.

The message assumes platforms with O_DIRECT do not call this function (and in fact they don't so it's not really a problem).

---
 filesetup.c | 1 +
 1 file changed, 1 insertion(+)
filesetup.c +1 -0
index b51ab35..9813873 100644
@@ -1868,6 +1868,7 @@ int fio_set_directio(struct thread_data *td, struct fio_file *f)
 
 	return 0;
 #else
+	log_err("fio: the file system does not seem to support direct IO\n");
 	return -1;
 #endif
 }
Signature · 1 line
2.9.5
#4 lore raw

Re: [PATCH v2 2/2] add fio_set_directio() error message for platforms without direct I/O

Quoted 19 lines · On 09/18/2017 12:23 PM, [email protected] wrote:

From: Tomohiro Kusumi <[email protected]>

This lets platforms without dio (e.g. OpenBSD) fail with an explicit message, otherwise they fail without a clue about dio even with --debug=all enabled.

The message assumes platforms with O_DIRECT do not call this function (and in fact they don't so it's not really a problem).

---
 filesetup.c | 1 +
 1 file changed, 1 insertion(+)
filesetup.c +0 -0
index b51ab35..9813873 100644

filesetup.c int fio_set_directio(struct thread_data *td, struct fio_file *f) · line 1871

Quoted 4 lines
filesetup.c +1 -0
@@ -1868,6 +1868,7 @@ int fio_set_directio(struct thread_data *td, struct fio_file *f)
 
 	return 0;
 #else
+	log_err("fio: the file system does not seem to support direct IO\n");

Should have caught this the first time, sorry... But that should say "the operating system", it's not a file system condition. I'd use something ala:

fio: direct IO is not supported on this host operating system

since it is possible that the OS does in fact support some variant of direct IO, but fio doesn't support it on that platform.

Signature · 1 line
Jens Axboe
#5 lore raw

Re: [PATCH v2 2/2] add fio_set_directio() error message for platforms without direct I/O

Right..
Sorry, I just reused the message right above which originates 42f1ee68ceec87fbbfdc4972c35d3cdf7c08d9f6 ("Improve informativeness about directIO support or rather lackthereof on Solaris when errno is set to ENOTTY").

I'll send v3.

2017-09-18 21:26 GMT+03:00 Jens Axboe <[email protected]>:

Quoted 36 lines · On 09/18/2017 12:23 PM, [email protected] wrote:
Quoted 19 lines

From: Tomohiro Kusumi <[email protected]>

This lets platforms without dio (e.g. OpenBSD) fail with an explicit message, otherwise they fail without a clue about dio even with --debug=all enabled.

The message assumes platforms with O_DIRECT do not call this function (and in fact they don't so it's not really a problem).

---
 filesetup.c | 1 +
 1 file changed, 1 insertion(+)
filesetup.c +0 -0
index b51ab35..9813873 100644

filesetup.c int fio_set_directio(struct thread_data *td, struct fio_file *f) · line 1871

Quoted 4 lines
filesetup.c +1 -0
@@ -1868,6 +1868,7 @@ int fio_set_directio(struct thread_data *td, struct fio_file *f)
 
      return 0;
 #else
+     log_err("fio: the file system does not seem to support direct IO\n");

Should have caught this the first time, sorry... But that should say "the operating system", it's not a file system condition. I'd use something ala:

fio: direct IO is not supported on this host operating system

since it is possible that the OS does in fact support some variant of direct IO, but fio doesn't support it on that platform.

--
Jens Axboe