Thread (2 messages) 2 messages, 2 authors, 2017-03-07

Re: [RFC v1 01/19] Don't copy beyond the end of the file

flat view

From: J. Bruce Fields <hidden>
Date: 2017-03-06 19:23:04
Also in: linux-fsdevel, linux-nfs

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)".

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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help