Re: fixed up version of testcfr.c

Rick Macklem <[email protected]>
Newsgroups gmane.ietf.nfsv4
Message-ID <YQBPR0101MB1652D0E18CB0A021FCE823D7DD920@YQBPR0101MB1652.CANPRD01.PROD.OUTLOOK.COM>
Trond Myklebust wrote:
>Hi Rick
>
>On Tue, 2019-10-15 at 23:33 +0000, Rick Macklem wrote:
>> Attached is a version of testcfr.c that seems to work for a Linux
>> NFSv4.2 client when compiled with "-DDOSYNC". DOSYNC adds
>> some fsync(2) calls plus close()/open() after doing the
>> copy_file_range().
>> { I'm not sure that a client app should need to do these things, but
>> that's
>>   up to the Linux community. }
>>
>> At least for Fedora30, a copy_file_range() where the in_fd and out_fd
>> are
>> the same file and the byte range overlaps returns success, but the
>> data
>> seems bogus. However, this occurs when run on a local FS as well, so
>> I don't think it's a Linux NFSv4.2 client bug.
>>
>
>
>The above would be a server bug. According to RFC7862 section 15.2.3:
>
>   SAVED_FH and CURRENT_FH must be different files.  If SAVED_FH and
>   CURRENT_FH refer to the same file, the operation MUST fail with
>   NFS4ERR_INVAL.
If the client attempted a Copy for this case, then, yes.
But if you look at a packet trace, the client doesn't attempt a Copy, but tries
to do this with a Write.

rick


--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
[email protected]



_______________________________________________
nfsv4 mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/nfsv4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.