.\" 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_READ" "9" "09 October 2005" "" "" .SH NAME nfs_file_direct_read \- file direct read operation for NFS files .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp ssize_t nfs_file_direct_read (struct kiocb * \fIiocb\fB, 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 into which to read data .TP \fB\fIcount\fB\fR -- undescribed -- .TP \fB\fIpos\fB\fR -- undescribed -- .SH "COUNT" .PP number of bytes to read .SH "POS" .PP byte offset in file where reading starts .PP We use this function for direct reads instead of calling \fBgeneric_file_aio_read\fR in order to avoid gfar's check to see if the request starts before the end of the file. For that check to work, we must generate a GETATTR before each direct read, and even then there is a window between the GETATTR and the subsequent READ where the file size could change. So our preference is simply to do all reads the application wants, and the server will take care of managing the end of file boundary. .PP This function also eliminates unnecessarily updating the file's atime locally, as the NFS server sets the file's atime, and this client must read the updated atime from the server back into its cache.