From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A505DC49EA2 for ; Mon, 14 Jun 2021 14:48:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7C92C61283 for ; Mon, 14 Jun 2021 14:48:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232852AbhFNOuZ (ORCPT ); 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