Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2203189ybe; Sat, 7 Sep 2019 10:49:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzp51N05LFX3noXw2Q8xRjJOz/+3hcoeerQthVGIL2u8u19SGjWm77eVuCNK9hnQsk5SyQK X-Received: by 2002:a17:902:b617:: with SMTP id b23mr15350906pls.184.1567878545311; Sat, 07 Sep 2019 10:49:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567878545; cv=none; d=google.com; s=arc-20160816; b=J004u4jjHHTNcI4E0Y5Tgqk3Q2ZLgI+RrJY6aClsznW7qczFpHmgTJbiSdqOgGTJ4q GxUfPO8XWik0TNrpXjT7ea4i/CzDy9tHqF5+t3Ss2tKvs04Te8PpUtcQsdGpCe21mxlH +haXITtWyFg89tsGwYuZxqXCvl6fjdhRrqufnDhBcZYL2KWXn557ROFg19rYpvo9Ybra GVXN58CyhK4q8gyMiedR9X+BeHJCEZ2NlYzPNJgo/34pydfvluecOiptnXk366xA6cvq JIdCrNXvJDGmkHcUTonSkI2/fxyDfitdZXoGGCQono/mb6dyhBf7BpJOgZJk0XpqpVnI 5QkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=7/JymfspIiylA2FNWAdAkYK/nD4TgUcKe+QaWMOxnfA=; b=dDimj1Wf/aVnaWASWw+yOxcdhqhewR1aw3Roewc6vzOkyQHoTziCdOv/qYWPuEZBN1 4GNViOTD0xdBUbJnQUMYHUbpC+Ajwcradyvgnhz3wedsp0DN2kJJvAWXcrfP3v10iaNx J0HSmjCkEYaUEXN1hn5eBaK2+1zdQhU/LVCPot4YSrNrNI2PZmlSsAyT9QKAYYxyBVDk 1yKwb7igtWflKruK5wWg6STHNITWR+TwVKXuW5MzJAxUUtcXhb3VVB6fhEib5Un/NYmD /J/NQxCMQlqYe1Yem23fdF7FGy0e9/eqFdsybScOxpmzhJ4XTLmDF97DHHdLqMIni5OO EjQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@umich.edu header.s=google-2016-06-03 header.b=CYW1q4Ad; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=umich.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10si7652156pgu.549.2019.09.07.10.48.51; Sat, 07 Sep 2019 10:49:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@umich.edu header.s=google-2016-06-03 header.b=CYW1q4Ad; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=umich.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394442AbfIFURR (ORCPT + 99 others); Fri, 6 Sep 2019 16:17:17 -0400 Received: from mail-ua1-f67.google.com ([209.85.222.67]:39841 "EHLO mail-ua1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394415AbfIFURQ (ORCPT ); Fri, 6 Sep 2019 16:17:16 -0400 Received: by mail-ua1-f67.google.com with SMTP id s15so2461883uaq.6 for ; Fri, 06 Sep 2019 13:17:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umich.edu; s=google-2016-06-03; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7/JymfspIiylA2FNWAdAkYK/nD4TgUcKe+QaWMOxnfA=; b=CYW1q4AdpJz0v9mF44/n1yPL9+wfvHWCyQpghmtck+asE4CAXStqCc1iIGi0YJ1Zmi 6A3mdqhYv23yGssjwDd3E81VZe/q2zJMIB4ybby9Upuiwqyg3DYc96f6x1ixDIinCJta 5Ij+wqVuJSJbDk96hc0lqIWOPtz6e/94efJ+f/VqVg7FAgMQ+tZT2ogFG5Gko+Jkis50 G7cNBrwOCV8YxedsCVVDlpnPtBSrkgpmlZkPeoIwdkgWf77846Et7/VhLkFDQl80Khmv 7nn6P7gYbJRvQeAfPO3x5UivhrPdwfSo7LlF1DJXqP8LC2S3+VwGXUmLpp3Plw6CVc7+ qzMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7/JymfspIiylA2FNWAdAkYK/nD4TgUcKe+QaWMOxnfA=; b=NKnO8bkiB3xBqRxgpfBEkFw1KTd0XyweRcJXVtDSkBJdVtANAjsdXfa8w98c7CsQBE aBxT02nSgkRKiPQsKI/gbLCWUqR/pk5lQTEfJj7giX0SINFA7lcYe//eXeCKKgOqC8ct d1okvpmkyJ5xI3qrT3II/c50rfuzBno2h8LEr2wHOB9Y4OLkrthnB6aRLQlXmD8jl+y/ 935Hl4sQ++T5NiJXYTr5yC8rTqHMKLYq58FerEXtqPS6KJSaV8HgON1h8RxdypNOsB9z lTUi8peUE9tB+HBP49qJfFfbJhpjgKMqxllu8mfxwXfc8GA31NcGb/R/DfKg371/ePlZ iW1A== X-Gm-Message-State: APjAAAWG9eIvfRTzMx7yOr3d/uVXra4i2XmFeOpAbs6jygF2+VG/1uRY McZho7tw1VsnItOz36BvuYmPfHNa0fGM2v8BMipURCs9 X-Received: by 2002:ab0:1c0b:: with SMTP id a11mr5417062uaj.65.1567801035300; Fri, 06 Sep 2019 13:17:15 -0700 (PDT) MIME-Version: 1.0 References: <20180530180553.38769-1-trond.myklebust@hammerspace.com> <20180530180553.38769-2-trond.myklebust@hammerspace.com> <20180530180553.38769-3-trond.myklebust@hammerspace.com> <20180530180553.38769-4-trond.myklebust@hammerspace.com> <20180530180553.38769-5-trond.myklebust@hammerspace.com> <3a4eafca05bfa82c7993990681f5184c0c3d09d3.camel@hammerspace.com> In-Reply-To: <3a4eafca05bfa82c7993990681f5184c0c3d09d3.camel@hammerspace.com> From: Olga Kornievskaia Date: Fri, 6 Sep 2019 16:17:03 -0400 Message-ID: Subject: Re: [PATCH 04/19] pnfs: Add layout driver flag PNFS_LAYOUTGET_ON_OPEN To: Trond Myklebust Cc: "linux-nfs@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, May 31, 2018 at 8:41 AM Trond Myklebust wrote: > > On Wed, 2018-05-30 at 16:10 -0400, Olga Kornievskaia wrote: > > Hi Trond, > > > > This feature is enabled for Flexfiles layout type. Is there a reason > > that it shouldn't be generic for all pnfs? > > Yes and no. It relies on use of the "current stateid" feature, which > has not previously seen heavy use, and the ability of the pNFS server > to handle layoutget races correctly (when the client sends 2 layoutget > requests in parallel, both using the open stateid). If the server is > invalidating one of the resulting layout stateids as it should, then it > had better either have a good fencing mechanism, or it must recall that > layout stateid before handing out the second layout. > > For that reason, I'd like to ensure that we at least test the existing > pNFS implementations to ensure we don't see regressions before we > enable the feature. Hi Trond, I'm getting back to trying to add LAYOUTGET to the OPEN compound for the file layout type. I'm looking at your reply and trying to figure out what kind of testing I should try to do. You mention a race where a client sends 2 layoutget requests in parallel. You say "using the open stateid", but when the LAYOUTGET is added to the OPEN, it'll be using as you said current stateid. So is the problem sending 2 concurrent OPENs for the same file (same owner)? Then server should issue the reply to the 1st, then a layout recall and reply to the 2nd? But for the testing is your suggestion to instrument sending 2 concurrent opens with the new code and see that happens? Thank you. > > On Wed, May 30, 2018 at 2:05 PM, Trond Myklebust > > wrote: > > > From: Fred Isaman > > > > > > Driver can set flag to allow LAYOUTGET to be sent with OPEN. > > > > > > Signed-off-by: Fred Isaman > > > Signed-off-by: Trond Myklebust > > > --- > > > fs/nfs/flexfilelayout/flexfilelayout.c | 1 + > > > fs/nfs/pnfs.h | 1 + > > > 2 files changed, 2 insertions(+) > > > > > > diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c > > > b/fs/nfs/flexfilelayout/flexfilelayout.c > > > index c75ad982bcfc..3ae038d9c292 100644 > > > --- a/fs/nfs/flexfilelayout/flexfilelayout.c > > > +++ b/fs/nfs/flexfilelayout/flexfilelayout.c > > > @@ -2347,6 +2347,7 @@ static struct pnfs_layoutdriver_type > > > flexfilelayout_type = { > > > .id = LAYOUT_FLEX_FILES, > > > .name = "LAYOUT_FLEX_FILES", > > > .owner = THIS_MODULE, > > > + .flags = PNFS_LAYOUTGET_ON_OPEN, > > > .set_layoutdriver = ff_layout_set_layoutdriver, > > > .alloc_layout_hdr = ff_layout_alloc_layout_hdr, > > > .free_layout_hdr = ff_layout_free_layout_hdr, > > > diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h > > > index daf6cbf5c15f..f71a55f11b97 100644 > > > --- a/fs/nfs/pnfs.h > > > +++ b/fs/nfs/pnfs.h > > > @@ -110,6 +110,7 @@ enum layoutdriver_policy_flags { > > > PNFS_LAYOUTRET_ON_SETATTR = 1 << 0, > > > PNFS_LAYOUTRET_ON_ERROR = 1 << 1, > > > PNFS_READ_WHOLE_PAGE = 1 << 2, > > > + PNFS_LAYOUTGET_ON_OPEN = 1 << 3, > > > }; > > > > > > struct nfs4_deviceid_node; > > > -- > > > 2.17.0 > > > > > > -- > > > To unsubscribe from this list: send the line "unsubscribe linux- > > > nfs" in > > > the body of a message to majordomo@vger.kernel.org > > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-nfs" > > in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- > Trond Myklebust > Linux NFS client maintainer, Hammerspace > trond.myklebust@hammerspace.com >