.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "NFS_FILE_DIRECT_WRITE" "9" "09 October 2005" "" ""
.SH NAME
nfs_file_direct_write \- file direct write operation for NFS files
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
ssize_t nfs_file_direct_write (struct kiocb * \fIiocb\fB, const char __user * \fIbuf\fB, size_t \fIcount\fB, loff_t \fIpos\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIiocb\fB\fR
target I/O control block
.TP
\fB\fIbuf\fB\fR
user's buffer from which to write data
.TP
\fB\fIcount\fB\fR
-- undescribed --
.TP
\fB\fIpos\fB\fR
-- undescribed --
.SH "COUNT"
.PP
number of bytes to write
.SH "POS"
.PP
byte offset in file where writing starts
.PP
We use this function for direct writes instead of calling
\fBgeneric_file_aio_write\fR in order to avoid taking the inode
semaphore and updating the i_size. The NFS server will set
the new i_size and this client must read the updated size
back into its cache. We let the server do generic write
parameter checking and report problems.
.PP
We also avoid an unnecessary invocation of \fBgeneric_osync_inode\fR,
as it is fairly meaningless to sync the metadata of an NFS file.
.PP
We eliminate local atime updates, see direct read above.
.PP
We avoid unnecessary page cache invalidations for normal cached
readers of this file.
.PP
Note that O_APPEND is not supported for NFS direct writes, as there
is no atomic O_APPEND write facility in the NFS protocol.