linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] NFSv4.2: Fix NFS4ERR_STALE with inter server copy
@ 2020-09-23 23:06 Dai Ngo
  2020-09-23 23:06 ` [PATCH 1/1] NFSv4.2: Fix NFS4ERR_STALE error when doing " Dai Ngo
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Dai Ngo @ 2020-09-23 23:06 UTC (permalink / raw)
  To: linux-nfs

This patch provides a temporarily relief for inter copy to work with
some common configs.  For long term solution, I think Trond's suggestion
of using fs/nfs/nfs_common to store an op table that server can use to
access the client code is the way to go.

 fs/nfsd/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Below are the results of my testing of upstream mainline without and with the fix.

Upstream version used for testing:  5.9-rc5

1. Upstream mainline (existing code: NFS_FS=y)


|----------------------------------------------------------------------------------------|
|  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
|----------------------------------------------------------------------------------------|
|   y    |    y     |    m     | Build errors: nfs42_ssc_open/close                      |
|----------------------------------------------------------------------------------------|
|   y    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
|        |          |          | See NOTE1.                                              |
|----------------------------------------------------------------------------------------|
|   y    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
|        |          |          | See NOTE2.                                              |
|----------------------------------------------------------------------------------------|
|   y    |    y     |    y     | Build OK, inter server copy OK                          |
|----------------------------------------------------------------------------------------|


|----------------------------------------------------------------------------------------|
|  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
|----------------------------------------------------------------------------------------|
|   m    |    y     |    m     | Build OK, inter server copy OK                          |
|----------------------------------------------------------------------------------------|
|   m    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
|----------------------------------------------------------------------------------------|
|   m    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
|----------------------------------------------------------------------------------------|
|   m    |    y     |    y     | Build OK, inter server copy OK                          |
|----------------------------------------------------------------------------------------|

2. Upstream mainline (with the fix:  !(NFSD=y && (NFS_FS=m || NFS_V4=m))


|----------------------------------------------------------------------------------------|
|  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
|----------------------------------------------------------------------------------------|
|   m    |    y     |    m     | Build OK, inter server copy OK                          |
|----------------------------------------------------------------------------------------|
|   m    |    m     |    m     | Build OK, inter server copy OK                          |
|----------------------------------------------------------------------------------------|
|   m    |    m     |   y (m)  | Build OK, inter server copy OK                          |
|----------------------------------------------------------------------------------------|
|   m    |    y     |    y     | Build OK, inter server copy OK                          |
|----------------------------------------------------------------------------------------|


|----------------------------------------------------------------------------------------|
|  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
|----------------------------------------------------------------------------------------|
|   y    |    y     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
|----------------------------------------------------------------------------------------|
|   y    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
|----------------------------------------------------------------------------------------|
|   y    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
|----------------------------------------------------------------------------------------|
|   y    |    y     |    y     | Build OK, inter server copy OK                          |
|----------------------------------------------------------------------------------------|

NOTE1:
BUG:  When inter server copy fails with NFS4ERR_STALE, it left the file
created with size of 0!

NOTE2:
When NFS_V4=y and NFS_FS=m, the build process automatically builds with NFS_V4=m
and ignores the setting NFS_V4=y in the config file. 

This probably due to NFS_V4 in fs/nfs/Kconfig is configured to depend on NFS_FS.


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

* [PATCH 1/1] NFSv4.2: Fix NFS4ERR_STALE error when doing inter server copy
  2020-09-23 23:06 [PATCH 0/1] NFSv4.2: Fix NFS4ERR_STALE with inter server copy Dai Ngo
@ 2020-09-23 23:06 ` Dai Ngo
  2020-09-23 23:29 ` [PATCH 0/1] NFSv4.2: Fix NFS4ERR_STALE with " Chuck Lever
  2020-09-30  3:18 ` Dai Ngo
  2 siblings, 0 replies; 10+ messages in thread
From: Dai Ngo @ 2020-09-23 23:06 UTC (permalink / raw)
  To: linux-nfs

NFS_FS=y as dependency of CONFIG_NFSD_V4_2_INTER_SSC still have
build errors and some configs with NFSD=m to get NFS4ERR_STALE
error when doing inter server copy.

Modified depends of CONFIG_NFSD_V4_2_INTER_SSC to fix build errors
and to allow inter server copy to work with all configs with NFS_FS=m
and config with (NFSD=y, NFS_FS=y and NFS_V4=y).

Fixes: 3ac3711adb88 ("NFSD: Fix NFS server build errors")
Signed-off-by: dai.ngo@oracle.com
---
 fs/nfsd/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfsd/Kconfig b/fs/nfsd/Kconfig
index 99d2cae91bd6..990078102a02 100644
--- a/fs/nfsd/Kconfig
+++ b/fs/nfsd/Kconfig
@@ -136,7 +136,7 @@ config NFSD_FLEXFILELAYOUT
 
 config NFSD_V4_2_INTER_SSC
 	bool "NFSv4.2 inter server to server COPY"
-	depends on NFSD_V4 && NFS_V4_1 && NFS_V4_2 && NFS_FS=y
+	depends on NFSD_V4 && NFS_V4_1 && NFS_V4_2 && !(NFSD=y && (NFS_FS=m || NFS_V4=m))
 	help
 	  This option enables support for NFSv4.2 inter server to
 	  server copy where the destination server calls the NFSv4.2
-- 
1.8.3.1


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

* Re: [PATCH 0/1] NFSv4.2: Fix NFS4ERR_STALE with inter server copy
  2020-09-23 23:06 [PATCH 0/1] NFSv4.2: Fix NFS4ERR_STALE with inter server copy Dai Ngo
  2020-09-23 23:06 ` [PATCH 1/1] NFSv4.2: Fix NFS4ERR_STALE error when doing " Dai Ngo
@ 2020-09-23 23:29 ` Chuck Lever
  2020-09-24  1:57   ` Dai Ngo
  2020-09-30  3:18 ` Dai Ngo
  2 siblings, 1 reply; 10+ messages in thread
From: Chuck Lever @ 2020-09-23 23:29 UTC (permalink / raw)
  To: Dai Ngo; +Cc: linux-nfs

Dai, the tables are still backwards! 😄

--
Chuck Lever

> On Sep 23, 2020, at 7:06 PM, Dai Ngo <dai.ngo@oracle.com> wrote:
> 
> This patch provides a temporarily relief for inter copy to work with
> some common configs.  For long term solution, I think Trond's suggestion
> of using fs/nfs/nfs_common to store an op table that server can use to
> access the client code is the way to go.
> 
> fs/nfsd/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 
> Below are the results of my testing of upstream mainline without and with the fix.
> 
> Upstream version used for testing:  5.9-rc5
> 
> 1. Upstream mainline (existing code: NFS_FS=y)
> 
> 
> |----------------------------------------------------------------------------------------|
> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> |----------------------------------------------------------------------------------------|
> |   y    |    y     |    m     | Build errors: nfs42_ssc_open/close                      |
> |----------------------------------------------------------------------------------------|
> |   y    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> |        |          |          | See NOTE1.                                              |
> |----------------------------------------------------------------------------------------|
> |   y    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
> |        |          |          | See NOTE2.                                              |
> |----------------------------------------------------------------------------------------|
> |   y    |    y     |    y     | Build OK, inter server copy OK                          |
> |----------------------------------------------------------------------------------------|
> 
> 
> |----------------------------------------------------------------------------------------|
> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> |----------------------------------------------------------------------------------------|
> |   m    |    y     |    m     | Build OK, inter server copy OK                          |
> |----------------------------------------------------------------------------------------|
> |   m    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> |----------------------------------------------------------------------------------------|
> |   m    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
> |----------------------------------------------------------------------------------------|
> |   m    |    y     |    y     | Build OK, inter server copy OK                          |
> |----------------------------------------------------------------------------------------|
> 
> 2. Upstream mainline (with the fix:  !(NFSD=y && (NFS_FS=m || NFS_V4=m))
> 
> 
> |----------------------------------------------------------------------------------------|
> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> |----------------------------------------------------------------------------------------|
> |   m    |    y     |    m     | Build OK, inter server copy OK                          |
> |----------------------------------------------------------------------------------------|
> |   m    |    m     |    m     | Build OK, inter server copy OK                          |
> |----------------------------------------------------------------------------------------|
> |   m    |    m     |   y (m)  | Build OK, inter server copy OK                          |
> |----------------------------------------------------------------------------------------|
> |   m    |    y     |    y     | Build OK, inter server copy OK                          |
> |----------------------------------------------------------------------------------------|
> 
> 
> |----------------------------------------------------------------------------------------|
> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> |----------------------------------------------------------------------------------------|
> |   y    |    y     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> |----------------------------------------------------------------------------------------|
> |   y    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> |----------------------------------------------------------------------------------------|
> |   y    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
> |----------------------------------------------------------------------------------------|
> |   y    |    y     |    y     | Build OK, inter server copy OK                          |
> |----------------------------------------------------------------------------------------|
> 
> NOTE1:
> BUG:  When inter server copy fails with NFS4ERR_STALE, it left the file
> created with size of 0!
> 
> NOTE2:
> When NFS_V4=y and NFS_FS=m, the build process automatically builds with NFS_V4=m
> and ignores the setting NFS_V4=y in the config file. 
> 
> This probably due to NFS_V4 in fs/nfs/Kconfig is configured to depend on NFS_FS.
> 


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

* Re: [PATCH 0/1] NFSv4.2: Fix NFS4ERR_STALE with inter server copy
  2020-09-23 23:29 ` [PATCH 0/1] NFSv4.2: Fix NFS4ERR_STALE with " Chuck Lever
@ 2020-09-24  1:57   ` Dai Ngo
  0 siblings, 0 replies; 10+ messages in thread
From: Dai Ngo @ 2020-09-24  1:57 UTC (permalink / raw)
  To: Chuck Lever; +Cc: linux-nfs

Oops, sorry about that Chuck!

-Dai

On 9/23/20 4:29 PM, Chuck Lever wrote:
> Dai, the tables are still backwards! 😄
>
> --
> Chuck Lever
>
>> On Sep 23, 2020, at 7:06 PM, Dai Ngo <dai.ngo@oracle.com> wrote:
>>
>> This patch provides a temporarily relief for inter copy to work with
>> some common configs.  For long term solution, I think Trond's suggestion
>> of using fs/nfs/nfs_common to store an op table that server can use to
>> access the client code is the way to go.
>>
>> fs/nfsd/Kconfig | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>
>> Below are the results of my testing of upstream mainline without and with the fix.
>>
>> Upstream version used for testing:  5.9-rc5
>>
>> 1. Upstream mainline (existing code: NFS_FS=y)
>>
>>
>> |----------------------------------------------------------------------------------------|
>> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
>> |----------------------------------------------------------------------------------------|
>> |   y    |    y     |    m     | Build errors: nfs42_ssc_open/close                      |
>> |----------------------------------------------------------------------------------------|
>> |   y    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
>> |        |          |          | See NOTE1.                                              |
>> |----------------------------------------------------------------------------------------|
>> |   y    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
>> |        |          |          | See NOTE2.                                              |
>> |----------------------------------------------------------------------------------------|
>> |   y    |    y     |    y     | Build OK, inter server copy OK                          |
>> |----------------------------------------------------------------------------------------|
>>
>>
>> |----------------------------------------------------------------------------------------|
>> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
>> |----------------------------------------------------------------------------------------|
>> |   m    |    y     |    m     | Build OK, inter server copy OK                          |
>> |----------------------------------------------------------------------------------------|
>> |   m    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
>> |----------------------------------------------------------------------------------------|
>> |   m    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
>> |----------------------------------------------------------------------------------------|
>> |   m    |    y     |    y     | Build OK, inter server copy OK                          |
>> |----------------------------------------------------------------------------------------|
>>
>> 2. Upstream mainline (with the fix:  !(NFSD=y && (NFS_FS=m || NFS_V4=m))
>>
>>
>> |----------------------------------------------------------------------------------------|
>> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
>> |----------------------------------------------------------------------------------------|
>> |   m    |    y     |    m     | Build OK, inter server copy OK                          |
>> |----------------------------------------------------------------------------------------|
>> |   m    |    m     |    m     | Build OK, inter server copy OK                          |
>> |----------------------------------------------------------------------------------------|
>> |   m    |    m     |   y (m)  | Build OK, inter server copy OK                          |
>> |----------------------------------------------------------------------------------------|
>> |   m    |    y     |    y     | Build OK, inter server copy OK                          |
>> |----------------------------------------------------------------------------------------|
>>
>>
>> |----------------------------------------------------------------------------------------|
>> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
>> |----------------------------------------------------------------------------------------|
>> |   y    |    y     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
>> |----------------------------------------------------------------------------------------|
>> |   y    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
>> |----------------------------------------------------------------------------------------|
>> |   y    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
>> |----------------------------------------------------------------------------------------|
>> |   y    |    y     |    y     | Build OK, inter server copy OK                          |
>> |----------------------------------------------------------------------------------------|
>>
>> NOTE1:
>> BUG:  When inter server copy fails with NFS4ERR_STALE, it left the file
>> created with size of 0!
>>
>> NOTE2:
>> When NFS_V4=y and NFS_FS=m, the build process automatically builds with NFS_V4=m
>> and ignores the setting NFS_V4=y in the config file.
>>
>> This probably due to NFS_V4 in fs/nfs/Kconfig is configured to depend on NFS_FS.
>>

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

* Re: [PATCH 0/1] NFSv4.2: Fix NFS4ERR_STALE with inter server copy
  2020-09-23 23:06 [PATCH 0/1] NFSv4.2: Fix NFS4ERR_STALE with inter server copy Dai Ngo
  2020-09-23 23:06 ` [PATCH 1/1] NFSv4.2: Fix NFS4ERR_STALE error when doing " Dai Ngo
  2020-09-23 23:29 ` [PATCH 0/1] NFSv4.2: Fix NFS4ERR_STALE with " Chuck Lever
@ 2020-09-30  3:18 ` Dai Ngo
  2020-10-01 20:51   ` Bruce Fields
  2 siblings, 1 reply; 10+ messages in thread
From: Dai Ngo @ 2020-09-30  3:18 UTC (permalink / raw)
  To: Bruce Fields; +Cc: linux-nfs

Hi Bruce,

Have you had chance to review this patch and if it's ok would it be 
possible to include it in the 5.10 pull?

Thanks,

-Dai

On 9/23/20 4:06 PM, Dai Ngo wrote:
> This patch provides a temporarily relief for inter copy to work with
> some common configs.  For long term solution, I think Trond's suggestion
> of using fs/nfs/nfs_common to store an op table that server can use to
> access the client code is the way to go.
>
>   fs/nfsd/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
>
> Below are the results of my testing of upstream mainline without and with the fix.
>
> Upstream version used for testing:  5.9-rc5
>
> 1. Upstream mainline (existing code: NFS_FS=y)
>
>
> |----------------------------------------------------------------------------------------|
> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> |----------------------------------------------------------------------------------------|
> |   y    |    y     |    m     | Build errors: nfs42_ssc_open/close                      |
> |----------------------------------------------------------------------------------------|
> |   y    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> |        |          |          | See NOTE1.                                              |
> |----------------------------------------------------------------------------------------|
> |   y    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
> |        |          |          | See NOTE2.                                              |
> |----------------------------------------------------------------------------------------|
> |   y    |    y     |    y     | Build OK, inter server copy OK                          |
> |----------------------------------------------------------------------------------------|
>
>
> |----------------------------------------------------------------------------------------|
> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> |----------------------------------------------------------------------------------------|
> |   m    |    y     |    m     | Build OK, inter server copy OK                          |
> |----------------------------------------------------------------------------------------|
> |   m    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> |----------------------------------------------------------------------------------------|
> |   m    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
> |----------------------------------------------------------------------------------------|
> |   m    |    y     |    y     | Build OK, inter server copy OK                          |
> |----------------------------------------------------------------------------------------|
>
> 2. Upstream mainline (with the fix:  !(NFSD=y && (NFS_FS=m || NFS_V4=m))
>
>
> |----------------------------------------------------------------------------------------|
> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> |----------------------------------------------------------------------------------------|
> |   m    |    y     |    m     | Build OK, inter server copy OK                          |
> |----------------------------------------------------------------------------------------|
> |   m    |    m     |    m     | Build OK, inter server copy OK                          |
> |----------------------------------------------------------------------------------------|
> |   m    |    m     |   y (m)  | Build OK, inter server copy OK                          |
> |----------------------------------------------------------------------------------------|
> |   m    |    y     |    y     | Build OK, inter server copy OK                          |
> |----------------------------------------------------------------------------------------|
>
>
> |----------------------------------------------------------------------------------------|
> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> |----------------------------------------------------------------------------------------|
> |   y    |    y     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> |----------------------------------------------------------------------------------------|
> |   y    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> |----------------------------------------------------------------------------------------|
> |   y    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
> |----------------------------------------------------------------------------------------|
> |   y    |    y     |    y     | Build OK, inter server copy OK                          |
> |----------------------------------------------------------------------------------------|
>
> NOTE1:
> BUG:  When inter server copy fails with NFS4ERR_STALE, it left the file
> created with size of 0!
>
> NOTE2:
> When NFS_V4=y and NFS_FS=m, the build process automatically builds with NFS_V4=m
> and ignores the setting NFS_V4=y in the config file.
>
> This probably due to NFS_V4 in fs/nfs/Kconfig is configured to depend on NFS_FS.
>

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

* Re: [PATCH 0/1] NFSv4.2: Fix NFS4ERR_STALE with inter server copy
  2020-09-30  3:18 ` Dai Ngo
@ 2020-10-01 20:51   ` Bruce Fields
  2020-10-01 21:48     ` Dai Ngo
  0 siblings, 1 reply; 10+ messages in thread
From: Bruce Fields @ 2020-10-01 20:51 UTC (permalink / raw)
  To: Dai Ngo; +Cc: linux-nfs

On Tue, Sep 29, 2020 at 08:18:54PM -0700, Dai Ngo wrote:
> Have you had chance to review this patch and if it's ok would it be
> possible to include it in the 5.10 pull?

I don't think the op table approach would be that difficult, I'd really
rather see that.

Is this causing someone an immediate practical problem?

--b.

> 
> Thanks,
> 
> -Dai
> 
> On 9/23/20 4:06 PM, Dai Ngo wrote:
> >This patch provides a temporarily relief for inter copy to work with
> >some common configs.  For long term solution, I think Trond's suggestion
> >of using fs/nfs/nfs_common to store an op table that server can use to
> >access the client code is the way to go.
> >
> >  fs/nfsd/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >
> >Below are the results of my testing of upstream mainline without and with the fix.
> >
> >Upstream version used for testing:  5.9-rc5
> >
> >1. Upstream mainline (existing code: NFS_FS=y)
> >
> >
> >|----------------------------------------------------------------------------------------|
> >|  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> >|----------------------------------------------------------------------------------------|
> >|   y    |    y     |    m     | Build errors: nfs42_ssc_open/close                      |
> >|----------------------------------------------------------------------------------------|
> >|   y    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >|        |          |          | See NOTE1.                                              |
> >|----------------------------------------------------------------------------------------|
> >|   y    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >|        |          |          | See NOTE2.                                              |
> >|----------------------------------------------------------------------------------------|
> >|   y    |    y     |    y     | Build OK, inter server copy OK                          |
> >|----------------------------------------------------------------------------------------|
> >
> >
> >|----------------------------------------------------------------------------------------|
> >|  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> >|----------------------------------------------------------------------------------------|
> >|   m    |    y     |    m     | Build OK, inter server copy OK                          |
> >|----------------------------------------------------------------------------------------|
> >|   m    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >|----------------------------------------------------------------------------------------|
> >|   m    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >|----------------------------------------------------------------------------------------|
> >|   m    |    y     |    y     | Build OK, inter server copy OK                          |
> >|----------------------------------------------------------------------------------------|
> >
> >2. Upstream mainline (with the fix:  !(NFSD=y && (NFS_FS=m || NFS_V4=m))
> >
> >
> >|----------------------------------------------------------------------------------------|
> >|  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> >|----------------------------------------------------------------------------------------|
> >|   m    |    y     |    m     | Build OK, inter server copy OK                          |
> >|----------------------------------------------------------------------------------------|
> >|   m    |    m     |    m     | Build OK, inter server copy OK                          |
> >|----------------------------------------------------------------------------------------|
> >|   m    |    m     |   y (m)  | Build OK, inter server copy OK                          |
> >|----------------------------------------------------------------------------------------|
> >|   m    |    y     |    y     | Build OK, inter server copy OK                          |
> >|----------------------------------------------------------------------------------------|
> >
> >
> >|----------------------------------------------------------------------------------------|
> >|  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> >|----------------------------------------------------------------------------------------|
> >|   y    |    y     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >|----------------------------------------------------------------------------------------|
> >|   y    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >|----------------------------------------------------------------------------------------|
> >|   y    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >|----------------------------------------------------------------------------------------|
> >|   y    |    y     |    y     | Build OK, inter server copy OK                          |
> >|----------------------------------------------------------------------------------------|
> >
> >NOTE1:
> >BUG:  When inter server copy fails with NFS4ERR_STALE, it left the file
> >created with size of 0!
> >
> >NOTE2:
> >When NFS_V4=y and NFS_FS=m, the build process automatically builds with NFS_V4=m
> >and ignores the setting NFS_V4=y in the config file.
> >
> >This probably due to NFS_V4 in fs/nfs/Kconfig is configured to depend on NFS_FS.
> >

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

* Re: [PATCH 0/1] NFSv4.2: Fix NFS4ERR_STALE with inter server copy
  2020-10-01 20:51   ` Bruce Fields
@ 2020-10-01 21:48     ` Dai Ngo
  2020-10-01 21:52       ` Bruce Fields
  0 siblings, 1 reply; 10+ messages in thread
From: Dai Ngo @ 2020-10-01 21:48 UTC (permalink / raw)
  To: Bruce Fields; +Cc: linux-nfs

Thanks Bruce for your comments,

On 10/1/20 1:51 PM, Bruce Fields wrote:
> On Tue, Sep 29, 2020 at 08:18:54PM -0700, Dai Ngo wrote:
>> Have you had chance to review this patch and if it's ok would it be
>> possible to include it in the 5.10 pull?
> I don't think the op table approach would be that difficult, I'd really
> rather see that.

I think if we do the op table approach then we should also try to solve
all other dependencies between various NFS client and server modules
and not just the SSC part. It might be a little involved so I'd like
to take some time to research before committing to the longer solution
which I plan to do. In the mean time, this small patch allows some of
us to use the inter server copy until the long term solution is available.

> Is this causing someone an immediate practical problem?

This causes inter server copy to fail with any kernel build with NFS_FS=m
which I think is a common config. And it also causes compile errors if
NFSD=y, NFS_FS=y and NFS_v4=m.

-Dai

>
> --b.
>
>> Thanks,
>>
>> -Dai
>>
>> On 9/23/20 4:06 PM, Dai Ngo wrote:
>>> This patch provides a temporarily relief for inter copy to work with
>>> some common configs.  For long term solution, I think Trond's suggestion
>>> of using fs/nfs/nfs_common to store an op table that server can use to
>>> access the client code is the way to go.
>>>
>>>   fs/nfsd/Kconfig | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>>
>>> Below are the results of my testing of upstream mainline without and with the fix.
>>>
>>> Upstream version used for testing:  5.9-rc5
>>>
>>> 1. Upstream mainline (existing code: NFS_FS=y)
>>>
>>>
>>> |----------------------------------------------------------------------------------------|
>>> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
>>> |----------------------------------------------------------------------------------------|
>>> |   y    |    y     |    m     | Build errors: nfs42_ssc_open/close                      |
>>> |----------------------------------------------------------------------------------------|
>>> |   y    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
>>> |        |          |          | See NOTE1.                                              |
>>> |----------------------------------------------------------------------------------------|
>>> |   y    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
>>> |        |          |          | See NOTE2.                                              |
>>> |----------------------------------------------------------------------------------------|
>>> |   y    |    y     |    y     | Build OK, inter server copy OK                          |
>>> |----------------------------------------------------------------------------------------|
>>>
>>>
>>> |----------------------------------------------------------------------------------------|
>>> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
>>> |----------------------------------------------------------------------------------------|
>>> |   m    |    y     |    m     | Build OK, inter server copy OK                          |
>>> |----------------------------------------------------------------------------------------|
>>> |   m    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
>>> |----------------------------------------------------------------------------------------|
>>> |   m    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
>>> |----------------------------------------------------------------------------------------|
>>> |   m    |    y     |    y     | Build OK, inter server copy OK                          |
>>> |----------------------------------------------------------------------------------------|
>>>
>>> 2. Upstream mainline (with the fix:  !(NFSD=y && (NFS_FS=m || NFS_V4=m))
>>>
>>>
>>> |----------------------------------------------------------------------------------------|
>>> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
>>> |----------------------------------------------------------------------------------------|
>>> |   m    |    y     |    m     | Build OK, inter server copy OK                          |
>>> |----------------------------------------------------------------------------------------|
>>> |   m    |    m     |    m     | Build OK, inter server copy OK                          |
>>> |----------------------------------------------------------------------------------------|
>>> |   m    |    m     |   y (m)  | Build OK, inter server copy OK                          |
>>> |----------------------------------------------------------------------------------------|
>>> |   m    |    y     |    y     | Build OK, inter server copy OK                          |
>>> |----------------------------------------------------------------------------------------|
>>>
>>>
>>> |----------------------------------------------------------------------------------------|
>>> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
>>> |----------------------------------------------------------------------------------------|
>>> |   y    |    y     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
>>> |----------------------------------------------------------------------------------------|
>>> |   y    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
>>> |----------------------------------------------------------------------------------------|
>>> |   y    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
>>> |----------------------------------------------------------------------------------------|
>>> |   y    |    y     |    y     | Build OK, inter server copy OK                          |
>>> |----------------------------------------------------------------------------------------|
>>>
>>> NOTE1:
>>> BUG:  When inter server copy fails with NFS4ERR_STALE, it left the file
>>> created with size of 0!
>>>
>>> NOTE2:
>>> When NFS_V4=y and NFS_FS=m, the build process automatically builds with NFS_V4=m
>>> and ignores the setting NFS_V4=y in the config file.
>>>
>>> This probably due to NFS_V4 in fs/nfs/Kconfig is configured to depend on NFS_FS.
>>>

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

* Re: [PATCH 0/1] NFSv4.2: Fix NFS4ERR_STALE with inter server copy
  2020-10-01 21:48     ` Dai Ngo
@ 2020-10-01 21:52       ` Bruce Fields
  2020-10-01 22:15         ` Dai Ngo
       [not found]         ` <87879d23-986f-e123-1597-842a2913e864@oracle.com>
  0 siblings, 2 replies; 10+ messages in thread
From: Bruce Fields @ 2020-10-01 21:52 UTC (permalink / raw)
  To: Dai Ngo; +Cc: linux-nfs

On Thu, Oct 01, 2020 at 02:48:07PM -0700, Dai Ngo wrote:
> Thanks Bruce for your comments,
> 
> On 10/1/20 1:51 PM, Bruce Fields wrote:
> >On Tue, Sep 29, 2020 at 08:18:54PM -0700, Dai Ngo wrote:
> >>Have you had chance to review this patch and if it's ok would it be
> >>possible to include it in the 5.10 pull?
> >I don't think the op table approach would be that difficult, I'd really
> >rather see that.
> 
> I think if we do the op table approach then we should also try to solve
> all other dependencies between various NFS client and server modules
> and not just the SSC part.

Are there any others?  I'd be very surprised.  It's something we've been
quite careful not to do in the past.  I apologize that it got past my
review this time.

--b.

> It might be a little involved so I'd like
> to take some time to research before committing to the longer solution
> which I plan to do. In the mean time, this small patch allows some of
> us to use the inter server copy until the long term solution is available.

> 
> >Is this causing someone an immediate practical problem?
> 
> This causes inter server copy to fail with any kernel build with NFS_FS=m
> which I think is a common config. And it also causes compile errors if
> NFSD=y, NFS_FS=y and NFS_v4=m.
> 
> -Dai
> 
> >
> >--b.
> >
> >>Thanks,
> >>
> >>-Dai
> >>
> >>On 9/23/20 4:06 PM, Dai Ngo wrote:
> >>>This patch provides a temporarily relief for inter copy to work with
> >>>some common configs.  For long term solution, I think Trond's suggestion
> >>>of using fs/nfs/nfs_common to store an op table that server can use to
> >>>access the client code is the way to go.
> >>>
> >>>  fs/nfsd/Kconfig | 2 +-
> >>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>>
> >>>Below are the results of my testing of upstream mainline without and with the fix.
> >>>
> >>>Upstream version used for testing:  5.9-rc5
> >>>
> >>>1. Upstream mainline (existing code: NFS_FS=y)
> >>>
> >>>
> >>>|----------------------------------------------------------------------------------------|
> >>>|  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> >>>|----------------------------------------------------------------------------------------|
> >>>|   y    |    y     |    m     | Build errors: nfs42_ssc_open/close                      |
> >>>|----------------------------------------------------------------------------------------|
> >>>|   y    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >>>|        |          |          | See NOTE1.                                              |
> >>>|----------------------------------------------------------------------------------------|
> >>>|   y    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >>>|        |          |          | See NOTE2.                                              |
> >>>|----------------------------------------------------------------------------------------|
> >>>|   y    |    y     |    y     | Build OK, inter server copy OK                          |
> >>>|----------------------------------------------------------------------------------------|
> >>>
> >>>
> >>>|----------------------------------------------------------------------------------------|
> >>>|  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> >>>|----------------------------------------------------------------------------------------|
> >>>|   m    |    y     |    m     | Build OK, inter server copy OK                          |
> >>>|----------------------------------------------------------------------------------------|
> >>>|   m    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >>>|----------------------------------------------------------------------------------------|
> >>>|   m    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >>>|----------------------------------------------------------------------------------------|
> >>>|   m    |    y     |    y     | Build OK, inter server copy OK                          |
> >>>|----------------------------------------------------------------------------------------|
> >>>
> >>>2. Upstream mainline (with the fix:  !(NFSD=y && (NFS_FS=m || NFS_V4=m))
> >>>
> >>>
> >>>|----------------------------------------------------------------------------------------|
> >>>|  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> >>>|----------------------------------------------------------------------------------------|
> >>>|   m    |    y     |    m     | Build OK, inter server copy OK                          |
> >>>|----------------------------------------------------------------------------------------|
> >>>|   m    |    m     |    m     | Build OK, inter server copy OK                          |
> >>>|----------------------------------------------------------------------------------------|
> >>>|   m    |    m     |   y (m)  | Build OK, inter server copy OK                          |
> >>>|----------------------------------------------------------------------------------------|
> >>>|   m    |    y     |    y     | Build OK, inter server copy OK                          |
> >>>|----------------------------------------------------------------------------------------|
> >>>
> >>>
> >>>|----------------------------------------------------------------------------------------|
> >>>|  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> >>>|----------------------------------------------------------------------------------------|
> >>>|   y    |    y     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >>>|----------------------------------------------------------------------------------------|
> >>>|   y    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >>>|----------------------------------------------------------------------------------------|
> >>>|   y    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >>>|----------------------------------------------------------------------------------------|
> >>>|   y    |    y     |    y     | Build OK, inter server copy OK                          |
> >>>|----------------------------------------------------------------------------------------|
> >>>
> >>>NOTE1:
> >>>BUG:  When inter server copy fails with NFS4ERR_STALE, it left the file
> >>>created with size of 0!
> >>>
> >>>NOTE2:
> >>>When NFS_V4=y and NFS_FS=m, the build process automatically builds with NFS_V4=m
> >>>and ignores the setting NFS_V4=y in the config file.
> >>>
> >>>This probably due to NFS_V4 in fs/nfs/Kconfig is configured to depend on NFS_FS.
> >>>

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

* Re: [PATCH 0/1] NFSv4.2: Fix NFS4ERR_STALE with inter server copy
  2020-10-01 21:52       ` Bruce Fields
@ 2020-10-01 22:15         ` Dai Ngo
       [not found]         ` <87879d23-986f-e123-1597-842a2913e864@oracle.com>
  1 sibling, 0 replies; 10+ messages in thread
From: Dai Ngo @ 2020-10-01 22:15 UTC (permalink / raw)
  To: Bruce Fields; +Cc: linux-nfs

On 10/1/20 2:52 PM, Bruce Fields wrote:
> On Thu, Oct 01, 2020 at 02:48:07PM -0700, Dai Ngo wrote:
>> Thanks Bruce for your comments,
>>
>> On 10/1/20 1:51 PM, Bruce Fields wrote:
>>> On Tue, Sep 29, 2020 at 08:18:54PM -0700, Dai Ngo wrote:
>>>> Have you had chance to review this patch and if it's ok would it be
>>>> possible to include it in the 5.10 pull?
>>> I don't think the op table approach would be that difficult, I'd really
>>> rather see that.
>> I think if we do the op table approach then we should also try to solve
>> all other dependencies between various NFS client and server modules
>> and not just the SSC part.
> Are there any others?  I'd be very surprised.  It's something we've been
> quite careful not to do in the past.  I apologize that it got past my
> review this time.

No, I'm not sure if there is any others, I'm just being cautious.

We can always start by building the infra-structure and fix the SSC first
and if there is any others then we can use the same mechanism to fix them
too. I can work on this for long term. In the mean time can we pull in this
temporary fix or you rather just want to see the long term solution?


Thanks,
-Dai

> --b.
>
>> It might be a little involved so I'd like
>> to take some time to research before committing to the longer solution
>> which I plan to do. In the mean time, this small patch allows some of
>> us to use the inter server copy until the long term solution is available.
>>> Is this causing someone an immediate practical problem?
>> This causes inter server copy to fail with any kernel build with NFS_FS=m
>> which I think is a common config. And it also causes compile errors if
>> NFSD=y, NFS_FS=y and NFS_v4=m.
>>
>> -Dai
>>
>>> --b.
>>>
>>>> Thanks,
>>>>
>>>> -Dai
>>>>
>>>> On 9/23/20 4:06 PM, Dai Ngo wrote:
>>>>> This patch provides a temporarily relief for inter copy to work with
>>>>> some common configs.  For long term solution, I think Trond's suggestion
>>>>> of using fs/nfs/nfs_common to store an op table that server can use to
>>>>> access the client code is the way to go.
>>>>>
>>>>>   fs/nfsd/Kconfig | 2 +-
>>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>>
>>>>> Below are the results of my testing of upstream mainline without and with the fix.
>>>>>
>>>>> Upstream version used for testing:  5.9-rc5
>>>>>
>>>>> 1. Upstream mainline (existing code: NFS_FS=y)
>>>>>
>>>>>
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |   y    |    y     |    m     | Build errors: nfs42_ssc_open/close                      |
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |   y    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
>>>>> |        |          |          | See NOTE1.                                              |
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |   y    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
>>>>> |        |          |          | See NOTE2.                                              |
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |   y    |    y     |    y     | Build OK, inter server copy OK                          |
>>>>> |----------------------------------------------------------------------------------------|
>>>>>
>>>>>
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |   m    |    y     |    m     | Build OK, inter server copy OK                          |
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |   m    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |   m    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |   m    |    y     |    y     | Build OK, inter server copy OK                          |
>>>>> |----------------------------------------------------------------------------------------|
>>>>>
>>>>> 2. Upstream mainline (with the fix:  !(NFSD=y && (NFS_FS=m || NFS_V4=m))
>>>>>
>>>>>
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |   m    |    y     |    m     | Build OK, inter server copy OK                          |
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |   m    |    m     |    m     | Build OK, inter server copy OK                          |
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |   m    |    m     |   y (m)  | Build OK, inter server copy OK                          |
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |   m    |    y     |    y     | Build OK, inter server copy OK                          |
>>>>> |----------------------------------------------------------------------------------------|
>>>>>
>>>>>
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |   y    |    y     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |   y    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |   y    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
>>>>> |----------------------------------------------------------------------------------------|
>>>>> |   y    |    y     |    y     | Build OK, inter server copy OK                          |
>>>>> |----------------------------------------------------------------------------------------|
>>>>>
>>>>> NOTE1:
>>>>> BUG:  When inter server copy fails with NFS4ERR_STALE, it left the file
>>>>> created with size of 0!
>>>>>
>>>>> NOTE2:
>>>>> When NFS_V4=y and NFS_FS=m, the build process automatically builds with NFS_V4=m
>>>>> and ignores the setting NFS_V4=y in the config file.
>>>>>
>>>>> This probably due to NFS_V4 in fs/nfs/Kconfig is configured to depend on NFS_FS.
>>>>>

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

* Re: [PATCH 0/1] NFSv4.2: Fix NFS4ERR_STALE with inter server copy
       [not found]         ` <87879d23-986f-e123-1597-842a2913e864@oracle.com>
@ 2020-10-06 15:20           ` Bruce Fields
  0 siblings, 0 replies; 10+ messages in thread
From: Bruce Fields @ 2020-10-06 15:20 UTC (permalink / raw)
  To: Dai Ngo; +Cc: linux-nfs

On Thu, Oct 01, 2020 at 03:13:41PM -0700, Dai Ngo wrote:
> 
> On 10/1/20 2:52 PM, Bruce Fields wrote:
> >On Thu, Oct 01, 2020 at 02:48:07PM -0700, Dai Ngo wrote:
> >>Thanks Bruce for your comments,
> >>
> >>On 10/1/20 1:51 PM, Bruce Fields wrote:
> >>>On Tue, Sep 29, 2020 at 08:18:54PM -0700, Dai Ngo wrote:
> >>>>Have you had chance to review this patch and if it's ok would it be
> >>>>possible to include it in the 5.10 pull?
> >>>I don't think the op table approach would be that difficult, I'd really
> >>>rather see that.
> >>I think if we do the op table approach then we should also try to solve
> >>all other dependencies between various NFS client and server modules
> >>and not just the SSC part.
> >Are there any others?  I'd be very surprised.  It's something we've been
> >quite careful not to do in the past.  I apologize that it got past my
> >review this time.
> 
> No, I'm not sure if there is any others, I'm just being cautious.
> 
> We can always start by building the infra-structure and fix the SSC first
> and if there is any others then we can use the same mechanism to fix them
> too. I can work on this for long term. In the mean time can we pull in this
> temporary fix or you rather just want to see the long term solution?

I'd really rather see the long term solution.

--b.

> 
> 
> Thanks,
> -Dai
> 
> >
> >--b.
> >
> >>It might be a little involved so I'd like
> >>to take some time to research before committing to the longer solution
> >>which I plan to do. In the mean time, this small patch allows some of
> >>us to use the inter server copy until the long term solution is available.
> >>>Is this causing someone an immediate practical problem?
> >>This causes inter server copy to fail with any kernel build with NFS_FS=m
> >>which I think is a common config. And it also causes compile errors if
> >>NFSD=y, NFS_FS=y and NFS_v4=m.
> >>
> >>-Dai
> >>
> >>>--b.
> >>>
> >>>>Thanks,
> >>>>
> >>>>-Dai
> >>>>
> >>>>On 9/23/20 4:06 PM, Dai Ngo wrote:
> >>>>>This patch provides a temporarily relief for inter copy to work with
> >>>>>some common configs.  For long term solution, I think Trond's suggestion
> >>>>>of using fs/nfs/nfs_common to store an op table that server can use to
> >>>>>access the client code is the way to go.
> >>>>>
> >>>>>  fs/nfsd/Kconfig | 2 +-
> >>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>>
> >>>>>
> >>>>>Below are the results of my testing of upstream mainline without and with the fix.
> >>>>>
> >>>>>Upstream version used for testing:  5.9-rc5
> >>>>>
> >>>>>1. Upstream mainline (existing code: NFS_FS=y)
> >>>>>
> >>>>>
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|   y    |    y     |    m     | Build errors: nfs42_ssc_open/close                      |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|   y    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >>>>>|        |          |          | See NOTE1.                                              |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|   y    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >>>>>|        |          |          | See NOTE2.                                              |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|   y    |    y     |    y     | Build OK, inter server copy OK                          |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>
> >>>>>
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|   m    |    y     |    m     | Build OK, inter server copy OK                          |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|   m    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|   m    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|   m    |    y     |    y     | Build OK, inter server copy OK                          |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>
> >>>>>2. Upstream mainline (with the fix:  !(NFSD=y && (NFS_FS=m || NFS_V4=m))
> >>>>>
> >>>>>
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|   m    |    y     |    m     | Build OK, inter server copy OK                          |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|   m    |    m     |    m     | Build OK, inter server copy OK                          |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|   m    |    m     |   y (m)  | Build OK, inter server copy OK                          |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|   m    |    y     |    y     | Build OK, inter server copy OK                          |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>
> >>>>>
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|  NFSD  |  NFS_FS  |  NFS_V4  |               RESULTS                                   |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|   y    |    y     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|   y    |    m     |    m     | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|   y    |    m     |   y (m)  | Build OK, inter server copy failed with NFS4ERR_STALE   |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>|   y    |    y     |    y     | Build OK, inter server copy OK                          |
> >>>>>|----------------------------------------------------------------------------------------|
> >>>>>
> >>>>>NOTE1:
> >>>>>BUG:  When inter server copy fails with NFS4ERR_STALE, it left the file
> >>>>>created with size of 0!
> >>>>>
> >>>>>NOTE2:
> >>>>>When NFS_V4=y and NFS_FS=m, the build process automatically builds with NFS_V4=m
> >>>>>and ignores the setting NFS_V4=y in the config file.
> >>>>>
> >>>>>This probably due to NFS_V4 in fs/nfs/Kconfig is configured to depend on NFS_FS.
> >>>>>

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

end of thread, other threads:[~2020-10-06 15:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-23 23:06 [PATCH 0/1] NFSv4.2: Fix NFS4ERR_STALE with inter server copy Dai Ngo
2020-09-23 23:06 ` [PATCH 1/1] NFSv4.2: Fix NFS4ERR_STALE error when doing " Dai Ngo
2020-09-23 23:29 ` [PATCH 0/1] NFSv4.2: Fix NFS4ERR_STALE with " Chuck Lever
2020-09-24  1:57   ` Dai Ngo
2020-09-30  3:18 ` Dai Ngo
2020-10-01 20:51   ` Bruce Fields
2020-10-01 21:48     ` Dai Ngo
2020-10-01 21:52       ` Bruce Fields
2020-10-01 22:15         ` Dai Ngo
     [not found]         ` <87879d23-986f-e123-1597-842a2913e864@oracle.com>
2020-10-06 15:20           ` Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).