* Fix dep calculation in Makefile.FreeBSD to ignore other os specific
header files, avoid blowing up on includes in os-solaris.h
* Mark FreeBSD as not supporting fdatasync()
* Add documentation note about FreeBSD not supporting fsyncdata=
* Add warning if fsyncdata= is used on os that doesn't support, fall
back to fsync()
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fsyncdata=int Like fsync= but uses fdatasync() to only sync data and not
metadata blocks.
fsyncdata=int Like fsync= but uses fdatasync() to only sync data and not
metadata blocks.
+ In FreeBSD there is no fdatasync(), this falls back to
+ using fsync()
overwrite=bool If true, writes to a file will always overwrite existing
data. If the file doesn't already exist, it will be
overwrite=bool If true, writes to a file will always overwrite existing
data. If the file doesn't already exist, it will be
io_u.c log.c memory.c mutex.c options.c parse.c rbtree.c smalloc.c \
stat.c parse.c crc/*.c engines/cpu.c engines/mmap.c \
engines/posixaio.c engines/sync.c engines/null.c engines/net.c \
io_u.c log.c memory.c mutex.c options.c parse.c rbtree.c smalloc.c \
stat.c parse.c crc/*.c engines/cpu.c engines/mmap.c \
engines/posixaio.c engines/sync.c engines/null.c engines/net.c \
+ *.h arch/*.h compiler/*.h crc/*.h lib/*.h \
+ os/indirect.h os/kcompat.h os/os-freebsd.h os/os.h os/syslet.h
ifneq ($(findstring $(MAKEFLAGS),s),s)
ifndef V
ifneq ($(findstring $(MAKEFLAGS),s),s)
ifndef V
" that isn't seekable. Pre-read disabled.\n");
}
" that isn't seekable. Pre-read disabled.\n");
}
+#ifndef FIO_HAVE_FDATASYNC
+ if (td->o.fdatasync_blocks) {
+ log_info("fio: this platform does not support fdatasync()"
+ " falling back to using fsync(). Use the 'fsync'"
+ " option instead of 'fdatasync' to get rid of"
+ " this warning\n");
+ td->o.fsync_blocks = td->o.fdatasync_blocks;
+ td->o.fdatasync_blocks = 0;
+ }
+#endif
+
#define FIO_HAVE_ODIRECT
#define FIO_USE_GENERIC_BDEV_SIZE
#define FIO_USE_GENERIC_RAND
#define FIO_HAVE_ODIRECT
#define FIO_USE_GENERIC_BDEV_SIZE
#define FIO_USE_GENERIC_RAND
-#define FIO_HAVE_FDATASYNC
#define OS_MAP_ANON MAP_ANON
#define OS_MAP_ANON MAP_ANON