From patchwork Wed Oct 11 16:48:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Haynes X-Patchwork-Id: 10000081 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 99F07602BF for ; Wed, 11 Oct 2017 16:48:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 93FC028AE0 for ; Wed, 11 Oct 2017 16:48:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 88E1328AE2; Wed, 11 Oct 2017 16:48:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE1BE28AE0 for ; Wed, 11 Oct 2017 16:48:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751892AbdJKQsg (ORCPT ); Wed, 11 Oct 2017 12:48:36 -0400 Received: from us-smtp-delivery-194.mimecast.com ([216.205.24.194]:51896 "EHLO us-smtp-delivery-194.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751659AbdJKQsf (ORCPT ); Wed, 11 Oct 2017 12:48:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=primarydata.com; s=mimecast20170802; t=1507740514; h=from:subject:date:message-id:to:cc:mime-version:content-type:content-transfer-encoding; bh=hy+pIfAye/9IKSacMFH8wwBHHLt/3/pjGye9iNx3F1c=; b=IEcVmFWz0+ALAgVGEgy+lZ2BHXMGvG2TZnPLAOtK6Be6x1QbYIRT/Vt9CIRSFHFNir9UzzcmpsGUr3sI+MbZspqtkFbOVmQWl+gFyrCTEpClsMOoJsT3j54HtfowwwzwztJiHTj3ulr6lK7UdfGoluGxvVGD4Vgucx39ycvs4kc= Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03lp0053.outbound.protection.outlook.com [216.32.180.53]) (Using TLS) by us-smtp-1.mimecast.com with ESMTP id us-mta-217-hz_o78n3MtmNaUWUBrLf4w-1; Wed, 11 Oct 2017 12:48:32 -0400 Received: from jhereg.localdomain (63.157.6.18) by DM3PR1101MB1104.namprd11.prod.outlook.com (2a01:111:e400:5aad::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Wed, 11 Oct 2017 16:48:29 +0000 From: Thomas Haynes To: "J. Bruce Fields" Cc: Mailing List Linux NFS Subject: [PATCH] Args need to be the same for replay cache Date: Wed, 11 Oct 2017 09:48:22 -0700 Message-Id: <1507740502-5151-1-git-send-email-Thomas.Haynes@primarydata.com> X-Mailer: git-send-email 2.3.6 MIME-Version: 1.0 X-Originating-IP: [63.157.6.18] X-ClientProxiedBy: MWHPR12CA0035.namprd12.prod.outlook.com (2603:10b6:301:2::21) To DM3PR1101MB1104.namprd11.prod.outlook.com (2a01:111:e400:5aad::24) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c935354c-90d1-410f-d3c5-08d510c7e6ff X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017082002075)(2017052603199)(201703131423075)(201702281549075); SRVR:DM3PR1101MB1104; X-Microsoft-Exchange-Diagnostics: 1; DM3PR1101MB1104; 3:LDvqI7VXcokkqNigYrnoAksPdPBHL7Vdeq1jahhvvvssEy4AUHst2oKhRq42YMHvUdIXQGE5uuV9Os0UwtvVyt46qgCiJJ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wo7SKDCFweJaA68F3RguTcUrieF3aNkuGqh8cNFGMbb7Zd8EhOHxMBuAuaOzYiJhMFWIffpyK0qx4gGXzOGGYf/vC+66vA9g+qOpwlJInc8gwD9JflJW9cUUcoLybEvrDm1m2MQ/Dc783P08D0GAe1FaA8ePpBRBrBpI8up1jpxdX5H/LN9E0w/uHxmS2pNWrZkXH+SGSO7xuTGF2S4TM= X-Exchange-Antispam-Report-Test: UriScan:(158342451672863); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(20161123558100)(2016111802025)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(6043046)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM3PR1101MB1104; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM3PR1101MB1104; X-Forefront-PRVS: 0457F11EAF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(39830400002)(346002)(376002)(199003)(189002)(60444003)(81166006)(3846002)(81156014)(8676002)(36756003)(6116002)(6506006)(8936002)(189998001)(50466002)(48376002)(5660300001)(7736002)(68736007)(6916009)(6666003)(50226002)(305945005)(2906002)(5003940100001)(6512007)(50986999)(47776003)(6486002)(106356001)(4326008)(53936002)(16586007)(316002)(105586002)(478600001)(25786009)(16526018)(101416001)(97736004)(66066001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM3PR1101MB1104; H:jhereg.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM3PR1101MB1104; 23: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ghkapk+T6/2jS/9qvHXo2CunENuGG2OJj3hlO8jBJTb8TLf5KOsMd0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM3PR1101MB1104; 20:147nYD2MDm3nwuVnMhhL3AVB1jcgYEtaFRfEwaxfuE0Ik1xqvSqSIGGXHE5rAMkYx/LnGWCi+dkoAG536JZHXF9Z6wJ/xzpAhIBSKA+iGY6mMkqK6NOWfR+cjd7SxV+r8smp+vthrKs1YwCJSGzAM+Hg8vKA0jgo2UK5jt2W5PI= X-OriginatorOrg: primarydata.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2017 16:48:29.9886 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 03193ed6-8726-4bb3-a832-18ab0d28adb7 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR1101MB1104 X-MC-Unique: hz_o78n3MtmNaUWUBrLf4w-1 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Tom Haynes 2.10.6.1.3.1. False Retry If a requester sent a Sequence operation with a slot ID and sequence ID that are in the reply cache but the replier detected that the retried request is not the same as the original request, including a retry that has different operations or different arguments in the operations from the original and a retry that uses a different principal in the RPC request's credential field that translates to a different user, then this is a false retry. When the replier detects a false retry, it is permitted (but not always obligated) to return NFS4ERR_SEQ_FALSE_RETRY in response to the Sequence operation when it detects a false retry. Or in other words, sa_cachethis needs to be set or a server can respond with an error. Signed-off-by: Tom Haynes --- nfs4.1/server41tests/st_sequence.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nfs4.1/server41tests/st_sequence.py b/nfs4.1/server41tests/st_sequence.py index d8d460c..e1e5f06 100644 --- a/nfs4.1/server41tests/st_sequence.py +++ b/nfs4.1/server41tests/st_sequence.py @@ -115,7 +115,7 @@ def testReplayCache001(t, env): sess1 = c1.create_session() res1 = sess1.compound([op.putrootfh()], cache_this=True) check(res1) - res2 = sess1.compound([op.putrootfh()], seq_delta=0) + res2 = sess1.compound([op.putrootfh()], cache_this=True, seq_delta=0) check(res2) res1.tag = res2.tag = "" if not nfs4lib.test_equal(res1, res2): @@ -137,7 +137,7 @@ def testReplayCache002(t, env): op.rename("%s_1" % env.testname(t), "%s_2" % env.testname(t))] res1 = sess1.compound(ops, cache_this=True) check(res1) - res2 = sess1.compound(ops, seq_delta=0) + res2 = sess1.compound(ops, cache_this=True, seq_delta=0) check(res2) res1.tag = res2.tag = "" if not nfs4lib.test_equal(res1, res2): @@ -158,7 +158,7 @@ def testReplayCache003(t, env): sess1 = c1.create_session() res1 = sess1.compound([op.putrootfh(), op.lookup("")], cache_this=True) check(res1, NFS4ERR_INVAL) - res2 = sess1.compound([op.putrootfh(), op.lookup("")], seq_delta=0) + res2 = sess1.compound([op.putrootfh(), op.lookup("")], cache_this=True, seq_delta=0) check(res2, NFS4ERR_INVAL) res1.tag = res2.tag = "" if not nfs4lib.test_equal(res1, res2): @@ -176,7 +176,7 @@ def testReplayCache004(t, env): ops += [op.savefh(), op.rename("", "foo")] res1 = sess1.compound(ops, cache_this=True) check(res1, NFS4ERR_INVAL) - res2 = sess1.compound(ops, seq_delta=0) + res2 = sess1.compound(ops, cache_this=True, seq_delta=0) check(res2, NFS4ERR_INVAL) res1.tag = res2.tag = "" if not nfs4lib.test_equal(res1, res2): @@ -192,7 +192,7 @@ def testReplayCache005(t, env): sess1 = c1.create_session() res1 = sess1.compound([op.illegal()], cache_this=True) check(res1, NFS4ERR_OP_ILLEGAL) - res2 = sess1.compound([op.illegal()], seq_delta=0) + res2 = sess1.compound([op.illegal()], cache_this=True, seq_delta=0) check(res2, NFS4ERR_OP_ILLEGAL) res1.tag = res2.tag = "" if not nfs4lib.test_equal(res1, res2): @@ -208,7 +208,7 @@ def testReplayCache006(t, env): sess = c.create_session() res1 = sess.compound([]) check(res1) - res2 = sess.compound([], seq_delta=0) + res2 = sess.compound([], cache_this=True, seq_delta=0) check(res2) res1.tag = res2.tag = "" if not nfs4lib.test_equal(res1, res2):