From d9e033b3bd2100d08dd85f41457476c5311464c7 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Wed, 8 Oct 2003 04:51:51 -0700 Subject: [PATCH] [PATCH] NFS: Enable NFS_DIRECTIO support Enable NFS_DIRECTIO support now that it has been fixed... --- fs/Kconfig | 24 ++++++++++++++++++++++++ include/linux/nfs_fs.h | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/fs/Kconfig b/fs/Kconfig index edf1ff424ef60..e61c963af94ed 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -1309,6 +1309,30 @@ config NFS_V4 If unsure, say N. +config NFS_DIRECTIO + bool "Allow direct I/O on NFS files (EXPERIMENTAL)" + depends on NFS_FS && EXPERIMENTAL + help + This option enables applications to perform uncached I/O on files + in NFS file systems using the O_DIRECT open() flag. When O_DIRECT + is set for a file, its data is not cached in the system's page + cache. Data is moved to and from user-level application buffers + directly. Unlike local disk-based file systems, NFS O_DIRECT has + no alignment restrictions. + + Unless your program is designed to use O_DIRECT properly, you are + much better off allowing the NFS client to manage data caching for + you. Misusing O_DIRECT can cause poor server performance or network + storms. This kernel build option defaults OFF to avoid exposing + system administrators unwittingly to a potentially hazardous + feature. + + For more details on NFS O_DIRECT, see fs/nfs/direct.c. + + If unsure, say N. This reduces the size of the NFS client, and + causes open() to return EINVAL if a file residing in NFS is + opened with the O_DIRECT flag. + config NFSD tristate "NFS server support" depends on INET diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 4520308410df6..93edc5a5ad984 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -264,7 +264,7 @@ nfs_file_cred(struct file *file) /* * linux/fs/nfs/direct.c */ -extern int nfs_direct_IO(int, struct file *, const struct iovec *, loff_t, +extern int nfs_direct_IO(int, struct kiocb *, const struct iovec *, loff_t, unsigned long); /* -- 2.53.0