From patchwork Sun Nov 27 06:26:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Haynes X-Patchwork-Id: 9448711 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 934576071C for ; Sun, 27 Nov 2016 06:27:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CCCC20855 for ; Sun, 27 Nov 2016 06:27:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71BB922376; Sun, 27 Nov 2016 06:27:51 +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 02AEA20855 for ; Sun, 27 Nov 2016 06:27:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753371AbcK0G1u (ORCPT ); Sun, 27 Nov 2016 01:27:50 -0500 Received: from us-smtp-delivery-194.mimecast.com ([63.128.21.194]:42614 "EHLO us-smtp-delivery-194.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753079AbcK0G1r (ORCPT ); Sun, 27 Nov 2016 01:27:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=PrimaryData.onmicrosoft.com; s=selector1-primarydata-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=VauLH6H3D8PEZ02LPDsZ1e1DmuLPT2UtHtnNNw+pOQw=; b=di0K45wqltK6f6ICpuFdMgeDEckzDWFQ2p9PE4RBdASZvMJDsN1BJfSwKtQOQys7st7VhrgbGdR73ucP5087D66QLxdY54tWQ9ff2ViYFEzLOsJbFH3EpZnB+SqP65f2KZ1ekxhiXoA8zsphPKdTFfzhh1fygifwreiAsCLtSH4= Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02lp0018.outbound.protection.outlook.com [216.32.180.18]) (Using TLS) by us-smtp-1.mimecast.com with ESMTP id us-mta-66-4z_8HgusNmOOjMmCIy9fBw-4; Sun, 27 Nov 2016 01:27:35 -0500 Received: from jhereg.localdomain (73.202.55.195) by BN6PR11MB1364.namprd11.prod.outlook.com (10.173.33.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.747.10; Sun, 27 Nov 2016 06:27:24 +0000 From: Tom Haynes To: "J. Bruce Fields" CC: Linux NFS Mailing list Subject: [PATCH pynfs 08/12] Add a check to see if NFS4ERR_OLD_STATEID is issued on concurrent layoutgets Date: Sat, 26 Nov 2016 22:26:37 -0800 Message-ID: <1480228001-64821-9-git-send-email-loghyr@primarydata.com> X-Mailer: git-send-email 2.3.6 In-Reply-To: <1480228001-64821-1-git-send-email-loghyr@primarydata.com> References: <1480228001-64821-1-git-send-email-loghyr@primarydata.com> MIME-Version: 1.0 X-Originating-IP: [73.202.55.195] X-ClientProxiedBy: DM2PR07CA0047.namprd07.prod.outlook.com (10.141.52.175) To BN6PR11MB1364.namprd11.prod.outlook.com (10.173.33.8) X-MS-Office365-Filtering-Correlation-Id: c9cc8aa5-81c7-4f64-6f60-08d4168e73ef X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN6PR11MB1364; X-Microsoft-Exchange-Diagnostics: 1; BN6PR11MB1364; 3:E7pEZnSK+bSTin4pBX05wOWoUf8rgnqcomVoxI4k/ysa6aOUqBXJnYaHZca0azuw6xcgSE44pbhSnCOoIAv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I/38s5wRnhElL/8lYVImPNtCPd8SWzfqxVC0no3lissnOk36rzRz6CinkFQJt56qTlaaSyYqitopRJ7R9DkvxG5FLLEWZiSpJ6f+GUOZEfJ+/26sNB0V0O5Mm8QlO2Qlm6IJV7wqnh0Nb8ie5qr7xgdVFfVhtZMeG8vib5mGEBUzyDg/6jE/I4iYpqtR2lMiCH5bmrJNDnj+ek3l4EunlDtUAglY1zeUE6tKU0eH/4k8cTJYHkrLGQdPpdAa2knuNERkILrvOcMuqokuUZ3l0ez5tr1Uo61477; 20:0N5nb5QWB6gCjIAAo4VGBKkKIvqPRWWwLCfI2EzljqfZ5lILYwlMPtDc++nPjDFcaSmV7g9WJyVPHrN3ATGxiNftTLOpEjYs9+figOMcEbZ3usWXI9FZ5NONWoYEVy4HWr0I7aq4J2YIvmXy8rarysV42aLE02C8VQ+g/MPMgi4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6060326)(6045199)(6040361)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(6061324)(20161123560025)(2016111802025)(20161123555025)(20161123564025)(20161123562025)(6043046)(6042181); SRVR:BN6PR11MB1364; BCL:0; PCL:0; RULEID:; SRVR:BN6PR11MB1364; X-Microsoft-Exchange-Diagnostics: 1; BN6PR11MB1364; 4:kWQmRcNDdUct9fnIPIkxWeFtHtAjtKSmpLA9MFJPx/N+yXN4Xrvs8OjeA603fmzVH5k0seBLSHTWNCTmB4K0QPZ/KzJ8lmUvxIgPIwAwvAvBLTzSGunLQwaTiAuj+ibA4SCYOCh1jley3S6cIPh7voUS6Wxdz/OCkqjOhaslry1GXrPdRLNKrBuK1v3RiuevOezxHJfmzxuLKIJ2V6vGmw2GDOKz4Z53dKu0IaKLFdZ4LxHfq3YOT6egHnNeeNaAvLaa9I2bzIRrs59M36Mb9YYNPxXxScyzqFQjwcoFj7fwLG6IDRLDQ9Ncf5Q3eSobos/7K8iWF3mj399XdsS8fLMsuGUzp2wwB5zpNwfoKvLkUOs/H9as5Q/yHFI7JZAb91WJuxM7H0siBlKAKDJCkP3NtdOr6UrkPNzLrXbxFP7T2DGqORJ2k46Lt66RyeXwSJHUzX1bL1AHAoM+lScKrxF/uYoBBlQpuOEGcfeJA43OvYbNHqQMgxw3eO5Vu1PafRmhJSlH3hQh/gDUDe4ZYLrDeGt4Z7OUtCbt3fiCXjQ0Znu3ZlsF+D6DZAVmmiKnalnjHnDoH+ZqY99pG0o3OpserdvHdYy0lbmJqw21Olf6tJESUu94Lk3xGWhNG3QonNJUNCCIm9n0S/x2OX/xD1k2aPwvx/Ui0r/i39nYvbcP/n3pLj9DcDlMDEFXt5tv X-Forefront-PRVS: 0139052FDB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(199003)(189002)(50986999)(86362001)(5003940100001)(68736007)(305945005)(7736002)(7846002)(105586002)(101416001)(97736004)(42186005)(92566002)(76176999)(36756003)(66066001)(38730400001)(47776003)(110136003)(33646002)(106356001)(733004)(2950100002)(50466002)(8676002)(6916009)(6666003)(81166006)(81156014)(4326007)(50226002)(5660300001)(48376002)(2906002)(6116002)(3846002)(6486002)(189998001)(15760500001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR11MB1364; H:jhereg.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR11MB1364; 23:wiRe12QHUkEpXvvIeuNydod49v/S3V1/AAWD/IjQ1?= =?us-ascii?Q?C3TXV0V+xCkcsZR0W6BKkaYsRGE0XEUfDn7NhHBhtrfNif6+WDPB2SFX1x8v?= =?us-ascii?Q?9rRs3wnMbFmfUDZ4HWw/oVrdB4iGryogc8wcQ/4v7LxIPGc6L2kzyMUTmKRv?= =?us-ascii?Q?+inKgql7U67HBJcYblqmIBui7w+ReiOqwgHRiC3MbkbiDe3BY4S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rPDeKPXM1HCd73aGwIKVPamsKgorUVQnUPKm+OWZ0XyQEZaOtHBKJO+nmK690HUX0jaOnhNnZNcVB+IFFn562y3jg6xR/LJgDjkW000D6j5ZUJFyZKh+wIvTY8ktQZbjBzyyCaVrSKJtcl2PQP6GgkHm+TTMU6jMu09fMMIWNW9LODQaJ0hV5tiL/NJV2BbI4jQeGV28TWDWxappqXocrwCaNYGMtnJNDizlOvEA4KgAZj2NuBPTIIJ+0LPo0jaR3GV7/ybj0u2ZBDNylfwB7ArUvIghAA==; 20:AoS/DTRY20JZA/soyjdFDksZH2Otjsxkzlv90ijBlmnfdtlSz+M/pSkjaoAb1O/svGu4wwjUSVtYGr0XhE1ZXqd0uFHCQYXWyH892m7NlMjhgl92O4riABHl22EIGtDMdeRABFmUwd73u8fZNiSelps1dSxkEFYzeM4ma6Omp9U= X-OriginatorOrg: primarydata.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Nov 2016 06:27:24.8527 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1364 X-MC-Unique: 4z_8HgusNmOOjMmCIy9fBw-4 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 Signed-off-by: Tom Haynes --- nfs4.1/server41tests/st_flex.py | 68 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/nfs4.1/server41tests/st_flex.py b/nfs4.1/server41tests/st_flex.py index bb4405c..8ecb114 100644 --- a/nfs4.1/server41tests/st_flex.py +++ b/nfs4.1/server41tests/st_flex.py @@ -106,6 +106,70 @@ def testFlexLayoutReturnFile(t, env): res = close_file(sess, fh, stateid=open_stateid) check(res) +def testFlexLayoutOldSeqid(t, env): + """Check that we do not get NFS4ERR_OLD_STATEID if we send + two LAYOUTGETS in a row without bumping the seqid + + FLAGS: flex + CODE: FFLOOS + """ + seqid_next = 1 + sess = env.c1.new_pnfs_client_session(env.testname(t)) + # Create the file + res = create_file(sess, env.testname(t)) + check(res) + + # Get layout 1 + fh = res.resarray[-1].object + open_stateid = res.resarray[-2].stateid + + ops = [op.putfh(fh), + op.layoutget(False, LAYOUT4_FLEX_FILES, + LAYOUTIOMODE4_RW, + 0, 0xffffffffffffffff, 8192, open_stateid, 0xffff)] + res = sess.compound(ops) + check(res) + lo_stateid = res.resarray[-1].logr_stateid + + if lo_stateid.seqid != seqid_next: + fail("Expected stateid.seqid==%i, got %i" % (seqid_next, lo_stateid.seqid)) + seqid_next += 1 + + # Get the first with the lo_stateid + ops = [op.putfh(fh), + op.layoutget(False, LAYOUT4_FLEX_FILES, + LAYOUTIOMODE4_RW, + 0, 0xffffffffffffffff, 8192, lo_stateid, 0xffff)] + res = sess.compound(ops) + check(res) + lo_stateid2 = res.resarray[-1].logr_stateid + + if lo_stateid2.seqid != seqid_next: + fail("Expected stateid.seqid==%i, got %i" % (seqid_next, lo_stateid2.seqid)) + seqid_next += 1 + + # Get the second with the original lo_stateid + ops = [op.putfh(fh), + op.layoutget(False, LAYOUT4_FLEX_FILES, + LAYOUTIOMODE4_RW, + 0, 0xffffffffffffffff, 8192, lo_stateid, 0xffff)] + res = sess.compound(ops) + check(res) + lo_stateid3 = res.resarray[-1].logr_stateid + + if lo_stateid3.seqid != seqid_next: + fail("Expected stateid.seqid==%i, got %i" % (seqid_next, lo_stateid3.seqid)) + seqid_next += 1 + + ops = [op.putfh(fh), + op.layoutreturn(False, LAYOUT4_FLEX_FILES, LAYOUTIOMODE4_ANY, + layoutreturn4(LAYOUTRETURN4_FILE, + layoutreturn_file4(0, 0xffffffffffffffff, lo_stateid, "")))] + res = sess.compound(ops) + check(res) + res = close_file(sess, fh, stateid=open_stateid) + check(res) + def testFlexLayoutStress(t, env): """Alternate LAYOUTIOMODE4_RW/LAYOUTIOMODE4_READ layout segments in the file @@ -117,7 +181,7 @@ def testFlexLayoutStress(t, env): # Create the file res = create_file(sess, env.testname(t)) check(res) - # Get layout 1 + fh = res.resarray[-1].object open_stateid = res.resarray[-2].stateid lo_stateid = open_stateid @@ -126,7 +190,7 @@ def testFlexLayoutStress(t, env): ops = [op.putfh(fh), op.layoutget(False, LAYOUT4_FLEX_FILES, LAYOUTIOMODE4_READ if i%2 else LAYOUTIOMODE4_RW, - i * 8192, 8192, 8192, lo_stateid, 0xffff)] + 0, 0xffffffffffffffff, 8192, lo_stateid, 0xffff)] res = sess.compound(ops) check(res) lo_stateid = res.resarray[-1].logr_stateid