Recent changes (master)
The following changes since commit e9bd687d147d5aee710d56854524bbada5a34650:
Makefile: make test target use thread (2017-03-12 21:04:45 -0600)
are available in the git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to 1df28a3960734e1e00cb2e5fe0e261fcba30f7c7:
Conditionally enable FIO_HAVE_PSHARED_MUTEX on FreeBSD (2017-03-13 12:54:18 -0600)
----------------------------------------------------------------
Jens Axboe (1):
rbd: don't log version to stdout
Tomohiro Kusumi (7):
Make check_mount_writes() test appropriate device types
HOWTO: Add note/exception on allow_mounted_write= Minor fixup for page cache invalidation debug prints Use ENOTSUP if OS doesn't support blkdev page cache invalidation Fix errval variable to be positive errno value
manpage: Add URL links to HOWTO/README
Conditionally enable FIO_HAVE_PSHARED_MUTEX on FreeBSD
HOWTO | 3 ++- backend.c | 8 ++++++++ engines/rbd.c | 5 ----- filesetup.c | 20 ++++++++++++++------ fio.1 | 9 ++++++++- os/os-aix.h | 2 +- os/os-dragonfly.h | 2 +- os/os-freebsd.h | 6 +++++- os/os-hpux.h | 2 +- os/os-mac.h | 2 +- os/os-netbsd.h | 2 +- os/os-openbsd.h | 2 +- os/os-solaris.h | 2 +- os/os-windows.h | 4 +--- 14 files changed, 45 insertions(+), 24 deletions(-)
---
Diff of recent changes:
HOWTO +2 -1
@@ -886,7 +886,8 @@ Target file/device If this isn't set, fio will abort jobs that are destructive (e.g. that write) to what appears to be a mounted device or partition. This should help catch creating inadvertently destructive tests, not realizing that the test will - destroy data on the mounted file system. Default: false. + destroy data on the mounted file system. Note that some platforms don't allow + writing against a mounted device regardless of this option. Default: false. .. option:: pre_read=bool
backend.c +8 -0
@@ -2056,8 +2056,16 @@ static bool check_mount_writes(struct thread_data *td)if (!td_write (td) || td->o.allow_mounted_write)return false; +/* +* If FIO_HAVE_CHARDEV_SIZE is defined, it's likely that chrdevs +* are mkfs'd and mounted. +*/ for_each_file (td, f, i) { +#ifdef FIO_HAVE_CHARDEV_SIZE +if (f->filetype !=FIO_TYPE_BLOCK && f->filetype !=FIO_TYPE_CHAR ) +#else if (f->filetype != FIO_TYPE_BLOCK) +#endif continue ;if (device_is_mounted (f->file_name)) goto mounted;
engines/rbd.c +0 -5
@@ -566,13 +566,8 @@ static int fio_rbd_setup(struct thread_data *td)rbd_image_info_t info;struct fio_file *f;struct rbd_data *rbd =NULL ; -int major, minor, extra;int r; -/* log version of librbd. No cluster connection required. */ -rbd_version (&major, &minor, &extra); -log_info ("rbd engine: RBD version: %d.%d.%d\n" , major, minor, extra); -/* allocate engine specific structure to deal with librbd. */ r =_fio_setup_rbd_data (td, &rbd);if (r) {
filesetup.c +14 -6
@@ -442,20 +442,22 @@ static int __file_invalidate_cache(struct thread_data *td, struct fio_file *f,if (len ==-1ULL || off ==-1ULL )return 0 ; -dprint (FD_IO ,"invalidate cache %s: %llu/%llu\n" , f->file_name, off, - len); -if (td->io_ops->invalidate) { +dprint (FD_IO ,"invalidate %s cache %s\n" , td->io_ops->name, + f->file_name); ret = td->io_ops->invalidate (td, f);if (ret <0 ) - errval = ret; + errval = -ret; }else if (f->filetype ==FIO_TYPE_FILE ) { +dprint (FD_IO ,"declare unneeded cache %s: %llu/%llu\n" , + f->file_name, off, len); ret =posix_fadvise (f->fd, off, len,POSIX_FADV_DONTNEED );if (ret) errval = ret; }else if (f->filetype ==FIO_TYPE_BLOCK ) {int retry_count =0 ; +dprint (FD_IO ,"drop page cache %s\n" , f->file_name); ret =blockdev_invalidate_cache (f);while (ret <0 && errno ==EAGAIN && retry_count++ <25 ) {/*
@@ -477,8 +479,13 @@ static int __file_invalidate_cache(struct thread_data *td, struct fio_file *f, }if (ret <0 ) errval = errno; - }else if (f->filetype ==FIO_TYPE_CHAR || f->filetype ==FIO_TYPE_PIPE ) +else if (ret)/* probably not supported */ + errval = ret; + }else if (f->filetype ==FIO_TYPE_CHAR || + f->filetype ==FIO_TYPE_PIPE ) { +dprint (FD_IO ,"invalidate not supported %s\n" , f->file_name); ret =0 ; + }/* * Cache flushing isn't a fatal condition, and we know it will
@@ -487,7 +494,8 @@ static int __file_invalidate_cache(struct thread_data *td, struct fio_file *f,* continue on our way. */ if (errval) -log_info ("fio: cache invalidation of %s failed: %s\n" , f->file_name,strerror (errval)); +log_info ("fio: cache invalidation of %s failed: %s\n" , + f->file_name,strerror (errval));return 0 ;
fio.1 +8 -1
@@ -1,4 +1,4 @@ -.TH fio 1 "December 2016" "User Manual" +.TH fio 1 "March 2017" "User Manual" .SH NAME fio \- flexible I/O tester .SH SYNOPSIS
@@ -2584,3 +2584,10 @@ See \fBREADME\fR. For further documentation see \fBHOWTO\fR and \fBREADME\fR. .br Sample jobfiles are available in the \fBexamples\fR directory. +.br +These are typically located under /usr/share/doc/fio. + +\fBHOWTO\fR: http://git.kernel.dk/?p=fio.git;a=blob_plain;f=HOWTO +.br +\fBREADME\fR: http://git.kernel.dk/?p=fio.git;a=blob_plain;f=README +.br
os/os-aix.h +1 -1
@@ -23,7 +23,7 @@static inline int blockdev_invalidate_cache (struct fio_file *f) { -return EINVAL ; +return ENOTSUP ; }static inline int blockdev_size (struct fio_file *f,unsigned long long *bytes)
os/os-dragonfly.h +1 -1
@@ -184,7 +184,7 @@ static inline int chardev_size(struct fio_file *f, unsigned long long *bytes)static inline int blockdev_invalidate_cache (struct fio_file *f) { -return EINVAL ; +return ENOTSUP ; }static inline unsigned long long os_phys_mem (void )
os/os-freebsd.h +5 -1
@@ -24,6 +24,10 @@#define FIO_HAVE_CPU_AFFINITY #define FIO_HAVE_SHM_ATTACH_REMOVED +#if _POSIX_THREAD_PROCESS_SHARED >0 +#define FIO_HAVE_PSHARED_MUTEX +#endif +#define OS_MAP_ANON MAP_ANON#define fio_swap16 (x) bswap16(x)
@@ -82,7 +86,7 @@ static inline int chardev_size(struct fio_file *f, unsigned long long *bytes)static inline int blockdev_invalidate_cache (struct fio_file *f) { -return EINVAL ; +return ENOTSUP ; }static inline unsigned long long os_phys_mem (void )
os/os-hpux.h +1 -1
@@ -44,7 +44,7 @@ typedef struct aiocb64 os_aiocb_t;static inline int blockdev_invalidate_cache (struct fio_file *f) { -return EINVAL ; +return ENOTSUP ; }static inline int blockdev_size (struct fio_file *f,unsigned long long *bytes)
os/os-mac.h +1 -1
@@ -77,7 +77,7 @@ static inline int chardev_size(struct fio_file *f, unsigned long long *bytes)static inline int blockdev_invalidate_cache (struct fio_file *f) { -return EINVAL ; +return ENOTSUP ; }static inline unsigned long long os_phys_mem (void )
os/os-netbsd.h +1 -1
@@ -54,7 +54,7 @@ static inline int blockdev_size(struct fio_file *f, unsigned long long *bytes)static inline int blockdev_invalidate_cache (struct fio_file *f) { -return EINVAL ; +return ENOTSUP ; }static inline unsigned long long os_phys_mem (void )
os/os-openbsd.h +1 -1
@@ -53,7 +53,7 @@ static inline int blockdev_size(struct fio_file *f, unsigned long long *bytes)static inline int blockdev_invalidate_cache (struct fio_file *f) { -return EINVAL ; +return ENOTSUP ; }static inline unsigned long long os_phys_mem (void )
os/os-solaris.h +1 -1
@@ -61,7 +61,7 @@ static inline int chardev_size(struct fio_file *f, unsigned long long *bytes)static inline int blockdev_invalidate_cache (struct fio_file *f) { -return 0 ; +return ENOTSUP ; }static inline unsigned long long os_phys_mem (void )
os/os-windows.h +1 -3
@@ -152,9 +152,7 @@ static inline int chardev_size(struct fio_file *f, unsigned long long *bytes)static inline int blockdev_invalidate_cache (struct fio_file *f) { -/* There's no way to invalidate the cache in Windows -* so just pretend to succeed */ -return 0 ; +return ENOTSUP ; }static inline unsigned long long os_phys_mem (void )