ssize_t nfs_file_direct_write (struct kiocb * iocb, const char __user * buf, size_t count, loff_t pos);
byte offset in file where writing starts
We use this function for direct writes instead of calling generic_file_aio_write 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.
We also avoid an unnecessary invocation of generic_osync_inode, as it is fairly meaningless to sync the metadata of an NFS file.
We eliminate local atime updates, see direct read above.
We avoid unnecessary page cache invalidations for normal cached readers of this file.
Note that O_APPEND is not supported for NFS direct writes, as there is no atomic O_APPEND write facility in the NFS protocol.