All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about NFSv4.2 server-side copy implementation
@ 2017-02-14 20:07 Mora, Jorge
  2017-02-15 10:36 ` Kinglong Mee
  2017-02-17 20:02 ` J. Bruce Fields
  0 siblings, 2 replies; 7+ messages in thread
From: Mora, Jorge @ 2017-02-14 20:07 UTC (permalink / raw)
  To: linux-nfs@vger.kernel.org

Hello,
=20
The NFSv4.2 spec (RFC 7862) on section 15.2.3 (COPY description) says the f=
ollowing:
=20
If the source offset or the source offset plus count is greater than
the size of the source file, the operation MUST fail with
NFS4ERR_INVAL.
=20
I can understand failing with NFS4ERR_INVAL when the source offset is beyon=
d the end of the file,
but do you think failing with NFS4ERR_INVAL is too strict when the source o=
ffset plus the count is beyond the end of the file?
What is the rationalization for failing on this specific instance?
Why not return a short copy instead?
Can the COPY return a count less than what it requested (a short copy)?
=20
As of right now, the implementation on the Linux server adheres to the spec=
 but copy_file_range succeeds
when it is called against the local file system, NFSv4.x or NFSv3.
For the local file system, NFSv4.x or NFSv3 copy_file_range falls back to r=
egular copy by
reading from the source file and then writing to the destination file but I=
 do believe the
syscall should be consistent regardless of the underlying file system.
=20
=20
--Jorge

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-02-17 21:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-14 20:07 Question about NFSv4.2 server-side copy implementation Mora, Jorge
2017-02-15 10:36 ` Kinglong Mee
2017-02-15 15:00   ` Trond Myklebust
2017-02-15 15:40   ` Olga Kornievskaia
2017-02-17 20:02 ` J. Bruce Fields
2017-02-17 21:10   ` Olga Kornievskaia
2017-02-17 21:21     ` J. Bruce Fields

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.