From: Chuck Lever <cel@citi.umich.edu>

the final patch in this series adds an option in fs/Kconfig to allow NFS 
O_DIRECT to be enabled or disabled.




 fs/Kconfig |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+)

diff -puN fs/Kconfig~nfs-O_DIRECT-config-option fs/Kconfig
--- 25/fs/Kconfig~nfs-O_DIRECT-config-option	2003-06-17 16:00:30.000000000 -0700
+++ 25-akpm/fs/Kconfig	2003-06-17 16:00:30.000000000 -0700
@@ -1323,6 +1323,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

_