On Mon, Oct 28, 2013 at 11:00:16AM -0400, Anna Schumaker wrote: > + struct nfs42_write_plus_args args = { > + .wp_fh = NFS_FH(inode), > + .wp_stable = NFS_FILE_SYNC, > + .wp_content = NFS4_CONTENT_HOLE, > + .wp_offset = offset, > + .wp_length = len, > + .wp_allocated = (mode == 0), > + }; After spending some time with draft 21 of the NFSv4.2 spec I don't think we can use WRITE_PLUS for the prealloc mode of fallocate. The problem with the NFS4_CONTENT_HOLE arm of WRITE_PLUS is that it is defined to zero the whole range, while fallocate is defined as being a no-op for parts of the range that already contain data. In addition we'll also need more sanity checks on the flags argument, there already is a FALLOC_FL_KEEP_SIZE not supportable by the NFS semantics (not that it nessecarily should), and more may be added in the future. Take a a look at the other fallocate implementations tha t have a quick check on the top for flags they don't support: if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE)) return -EOPNOTSUPP; -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html