All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] Make check_mount_writes() test appropriate device types
@ 2017-03-13 18:14 kusumi.tomohiro
  2017-03-13 18:14 ` [PATCH 2/7] HOWTO: Add note/exception on allow_mounted_write= kusumi.tomohiro
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: kusumi.tomohiro @ 2017-03-13 18:14 UTC (permalink / raw)
  To: axboe, fio; +Cc: Tomohiro Kusumi

From: Tomohiro Kusumi <tkusumi@tuxera.com>

There are platforms that use chrdev (instead of blkdev) for block
devices, thus check_mount_writes() needs to test an appropriate file
type(s) for potential mounted devices.

fio has had a macro FIO_HAVE_CHARDEV_SIZE basically for those using
chrdev for block devices, and this macro can be used here as well.

In FreeBSD and several others, blkdev is no longer used as a file type,
so it's safe to only test FIO_TYPE_CHAR if FIO_HAVE_CHARDEV_SIZE is
defined, but this commit leaves FIO_TYPE_BLOCK test since some
platforms may have/use both for block devices (not sure if exist).

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

diff --git a/backend.c b/backend.c
index 2e8a994..b61de7c 100644
--- a/backend.c
+++ b/backend.c
@@ -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;
-- 
2.9.3



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/7] HOWTO: Add note/exception on allow_mounted_write=
  2017-03-13 18:14 [PATCH 1/7] Make check_mount_writes() test appropriate device types kusumi.tomohiro
@ 2017-03-13 18:14 ` kusumi.tomohiro
  2017-03-13 18:26   ` Jens Axboe
  2017-03-13 18:14 ` [PATCH 3/7] Minor fixup for page cache invalidation debug prints kusumi.tomohiro
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 10+ messages in thread
From: kusumi.tomohiro @ 2017-03-13 18:14 UTC (permalink / raw)
  To: axboe, fio; +Cc: Tomohiro Kusumi

From: Tomohiro Kusumi <tkusumi@tuxera.com>

allow_mounted_write= is useful on Linux, but some platforms
just return some error on open(2) for mounted devices.

 # uname
 Linux
 # mkfs.ext4 /dev/loop0 > /dev/null
 mke2fs 1.43.3 (04-Sep-2016)
 # mount /dev/loop0 /mnt
 # mount | grep /dev/loop0
 /dev/loop0 on /mnt type ext4 (rw,relatime,seclabel,data=ordered)
 # fio --name=xxxxx --ioengine=sync --rw=write --bs=32k --size=1m --filename=/dev/loop0
 xxxxx: (g=0): rw=write, bs=32.0KiB-32.0KiB,32.0KiB-32.0KiB,32.0KiB-32.0KiB, ioengine=sync, iodepth=1
 fio-2.18-21-gca205
 fio: /dev/loop0 appears mounted, and 'allow_mounted_write' isn't set. Aborting.
 Run status group 0 (all jobs):
 # fio --name=xxxxx --ioengine=sync --rw=write --bs=32k --size=1m --filename=/dev/loop0 --allow_mounted_write=1 > /dev/null; echo $?
 0

 # uname
 FreeBSD
 # newfs /dev/da1 > /dev/null
 # mount /dev/da1 /mnt
 # mount | grep /dev/da1
 /dev/da1 on /mnt (ufs, local)
 # fio --name=xxxxx --ioengine=sync --rw=write --bs=32k --size=1m --filename=/dev/da1 --allow_mounted_write=1
 fio: this platform does not support process shared mutexes, forcing use of threads. Use the 'thread' option to get rid of this warning.
 xxxxx: (g=0): rw=write, bs=32.0KiB-32.0KiB,32.0KiB-32.0KiB,32.0KiB-32.0KiB, ioengine=sync, iodepth=1
 fio-2.18-21-gca205
 Starting 1 thread
 fio: failed opening chardev /dev/da1 for size check
 file:filesetup.c:654, func=open(/dev/da1), error=Operation not permitted
 fio: pid=0, err=1/file:filesetup.c:654, func=open(/dev/da1), error=Operation not permitted
 Run status group 0 (all jobs)

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

diff --git a/HOWTO b/HOWTO
index c2c6509..e376ea5 100644
--- a/HOWTO
+++ b/HOWTO
@@ -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
 
-- 
2.9.3



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/7] Minor fixup for page cache invalidation debug prints
  2017-03-13 18:14 [PATCH 1/7] Make check_mount_writes() test appropriate device types kusumi.tomohiro
  2017-03-13 18:14 ` [PATCH 2/7] HOWTO: Add note/exception on allow_mounted_write= kusumi.tomohiro
@ 2017-03-13 18:14 ` kusumi.tomohiro
  2017-03-13 18:15 ` [PATCH 4/7] Use ENOTSUP if OS doesn't support blkdev page cache invalidation kusumi.tomohiro
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: kusumi.tomohiro @ 2017-03-13 18:14 UTC (permalink / raw)
  To: axboe, fio; +Cc: Tomohiro Kusumi

From: Tomohiro Kusumi <tkusumi@tuxera.com>

offset/length is used only for posix_fadvise(2), and each invalidation
method has its own meaning, so use different messages for them.

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

diff --git a/filesetup.c b/filesetup.c
index 4d0b127..085d0c8 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -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;
 	} 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,11 @@ 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 (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
-- 
2.9.3



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/7] Use ENOTSUP if OS doesn't support blkdev page cache invalidation
  2017-03-13 18:14 [PATCH 1/7] Make check_mount_writes() test appropriate device types kusumi.tomohiro
  2017-03-13 18:14 ` [PATCH 2/7] HOWTO: Add note/exception on allow_mounted_write= kusumi.tomohiro
  2017-03-13 18:14 ` [PATCH 3/7] Minor fixup for page cache invalidation debug prints kusumi.tomohiro
@ 2017-03-13 18:15 ` kusumi.tomohiro
  2017-03-13 18:15 ` [PATCH 5/7] Fix errval variable to be positive errno value kusumi.tomohiro
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: kusumi.tomohiro @ 2017-03-13 18:15 UTC (permalink / raw)
  To: axboe, fio; +Cc: Tomohiro Kusumi

From: Tomohiro Kusumi <tkusumi@tuxera.com>

The return value of blockdev_invalidate_cache() has been platform
dependent (some pretend success, others return EINVAL) while Linux
is the only one actually supports this via Linux specific ioctl.

This commit makes all the rest return a consistent value ENOTSUP,
so __file_invalidate_cache() prints a blkdev invalidation failure
message that is consistent and makes sense.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
---
 filesetup.c       | 5 ++++-
 os/os-aix.h       | 2 +-
 os/os-dragonfly.h | 2 +-
 os/os-freebsd.h   | 2 +-
 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 +---
 10 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/filesetup.c b/filesetup.c
index 085d0c8..b04fb3e 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -479,6 +479,8 @@ static int __file_invalidate_cache(struct thread_data *td, struct fio_file *f,
 		}
 		if (ret < 0)
 			errval = errno;
+		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);
@@ -492,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;
 
diff --git a/os/os-aix.h b/os/os-aix.h
index 3d67765..bdc190a 100644
--- a/os/os-aix.h
+++ b/os/os-aix.h
@@ -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)
diff --git a/os/os-dragonfly.h b/os/os-dragonfly.h
index 97452ca..8a116e6 100644
--- a/os/os-dragonfly.h
+++ b/os/os-dragonfly.h
@@ -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)
diff --git a/os/os-freebsd.h b/os/os-freebsd.h
index 9d1af3b..c7863b5 100644
--- a/os/os-freebsd.h
+++ b/os/os-freebsd.h
@@ -82,7 +82,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)
diff --git a/os/os-hpux.h b/os/os-hpux.h
index 82acd11..1707ddd 100644
--- a/os/os-hpux.h
+++ b/os/os-hpux.h
@@ -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)
diff --git a/os/os-mac.h b/os/os-mac.h
index 0903a6f..7de36ea 100644
--- a/os/os-mac.h
+++ b/os/os-mac.h
@@ -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)
diff --git a/os/os-netbsd.h b/os/os-netbsd.h
index 2133d7a..e6ba508 100644
--- a/os/os-netbsd.h
+++ b/os/os-netbsd.h
@@ -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)
diff --git a/os/os-openbsd.h b/os/os-openbsd.h
index 3b19483..7def432 100644
--- a/os/os-openbsd.h
+++ b/os/os-openbsd.h
@@ -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)
diff --git a/os/os-solaris.h b/os/os-solaris.h
index 5b78cc2..73ad84a 100644
--- a/os/os-solaris.h
+++ b/os/os-solaris.h
@@ -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)
diff --git a/os/os-windows.h b/os/os-windows.h
index 616ad43..0c8c42d 100644
--- a/os/os-windows.h
+++ b/os/os-windows.h
@@ -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)
-- 
2.9.3



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/7] Fix errval variable to be positive errno value
  2017-03-13 18:14 [PATCH 1/7] Make check_mount_writes() test appropriate device types kusumi.tomohiro
                   ` (2 preceding siblings ...)
  2017-03-13 18:15 ` [PATCH 4/7] Use ENOTSUP if OS doesn't support blkdev page cache invalidation kusumi.tomohiro
@ 2017-03-13 18:15 ` kusumi.tomohiro
  2017-03-13 18:15 ` [PATCH 6/7] manpage: Add URL links to HOWTO/README kusumi.tomohiro
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: kusumi.tomohiro @ 2017-03-13 18:15 UTC (permalink / raw)
  To: axboe, fio; +Cc: Tomohiro Kusumi

From: Tomohiro Kusumi <tkusumi@tuxera.com>

The local variable errval is used for strerror(3) which only works
with positive values (i.e. -EXXX doesn't return an expected string).

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

diff --git a/filesetup.c b/filesetup.c
index b04fb3e..f2e47b1 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -447,7 +447,7 @@ static int __file_invalidate_cache(struct thread_data *td, struct fio_file *f,
 			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);
-- 
2.9.3



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 6/7] manpage: Add URL links to HOWTO/README
  2017-03-13 18:14 [PATCH 1/7] Make check_mount_writes() test appropriate device types kusumi.tomohiro
                   ` (3 preceding siblings ...)
  2017-03-13 18:15 ` [PATCH 5/7] Fix errval variable to be positive errno value kusumi.tomohiro
@ 2017-03-13 18:15 ` kusumi.tomohiro
  2017-03-13 18:15 ` [PATCH 7/7] Apply outbox patch from FreeBSD ports kusumi.tomohiro
  2017-03-13 18:27 ` [PATCH 1/7] Make check_mount_writes() test appropriate device types Jens Axboe
  6 siblings, 0 replies; 10+ messages in thread
From: kusumi.tomohiro @ 2017-03-13 18:15 UTC (permalink / raw)
  To: axboe, fio; +Cc: Tomohiro Kusumi

From: Tomohiro Kusumi <tkusumi@tuxera.com>

Add links to the official repository since whether HOWTO/README
get installed somewhere in fs is distributions/OS dependent.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
---
 fio.1 | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/fio.1 b/fio.1
index cc68dee..3348513 100644
--- a/fio.1
+++ b/fio.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
-- 
2.9.3



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 7/7] Apply outbox patch from FreeBSD ports
  2017-03-13 18:14 [PATCH 1/7] Make check_mount_writes() test appropriate device types kusumi.tomohiro
                   ` (4 preceding siblings ...)
  2017-03-13 18:15 ` [PATCH 6/7] manpage: Add URL links to HOWTO/README kusumi.tomohiro
@ 2017-03-13 18:15 ` kusumi.tomohiro
  2017-03-13 18:26   ` Jens Axboe
  2017-03-13 18:27 ` [PATCH 1/7] Make check_mount_writes() test appropriate device types Jens Axboe
  6 siblings, 1 reply; 10+ messages in thread
From: kusumi.tomohiro @ 2017-03-13 18:15 UTC (permalink / raw)
  To: axboe, fio; +Cc: Tomohiro Kusumi

From: Tomohiro Kusumi <tkusumi@tuxera.com>

FreeBSD has had this on their own, but no reason not to upstream.
https://github.com/freebsd/freebsd-ports/commit/271a84d2df7bc9b983fe2fabe1615d01202d429b

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
---
 os/os-freebsd.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/os/os-freebsd.h b/os/os-freebsd.h
index c7863b5..3d7dbe6 100644
--- a/os/os-freebsd.h
+++ b/os/os-freebsd.h
@@ -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)
-- 
2.9.3



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/7] HOWTO: Add note/exception on allow_mounted_write=
  2017-03-13 18:14 ` [PATCH 2/7] HOWTO: Add note/exception on allow_mounted_write= kusumi.tomohiro
@ 2017-03-13 18:26   ` Jens Axboe
  0 siblings, 0 replies; 10+ messages in thread
From: Jens Axboe @ 2017-03-13 18:26 UTC (permalink / raw)
  To: kusumi.tomohiro; +Cc: fio, Tomohiro Kusumi

On Mon, Mar 13 2017, kusumi.tomohiro@gmail.com wrote:
> From: Tomohiro Kusumi <tkusumi@tuxera.com>
> 
> allow_mounted_write= is useful on Linux, but some platforms
> just return some error on open(2) for mounted devices.

Yes, same thing for Windows, in fact.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 7/7] Apply outbox patch from FreeBSD ports
  2017-03-13 18:15 ` [PATCH 7/7] Apply outbox patch from FreeBSD ports kusumi.tomohiro
@ 2017-03-13 18:26   ` Jens Axboe
  0 siblings, 0 replies; 10+ messages in thread
From: Jens Axboe @ 2017-03-13 18:26 UTC (permalink / raw)
  To: kusumi.tomohiro; +Cc: fio, Tomohiro Kusumi

On Mon, Mar 13 2017, kusumi.tomohiro@gmail.com wrote:
> From: Tomohiro Kusumi <tkusumi@tuxera.com>
> 
> FreeBSD has had this on their own, but no reason not to upstream.
> https://github.com/freebsd/freebsd-ports/commit/271a84d2df7bc9b983fe2fabe1615d01202d429b

This commit needs a better title, I had no idea what it does until I
read the patch and the URL pointed at.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/7] Make check_mount_writes() test appropriate device types
  2017-03-13 18:14 [PATCH 1/7] Make check_mount_writes() test appropriate device types kusumi.tomohiro
                   ` (5 preceding siblings ...)
  2017-03-13 18:15 ` [PATCH 7/7] Apply outbox patch from FreeBSD ports kusumi.tomohiro
@ 2017-03-13 18:27 ` Jens Axboe
  6 siblings, 0 replies; 10+ messages in thread
From: Jens Axboe @ 2017-03-13 18:27 UTC (permalink / raw)
  To: kusumi.tomohiro; +Cc: fio, Tomohiro Kusumi

On Mon, Mar 13 2017, kusumi.tomohiro@gmail.com wrote:
> From: Tomohiro Kusumi <tkusumi@tuxera.com>
> 
> There are platforms that use chrdev (instead of blkdev) for block
> devices, thus check_mount_writes() needs to test an appropriate file
> type(s) for potential mounted devices.
> 
> fio has had a macro FIO_HAVE_CHARDEV_SIZE basically for those using
> chrdev for block devices, and this macro can be used here as well.
> 
> In FreeBSD and several others, blkdev is no longer used as a file type,
> so it's safe to only test FIO_TYPE_CHAR if FIO_HAVE_CHARDEV_SIZE is
> defined, but this commit leaves FIO_TYPE_BLOCK test since some
> platforms may have/use both for block devices (not sure if exist).

Applied this, and 2-6. Please resend 7/7 with a better commit log.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-03-13 18:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-13 18:14 [PATCH 1/7] Make check_mount_writes() test appropriate device types kusumi.tomohiro
2017-03-13 18:14 ` [PATCH 2/7] HOWTO: Add note/exception on allow_mounted_write= kusumi.tomohiro
2017-03-13 18:26   ` Jens Axboe
2017-03-13 18:14 ` [PATCH 3/7] Minor fixup for page cache invalidation debug prints kusumi.tomohiro
2017-03-13 18:15 ` [PATCH 4/7] Use ENOTSUP if OS doesn't support blkdev page cache invalidation kusumi.tomohiro
2017-03-13 18:15 ` [PATCH 5/7] Fix errval variable to be positive errno value kusumi.tomohiro
2017-03-13 18:15 ` [PATCH 6/7] manpage: Add URL links to HOWTO/README kusumi.tomohiro
2017-03-13 18:15 ` [PATCH 7/7] Apply outbox patch from FreeBSD ports kusumi.tomohiro
2017-03-13 18:26   ` Jens Axboe
2017-03-13 18:27 ` [PATCH 1/7] Make check_mount_writes() test appropriate device types Jens Axboe

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.