Recent changes (master)
The following changes since commit 9acb08a9957b1111a06fbca6af113fa0c98dbd7c:
Merge branch 'doc-patches' of https://github.com/vincentkfu/fio (2017-09-14 11:37:34 -0600)
are available in the git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to 51102e0d64a2ae08472ecb90a72737f08de942fb:
add fio_set_directio() error message for platforms without direct I/O (2017-09-18 12:43:27 -0600)
----------------------------------------------------------------
Tomohiro Kusumi (4):
lib/memalign: don't malloc size twice
fix strncpy(3) copy length
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 ++-- lib/memalign.c | 2 +- os/windows/posix.c | 3 ++- server.c | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-)
---
Diff of recent changes:
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: direct IO is not supported on this host operating system\n" );return -1 ;#endif }
ioengines.c +2 -2
@@ -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 ) {
lib/memalign.c +1 -1
@@ -18,7 +18,7 @@ void *fio_memalign(size_t alignment, size_t size)assert (!(alignment & (alignment -1 ))); - ptr =malloc (size + alignment + size +sizeof (*f) -1 ); + ptr =malloc (size + alignment +sizeof (*f) -1 );if (ptr) { ret =PTR_ALIGN (ptr, alignment -1 ); f = ret + size;
os/windows/posix.c +2 -1
@@ -584,7 +584,8 @@ char *basename(char *path)while (path[i] !='\\' && path[i] !='/' && i >=0 ) i--; -strncpy (name, path + i +1 ,MAX_PATH ); + name[MAX_PATH -1 ] ='\0' ; +strncpy (name, path + i +1 ,MAX_PATH -1 );return name; }
server.c +1 -1
@@ -856,7 +856,7 @@ static int handle_probe_cmd(struct fio_net_cmd *cmd)#ifdef CONFIG_BIG_ENDIAN probe.bigendian =1 ;#endif -strncpy ((char *) probe.fio_version, fio_version_string,sizeof (probe.fio_version)); +strncpy ((char *) probe.fio_version, fio_version_string,sizeof (probe.fio_version) -1 ); probe.os =FIO_OS ; probe.arch =FIO_ARCH ;