aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2008-03-14 14:14:56 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-03-19 18:00:34 -0400
commitecfc555a8327ff09b07066d73a98c04115007eec (patch)
tree304691e77d21b8cecfd529eddfdfb2ba3fdfac31 /fs/nfs
parent82d101d58a2312297ee79f96d44c1d8c7fe1032d (diff)
NFS: Always enable NFS direct I/O
Since O_DIRECT is a standard feature that is enabled in most distros, eliminate the CONFIG_NFS_DIRECTIO build option, and change the fs/nfs/Makefile to always build in the NFS direct I/O engine. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/Makefile3
-rw-r--r--fs/nfs/file.c6
-rw-r--r--fs/nfs/internal.h5
3 files changed, 1 insertions, 13 deletions
diff --git a/fs/nfs/Makefile b/fs/nfs/Makefile
index df0f41e09885..ac6170c594a3 100644
--- a/fs/nfs/Makefile
+++ b/fs/nfs/Makefile
@@ -5,7 +5,7 @@
5obj-$(CONFIG_NFS_FS) += nfs.o 5obj-$(CONFIG_NFS_FS) += nfs.o
6 6
7nfs-y := client.o dir.o file.o getroot.o inode.o super.o nfs2xdr.o \ 7nfs-y := client.o dir.o file.o getroot.o inode.o super.o nfs2xdr.o \
8 pagelist.o proc.o read.o symlink.o unlink.o \ 8 direct.o pagelist.o proc.o read.o symlink.o unlink.o \
9 write.o namespace.o mount_clnt.o 9 write.o namespace.o mount_clnt.o
10nfs-$(CONFIG_ROOT_NFS) += nfsroot.o 10nfs-$(CONFIG_ROOT_NFS) += nfsroot.o
11nfs-$(CONFIG_NFS_V3) += nfs3proc.o nfs3xdr.o 11nfs-$(CONFIG_NFS_V3) += nfs3proc.o nfs3xdr.o
@@ -14,5 +14,4 @@ nfs-$(CONFIG_NFS_V4) += nfs4proc.o nfs4xdr.o nfs4state.o nfs4renewd.o \
14 delegation.o idmap.o \ 14 delegation.o idmap.o \
15 callback.o callback_xdr.o callback_proc.o \ 15 callback.o callback_xdr.o callback_proc.o \
16 nfs4namespace.o 16 nfs4namespace.o
17nfs-$(CONFIG_NFS_DIRECTIO) += direct.o
18nfs-$(CONFIG_SYSCTL) += sysctl.o 17nfs-$(CONFIG_SYSCTL) += sysctl.o
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index ef57a5ae5904..10e8b807e7ff 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -234,10 +234,8 @@ nfs_file_read(struct kiocb *iocb, const struct iovec *iov,
234 ssize_t result; 234 ssize_t result;
235 size_t count = iov_length(iov, nr_segs); 235 size_t count = iov_length(iov, nr_segs);
236 236
237#ifdef CONFIG_NFS_DIRECTIO
238 if (iocb->ki_filp->f_flags & O_DIRECT) 237 if (iocb->ki_filp->f_flags & O_DIRECT)
239 return nfs_file_direct_read(iocb, iov, nr_segs, pos); 238 return nfs_file_direct_read(iocb, iov, nr_segs, pos);
240#endif
241 239
242 dfprintk(VFS, "nfs: read(%s/%s, %lu@%lu)\n", 240 dfprintk(VFS, "nfs: read(%s/%s, %lu@%lu)\n",
243 dentry->d_parent->d_name.name, dentry->d_name.name, 241 dentry->d_parent->d_name.name, dentry->d_name.name,
@@ -383,9 +381,7 @@ const struct address_space_operations nfs_file_aops = {
383 .write_end = nfs_write_end, 381 .write_end = nfs_write_end,
384 .invalidatepage = nfs_invalidate_page, 382 .invalidatepage = nfs_invalidate_page,
385 .releasepage = nfs_release_page, 383 .releasepage = nfs_release_page,
386#ifdef CONFIG_NFS_DIRECTIO
387 .direct_IO = nfs_direct_IO, 384 .direct_IO = nfs_direct_IO,
388#endif
389 .launder_page = nfs_launder_page, 385 .launder_page = nfs_launder_page,
390}; 386};
391 387
@@ -443,10 +439,8 @@ static ssize_t nfs_file_write(struct kiocb *iocb, const struct iovec *iov,
443 ssize_t result; 439 ssize_t result;
444 size_t count = iov_length(iov, nr_segs); 440 size_t count = iov_length(iov, nr_segs);
445 441
446#ifdef CONFIG_NFS_DIRECTIO
447 if (iocb->ki_filp->f_flags & O_DIRECT) 442 if (iocb->ki_filp->f_flags & O_DIRECT)
448 return nfs_file_direct_write(iocb, iov, nr_segs, pos); 443 return nfs_file_direct_write(iocb, iov, nr_segs, pos);
449#endif
450 444
451 dfprintk(VFS, "nfs: write(%s/%s(%ld), %lu@%Ld)\n", 445 dfprintk(VFS, "nfs: write(%s/%s(%ld), %lu@%Ld)\n",
452 dentry->d_parent->d_name.name, dentry->d_name.name, 446 dentry->d_parent->d_name.name, dentry->d_name.name,
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 999ad8ee0645..04ae867dddba 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -116,13 +116,8 @@ extern void nfs_destroy_readpagecache(void);
116extern int __init nfs_init_writepagecache(void); 116extern int __init nfs_init_writepagecache(void);
117extern void nfs_destroy_writepagecache(void); 117extern void nfs_destroy_writepagecache(void);
118 118
119#ifdef CONFIG_NFS_DIRECTIO
120extern int __init nfs_init_directcache(void); 119extern int __init nfs_init_directcache(void);
121extern void nfs_destroy_directcache(void); 120extern void nfs_destroy_directcache(void);
122#else
123#define nfs_init_directcache() (0)
124#define nfs_destroy_directcache() do {} while(0)
125#endif
126 121
127/* nfs2xdr.c */ 122/* nfs2xdr.c */
128extern int nfs_stat_to_errno(int); 123extern int nfs_stat_to_errno(int);