Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp856835pxu; Wed, 7 Oct 2020 18:54:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQAFiDThRSZ7/eXjAHk8BowT5pI6vaU5WFeKerOEyds9P7izch7C9l/dN529dRrkdAa6k1 X-Received: by 2002:a17:906:2dc5:: with SMTP id h5mr6276083eji.507.1602122072346; Wed, 07 Oct 2020 18:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602122072; cv=none; d=google.com; s=arc-20160816; b=DN8IWAN8rU8XmMgu4mctMFyqbsj3C5IEUlsO5862s0B8pcdr6kPbWY88DVBU4es/PH tRJL+wDP5JHA+CDz0irX7nHRTioCC5+RiT9LCJp9VpkhmNcRh/5bRsjWTuZea3KT7adb nXNY1W1N9+BZJcVbEufykQ9dpRSdTB1Dxt9BjB7iTfxFPIANOhzNdCDChy+dYcRw0+oX SWsutN6twjyfOQ0XeaiZi8EuRFqZo2imopbYN77+LCQ8elS6Ws99Bdi7AR865GMKt/uH sW/RMqxxR/XA+upNxY6PgXRgWO+nTqVRHwCbzoBD6oJSpmGFAnWcvG9Whnl4JsyLgagq uGVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=a6kau7cqUBsUtJ1cxw7S8nIRYDb8rCtvLJiLWEJIUcU=; b=uUGVpIsPDdDqbKUAgJAnt9zdBS/QLQP0jOdPvLhoqpVDGrzKqkAeEtpUoHgHAXuHkw +oq9Bul02e1ujVl3c1bQ80ItaN64cWuFxbH8XzRwwdz2tu7FMEBaqRjj5iBj6TJ/fNeh g0eeEzOy61x70MnTjZ3DuG5VCSRWqu1X7xlPNMz6zdSdzPTVkQhDIfq+FYaW6miNTJHp eyk5F/c8MDLlka/xfbCZuvRjmVRpkCLVZJroB3+AafYW7JbcO/l5fbaYZNeRQQxUEHpe O3j+vcr/wOve2QEI/+x6t69o7HXBk7QU1S/GjHVo9mxxaBznHWp4NcT9JlwauuwcEmhV QHhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b="e1/5UpSF"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o2si2630478eda.463.2020.10.07.18.54.08; Wed, 07 Oct 2020 18:54:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b="e1/5UpSF"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726312AbgJHBZ7 (ORCPT + 99 others); Wed, 7 Oct 2020 21:25:59 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:48654 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726009AbgJHBZ7 (ORCPT ); Wed, 7 Oct 2020 21:25:59 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0981OgX9178141; Thu, 8 Oct 2020 01:25:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2020-01-29; bh=a6kau7cqUBsUtJ1cxw7S8nIRYDb8rCtvLJiLWEJIUcU=; b=e1/5UpSFNLImwTeL1t0TltqmVRmE+vADJ2QYel1gwVpS3v29vdJSZ1MCRIMnMtf7cAX7 7dyqY6LIQlRBRjw0Wt3BqdXHCVQL4Gb7+lS593Yiit3VbJRq2ISAIIV7YsYIFlctByMn vZy4Lvsbwi/+qgmoJ7LSu9BMuAztlZjLa5vDvdMY0SQTzRmghXcWbWctm8B4SjinARpP vorrbk9lkqHX+BLbcrkpAG9R8tE43mfHIL5lDv7466V5IgZEhPbOQVgsXQZL5BnOjYvA Z7B/qcrPXJsPQ5anFXL6YZenl+hcG9UE33eZoOwUvC21q28TNn0yj1OmkhyAaloTvziv xA== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 33ym34t5r4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 08 Oct 2020 01:25:53 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0981KC2H081208; Thu, 8 Oct 2020 01:25:53 GMT Received: from pps.reinject (localhost [127.0.0.1]) by userp3030.oracle.com with ESMTP id 33y380ag69-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 08 Oct 2020 01:25:53 +0000 Received: from userp3030.oracle.com (userp3030.oracle.com [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0981Pq5R097740; Thu, 8 Oct 2020 01:25:52 GMT Received: from aserp3030.oracle.com (ksplice-shell2.us.oracle.com [10.152.118.36]) by userp3030.oracle.com with ESMTP id 33y380ag60-1; Thu, 08 Oct 2020 01:25:52 +0000 From: Dai Ngo To: bfields@fieldses.org Cc: linux-nfs@vger.kernel.org Subject: [PATCH v2 0/1] NFSv4.2: Fix NFS4ERR_STALE with inter server copy Date: Wed, 7 Oct 2020 21:25:12 -0400 Message-Id: <20201008012513.89989-1-dai.ngo@oracle.com> X-Mailer: git-send-email 2.20.1.1226.g1595ea5.dirty MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9767 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 impostorscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 clxscore=1015 bulkscore=0 spamscore=0 malwarescore=0 phishscore=0 suspectscore=1 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010080010 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org This cover email is intended for including my test results. This patch adds the ops table in nfs_common for knfsd to access NFS client modules without calling these functions directly. The client module registers their functions and deregisters them when the module is loaded and unloaded respectively. fs/nfs/nfs4file.c | 44 ++++++++++++-- fs/nfs/nfs4super.c | 6 ++ fs/nfs/super.c | 20 +++++++ fs/nfs_common/Makefile | 1 + fs/nfs_common/nfs_ssc.c | 136 +++++++++++++++++++++++++++++++++++++++++++ fs/nfsd/Kconfig | 2 +- fs/nfsd/nfs4proc.c | 3 +- include/linux/nfs_ssc.h | 77 ++++++++++++++++++++++++ 8 files changed, 281 insertions(+), 8 deletions(-) Test Results: Upstream version used for testing: 5.9-rc5 |----------------------------------------------------------| | NFSD | NFS_FS | NFS_V4 | RESULTS | |----------------------------------------------------------| | m | y | m | inter server copy OK | |----------------------------------------------------------| | m | m | m | inter server copy OK | |----------------------------------------------------------| | m | m | y (m) | inter server copy OK | |----------------------------------------------------------| | m | y | y | inter server copy OK | |----------------------------------------------------------| | m | n | n | NFS4ERR_STALE error | |----------------------------------------------------------| |----------------------------------------------------------| | NFSD | NFS_FS | NFS_V4 | RESULTS | |----------------------------------------------------------| | y | y | m | inter server copy OK | |----------------------------------------------------------| | y | m | m | inter server copy OK | |----------------------------------------------------------| | y | m | y (m) | inter server copy OK | |----------------------------------------------------------| | y | y | y | inter server copy OK | |----------------------------------------------------------| | y | n | n | NFS4ERR_STALE error | |----------------------------------------------------------| NOTE: 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.