[PATCH] disk_util: Allow an engine to turn off disk_util specifically
authorJens Axboe <jens.axboe@oracle.com>
Tue, 13 Mar 2007 07:15:18 +0000 (08:15 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 13 Mar 2007 07:15:18 +0000 (08:15 +0100)
Originally from Joel Becker <Joel.Becker@oracle.com>

An engine may support disks, but be unable to work with disk_util (as
there is no fd).  Add a flag to turn off disk_util from the engine.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.h
stat.c

diff --git a/fio.h b/fio.h
index e9f34e8ab550eb7c69ddf68d16f1e1056c82539c..0ca23cc0e6b09186b059e8bae86b266d22a6d5de 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -215,6 +215,7 @@ enum fio_ioengine_flags {
        FIO_RAWIO       = 1 << 1,       /* some sort of direct/raw io */
        FIO_DISKLESSIO  = 1 << 2,       /* no disk involved */
        FIO_NOEXTEND    = 1 << 3,       /* engine can't extend file */
+       FIO_NODISKUTIL  = 1 << 4,       /* diskutil can't handle filename */
 };
 
 /*
diff --git a/stat.c b/stat.c
index 1eb55be43f708119f43c69ec3f40d4c112940413..85d55b4ca91e825320c6c3a3ae26938a89a2afc9 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -249,7 +249,8 @@ void init_disk_util(struct thread_data *td)
        dev_t dev;
        char *p;
 
-       if (!td->do_disk_util || (td->io_ops->flags & FIO_DISKLESSIO))
+       if (!td->do_disk_util ||
+           (td->io_ops->flags & (FIO_DISKLESSIO | FIO_NODISKUTIL)))
                return;
 
        /*