Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2816335pxj; Mon, 14 Jun 2021 07:49:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKXalIZiBUZyfrex80aRKRTSFFIfwk19I8BQS/6Q8pj1bEIFHrpbtiZa4bbQsT/vHJOM3g X-Received: by 2002:aa7:ce05:: with SMTP id d5mr17170698edv.325.1623682186041; Mon, 14 Jun 2021 07:49:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623682186; cv=none; d=google.com; s=arc-20160816; b=BM1Jv+hQfh1pPNhm1RKBK2RYTiCsqg31Vs8CPBGj2JsorqzMmd5osw2B+5RoMeXlxK 7DZ5Jq4abS6cvjEGrgZDoiUsVSC4/QbNg6MBdmMAibuzl3Ngpk+Yh3Euhvj+rBxBjZ8o RSWNUj2LtMxqPQ19s6sFiu2KUxvBivbQ7kr+SKlQBhhtQcsc+Ljx7H9BGH3Lm/w9068B MwnR11RY4W7d7PrjVLoIYKpMrd7gei7T77l+4qJd0Dorv2tnl6Q0wgyN04RJGQq0apuy PQujbdvtntKITDfXfe5zd71B3O8QvuHCIL/Rv17LwyrBMKWGIRusohyRMlBmdDyX8Ar4 M95Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:dkim-filter; bh=yVPTAS751Urgf1xTUC0jBOmZOyde4m/ENjNrQeRRxGs=; b=DyixkniL3EP/qmyiNLQYjRQCSPd5+XX4aR2y865iXi3jhG9bbritDaaRbtcBgbjLQn nR6vOReFCxif35mn/TZWViiN8rOPKoI1aZLAJ0STVAx5yecDN6eYBbMGLkYLLweNgBkx VXfwKo7iDMQ/XAP7oY2HBUsQCGeHPWMWlOSQQIcDtIMPWVErRhRg11R/2gg2GM2uQS2z hG5EKA0QZmkOdDWJDVOPMxsifTxhL61BiEg+1WhQDIz3e+wHFSO14+TBkZ4Pliq3dB2a yvc4BYyg4fusJ6PysbmPytEO8M2Zy1yOFnld8R6y9wr7xPjgVgMT2EqQG9/o9yYR46Py fojA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r2si12035131ejp.248.2021.06.14.07.49.22; Mon, 14 Jun 2021 07:49:46 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232852AbhFNOuZ (ORCPT + 99 others); Mon, 14 Jun 2021 10:50:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232875AbhFNOuY (ORCPT ); Mon, 14 Jun 2021 10:50:24 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3040C061787 for ; Mon, 14 Jun 2021 07:48:21 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id 435563723; Mon, 14 Jun 2021 10:48:19 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 435563723 From: "J. Bruce Fields" To: Trond Myklebust , Anna Schumaker Cc: daire@dneg.com, linux-nfs@vger.kernel.org, "J. Bruce Fields" Subject: [PATCH 0/3] reexport lock fixes Date: Mon, 14 Jun 2021 10:48:15 -0400 Message-Id: <1623682098-13236-1-git-send-email-bfields@redhat.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: "J. Bruce Fields" The following fix up some problems that can cause crashes or silently broken lock guarantees in the reexport case. Not fixed: - Attempts to reclaim locks after a reboot of the reexport server will fail. This at least seems like an improvement over the current situation, which is that they'll succeed even in cases where they shouldn't. Complete support for reboot recovery is a bigger job. - NFSv4.1+ lock nofications don't work. So, clients have to poll as they do with NFSv4.0, which is suboptimal, but correct (and an improvement over the current situation, which is a kernel oops). So what we have at this point is a suboptimal lock implementation that doesn't support lock recovery. Another alternative might be to turn off file locking entirely in the re-export case. I'd rather take the incremental improvement and fix the oopses. --b. J. Bruce Fields (3): nfs: don't atempt blocking locks on nfs reexports lockd: lockd server-side shouldn't set fl_ops nfs: don't allow reexport reclaims fs/lockd/svclock.c | 30 ++++++++++++------------------ fs/nfs/export.c | 2 +- fs/nfs/file.c | 3 +++ fs/nfsd/nfs4state.c | 11 +++++++++-- fs/nfsd/nfsproc.c | 1 + include/linux/exportfs.h | 2 ++ include/linux/fs.h | 1 + 7 files changed, 29 insertions(+), 21 deletions(-) -- 2.31.1