diff options
author | ps <ps@FreeBSD.org> | 2004-12-15 22:20:22 +0000 |
---|---|---|
committer | ps <ps@FreeBSD.org> | 2004-12-15 22:20:22 +0000 |
commit | 7c0944d56c2504d71b846fe79d625028c80cdfd8 (patch) | |
tree | c7f222f7a8c32bdc81d83fd0f9f6321889902c8b /sys/nfsclient/nfs.h | |
parent | ede2fb9751ccd8ce53c764a80e9c92cf19817e80 (diff) | |
download | FreeBSD-src-7c0944d56c2504d71b846fe79d625028c80cdfd8.zip FreeBSD-src-7c0944d56c2504d71b846fe79d625028c80cdfd8.tar.gz |
First cut of NFS direct IO support.
- NFS direct IO completely bypasses the buffer and page caches.
If a file is open for direct IO all caching is disabled.
- Direct IO for Directories will be addressed later.
- 2 new NFS directio related sysctls are added. One is a knob to
disable NFS direct IO completely (direct IO is enabled by default).
The other is to disallow mmaped IO on a file that has at least one
O_DIRECT open (see the comment in nfs_vnops.c for more details).
The default is to allow mmaps on a file that has O_DIRECT opens.
Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com
Obtained from: Yahoo!
Diffstat (limited to 'sys/nfsclient/nfs.h')
-rw-r--r-- | sys/nfsclient/nfs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/nfsclient/nfs.h b/sys/nfsclient/nfs.h index 4743ea2..92ba7de 100644 --- a/sys/nfsclient/nfs.h +++ b/sys/nfsclient/nfs.h @@ -124,6 +124,7 @@ MALLOC_DECLARE(M_NFSREQ); MALLOC_DECLARE(M_NFSDIROFF); MALLOC_DECLARE(M_NFSBIGFH); MALLOC_DECLARE(M_NFSHASH); +MALLOC_DECLARE(M_NFSDIRECTIO); #endif extern struct uma_zone *nfsmount_zone; @@ -275,6 +276,7 @@ int nfs_readdirrpc(struct vnode *, struct uio *, struct ucred *); int nfs_nfsiodnew(void); int nfs_asyncio(struct nfsmount *, struct buf *, struct ucred *, struct thread *); int nfs_doio(struct vnode *, struct buf *, struct ucred *, struct thread *); +void nfs_doio_directwrite (struct buf *); void nfs_up(struct nfsreq *, struct nfsmount *, struct thread *, const char *, int); void nfs_down(struct nfsreq *, struct nfsmount *, struct thread *, |