* [PATCH] Permit COMMIT operations to return NFS4_OK
@ 2022-02-04 19:42 Chuck Lever
2022-02-04 21:02 ` Frank Filz
2022-02-04 21:11 ` J. Bruce Fields
0 siblings, 2 replies; 4+ messages in thread
From: Chuck Lever @ 2022-02-04 19:42 UTC (permalink / raw)
To: bfields; +Cc: linux-nfs
RFC 7530 permits COMMIT to return NFS4ERR_INVAL, but RFC 5661 and
later do not. Allow INVAL as a legacy behavior, but test for OK
also.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
nfs4.0/servertests/st_commit.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nfs4.0/servertests/st_commit.py b/nfs4.0/servertests/st_commit.py
index 12a0dffa061f..4ef87e69c5d7 100644
--- a/nfs4.0/servertests/st_commit.py
+++ b/nfs4.0/servertests/st_commit.py
@@ -160,4 +160,4 @@ def testCommitOverflow(t, env):
res = c.write_file(fh, _text, 0, stateid, how=UNSTABLE4)
check(res, msg="WRITE with how=UNSTABLE4")
res = c.commit_file(fh, 0xfffffffffffffff0, 64)
- check(res, NFS4ERR_INVAL, "COMMIT with offset + count overflow")
+ check(res, [NFS4_OK, NFS4ERR_INVAL], "COMMIT with offset + count overflow")
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH] Permit COMMIT operations to return NFS4_OK
2022-02-04 19:42 [PATCH] Permit COMMIT operations to return NFS4_OK Chuck Lever
@ 2022-02-04 21:02 ` Frank Filz
2022-02-04 21:06 ` Chuck Lever III
2022-02-04 21:11 ` J. Bruce Fields
1 sibling, 1 reply; 4+ messages in thread
From: Frank Filz @ 2022-02-04 21:02 UTC (permalink / raw)
To: 'Chuck Lever', bfields; +Cc: linux-nfs
> RFC 7530 permits COMMIT to return NFS4ERR_INVAL, but RFC 5661 and later do
> not. Allow INVAL as a legacy behavior, but test for OK also.
Do we have a 4.1 test to verify 4.1 and later doesn't return INVAL?
Frank
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> nfs4.0/servertests/st_commit.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/nfs4.0/servertests/st_commit.py b/nfs4.0/servertests/st_commit.py
> index 12a0dffa061f..4ef87e69c5d7 100644
> --- a/nfs4.0/servertests/st_commit.py
> +++ b/nfs4.0/servertests/st_commit.py
> @@ -160,4 +160,4 @@ def testCommitOverflow(t, env):
> res = c.write_file(fh, _text, 0, stateid, how=UNSTABLE4)
> check(res, msg="WRITE with how=UNSTABLE4")
> res = c.commit_file(fh, 0xfffffffffffffff0, 64)
> - check(res, NFS4ERR_INVAL, "COMMIT with offset + count overflow")
> + check(res, [NFS4_OK, NFS4ERR_INVAL], "COMMIT with offset + count
> + overflow")
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Permit COMMIT operations to return NFS4_OK
2022-02-04 21:02 ` Frank Filz
@ 2022-02-04 21:06 ` Chuck Lever III
0 siblings, 0 replies; 4+ messages in thread
From: Chuck Lever III @ 2022-02-04 21:06 UTC (permalink / raw)
To: Frank Filz; +Cc: Bruce Fields, Linux NFS Mailing List
> On Feb 4, 2022, at 4:02 PM, Frank Filz <ffilzlnx@mindspring.com> wrote:
>
>> RFC 7530 permits COMMIT to return NFS4ERR_INVAL, but RFC 5661 and later do
>> not. Allow INVAL as a legacy behavior, but test for OK also.
>
> Do we have a 4.1 test to verify 4.1 and later doesn't return INVAL?
No v4.1-related test that I'm aware of.
Note that RFC 1813 also restricts the use of NFS3ERR_INVAL with COMMIT.
We therefore believe that RFC 7530 mistakenly permits the use of
NFS4ERR_INVAL with COMMIT. Because the specs are not consistent in this
area, we chose to allow either result in CMT4.
> Frank
>
>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
>> ---
>> nfs4.0/servertests/st_commit.py | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/nfs4.0/servertests/st_commit.py b/nfs4.0/servertests/st_commit.py
>> index 12a0dffa061f..4ef87e69c5d7 100644
>> --- a/nfs4.0/servertests/st_commit.py
>> +++ b/nfs4.0/servertests/st_commit.py
>> @@ -160,4 +160,4 @@ def testCommitOverflow(t, env):
>> res = c.write_file(fh, _text, 0, stateid, how=UNSTABLE4)
>> check(res, msg="WRITE with how=UNSTABLE4")
>> res = c.commit_file(fh, 0xfffffffffffffff0, 64)
>> - check(res, NFS4ERR_INVAL, "COMMIT with offset + count overflow")
>> + check(res, [NFS4_OK, NFS4ERR_INVAL], "COMMIT with offset + count
>> + overflow")
>
>
--
Chuck Lever
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Permit COMMIT operations to return NFS4_OK
2022-02-04 19:42 [PATCH] Permit COMMIT operations to return NFS4_OK Chuck Lever
2022-02-04 21:02 ` Frank Filz
@ 2022-02-04 21:11 ` J. Bruce Fields
1 sibling, 0 replies; 4+ messages in thread
From: J. Bruce Fields @ 2022-02-04 21:11 UTC (permalink / raw)
To: Chuck Lever; +Cc: linux-nfs
On Fri, Feb 04, 2022 at 02:42:24PM -0500, Chuck Lever wrote:
> RFC 7530 permits COMMIT to return NFS4ERR_INVAL, but RFC 5661 and
> later do not. Allow INVAL as a legacy behavior, but test for OK
> also.
Applied, thanks.
--b.
>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> nfs4.0/servertests/st_commit.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/nfs4.0/servertests/st_commit.py b/nfs4.0/servertests/st_commit.py
> index 12a0dffa061f..4ef87e69c5d7 100644
> --- a/nfs4.0/servertests/st_commit.py
> +++ b/nfs4.0/servertests/st_commit.py
> @@ -160,4 +160,4 @@ def testCommitOverflow(t, env):
> res = c.write_file(fh, _text, 0, stateid, how=UNSTABLE4)
> check(res, msg="WRITE with how=UNSTABLE4")
> res = c.commit_file(fh, 0xfffffffffffffff0, 64)
> - check(res, NFS4ERR_INVAL, "COMMIT with offset + count overflow")
> + check(res, [NFS4_OK, NFS4ERR_INVAL], "COMMIT with offset + count overflow")
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-02-04 21:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-04 19:42 [PATCH] Permit COMMIT operations to return NFS4_OK Chuck Lever
2022-02-04 21:02 ` Frank Filz
2022-02-04 21:06 ` Chuck Lever III
2022-02-04 21:11 ` 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.