On Mon, Mar 6, 2017 at 2:23 PM, J. Bruce Fields <bfields@xxxxxxxxxxxx> wrote: > On Mon, Mar 06, 2017 at 11:27:23AM -0500, Olga Kornievskaia wrote: >> I don’t see copy_file_range() specifying that 0 means end of the file. > > Is there a reason that copy_file_range shouldn't be like read? (From > read(2): "On success, the number of bytes read is returned (zero > indicates end of file)". The only thing I can think of is the fact that copy_file_range() does write too. And return 0 from the write is not expected/allowed (except when input count was 0)? > I haven't checked, but suspect that's already true of the > implementations we have. > > Also, from copy_file_range(): > > EINVAL Requested range extends beyond the end of the source > file; or the flags argument is not 0. > > Some filesystems do this, some don't; I think the man page should make > it clear that this behavior is not required. > > --b. > -- > 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 -- 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