Return-Path: Received: from mail-oi0-f46.google.com ([209.85.218.46]:36162 "EHLO mail-oi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751469AbbIIRtp (ORCPT ); Wed, 9 Sep 2015 13:49:45 -0400 Received: by oibi136 with SMTP id i136so10186249oib.3 for ; Wed, 09 Sep 2015 10:49:45 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 9 Sep 2015 13:49:44 -0400 Message-ID: Subject: Re: upgrade/downgrade race From: Trond Myklebust To: Andrew W Elble , Bruce James Fields , Jeffrey Layton Cc: Linux NFS Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-nfs-owner@vger.kernel.org List-ID: +Bruce, +Jeff... On Wed, Sep 9, 2015 at 1:12 PM, Trond Myklebust wrote: > On Wed, Sep 9, 2015 at 9:37 AM, Andrew W Elble wrote: >> >> In attempting to troubleshoot other issues, we've run into this race >> with 4.1.4 (both client and server) with a few cherry-picked patches >> from upstream. This is my attempt at a redacted packet-capture. >> >> These all affect the same fh/stateid: >> >> 116 -> OPEN (will be an upgrade / for write) >> 117 -> OPEN_DOWNGRADE (to read for the existing stateid / seqid = 0x6 >> >> 121 -> OPEN_DOWNGRADE (completed last / seqid = 0x8) >> 122 -> OPEN (completed first / seqid = 0x7) >> >> Attempts to write using that stateid fail because the stateid doesn't >> have write access. >> >> Any thoughts? I can share more data from the capture if needed. > > Bruce & Jeff, > > Given that the client sent a non-zero seqid, why is the OPEN_DOWNGRADE > being executed after the OPEN here? Surely, if that is the case, the > server should be returning NFS4ERR_OLD_STATEID and failing the > OPEN_DOWNGRADE operation? > > Cheers > Trond