Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7030293rwb; Mon, 12 Dec 2022 09:11:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf6qEo/ZVdTAzEfSjVln9kS7i3NQuBO3Pr6aOBFOKyCVi/fhaZzC4IKYTq/lrUB7MwqOLtX0 X-Received: by 2002:a17:902:dac2:b0:18d:dd85:303f with SMTP id q2-20020a170902dac200b0018ddd85303fmr15172950plx.22.1670865101874; Mon, 12 Dec 2022 09:11:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670865101; cv=none; d=google.com; s=arc-20160816; b=ndIzcXA80M4vjnf0FZ8Km/lXO/Fqsl8lCqLb+JbvRoBr29ItOqM/FcYJ8rfJoNp4M5 x4HxJaZuAVJu56rTP+vgw3d+oC7RHc4LgMf0WVW1rRBXu7TvNkVpIC+Kmy0L/OFsn7b5 6o72KwYy0UPyRUYowd6jJ1HulaJatjdOCPHhyn8r31FJZsK7zBMHFobhSoiR2Rc1yMUb rc2EzF0xyYwBffim2PtQLxEO+fHCBfaE+vO/07i5zsTYaALb93KoUZYrswt2+5kPc9wE JJuI4mbV0pt39v/GBPquAsGiBBjWTPE4tWJXiZWbAJg1JeTLp13mJk/XH0vxi5WNyNZP srJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=esX0cE2nblbUxn3ztQc8e0ajIZrl8t8gRHDP9VApGKk=; b=qoJki0MT7LNpk7yhd+z/wGwSMmXM00JiIrYN3GMogXTR/NAzJX2u0n9IzRcano8cuu N5xf9+tugoCulju1PlG88dcNBCHvAuqksjIithrZ+zvsJgVuY4Lhnw7eMgxhuvIjwM/q ThbB71zELK3vTx7JkySVYCidCq2j5cT9ajVfxjYwt+n+Vsk1NLjGaRHURZJJbdbhHfHN gfEb/VvREvSAcuxN+MsipylxDiVrpaZonQv8ER4H/xb3Jgaco4F2q2s2E7taFi1KY0K3 3Jwcq75p+TSEaVflNUdPVwryNt7P+Hy94t8tYAxjS/x+5G2fP5ARYX/M+MpW5FLpPf12 jL5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G83ic7eb; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f70-20020a636a49000000b00476941a4d27si9558922pgc.386.2022.12.12.09.11.16; Mon, 12 Dec 2022 09:11:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G83ic7eb; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232905AbiLLRGd (ORCPT + 99 others); Mon, 12 Dec 2022 12:06:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232984AbiLLRGM (ORCPT ); Mon, 12 Dec 2022 12:06:12 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D35A263C; Mon, 12 Dec 2022 09:06:07 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BBE94B80DB0; Mon, 12 Dec 2022 17:06:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A492C433D2; Mon, 12 Dec 2022 17:06:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670864764; bh=XTRsuIYAEgT1gquTzsuV5sUHTMNWmSiPqFHKWQsG3ek=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=G83ic7eb0L1iw75wMI0w9TqHE5sg2mBtd0vfxemt8JMbw49dLPbuKotbUpOJAHoRw hUZzqmt4BNBE3dF8hFyBTSZebIWYtEIZgELKBvPL+jY6Z+r9qPiYRlwdcfyhM0cg4D I5GYLciugHNkI6BZwTTtVlAyUj2kaeefOS6xdvP2VTkQeOaHR31KqT5u3B5kZOV11O CUYtD4ia00dPx1b8xkisZJDunIBTKaff9MMvw0A1E0dOLj6BS1p1FlyBNMywPfUQG1 pqTbh/N4y3avsIQpWJUHJ+lQmL9eUa9JquoBAQNPQNDv0a3wZ8+IOf/DCiN1Est8L9 RBtqHVfaxeyIQ== Message-ID: <2de81c537335da895bafcd9f50a239c439fb0439.camel@kernel.org> Subject: Re: [PATCH 0/3 v2] NFS: NFSD: Allow crossing mounts when re-exporting From: Jeff Layton To: Richard Weinberger , linux-nfs@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, chuck.lever@oracle.com, anna@kernel.org, trond.myklebust@hammerspace.com, viro@zeniv.linux.org.uk, raven@themaw.net, chris.chilvers@appsbroker.com, david.young@appsbroker.com, luis.turcitu@appsbroker.com, david@sigma-star.at, benmaynard@google.com Date: Mon, 12 Dec 2022 12:06:01 -0500 In-Reply-To: <20221207084309.8499-1-richard@nod.at> References: <20221207084309.8499-1-richard@nod.at> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.2 (3.46.2-1.fc37) MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Wed, 2022-12-07 at 09:43 +0100, Richard Weinberger wrote: > Currently when re-exporting a NFS share the NFS cross mount feature does > not work [0]. > This patch series outlines an approach to address the problem. >=20 > Crossing mounts does not work for two reasons: >=20 > 1. As soon the NFS client (on the re-exporting server) sees a different > filesystem id, it installs an automount. That way the other filesystem > will be mounted automatically when someone enters the directory. > But the cross mount logic of KNFS does not know about automount. > This patch series addresses the problem and teach both KNFSD > and the exportfs logic of NFS to deal with automount. >=20 > 2. When KNFSD detects crossing of a mount point, it asks rpc.mountd to in= stall > a new export for the target mount point. Beside of authentication rpc.mou= ntd > also has to find a filesystem id for the new export. Is the to be exporte= d > filesystem a NFS share, rpc.mountd cannot derive a filesystem id from it = and > refuses to export. In the logs you'll see errors such as: >=20 > mountd: Cannot export /srv/nfs/vol0, possibly unsupported filesystem or f= sid=3D required >=20 > To deal with that I've changed rpc.mountd to use generate and store fsids= [1]. > Since the kernel side of my changes did change for a long time I decided = to > try upstreaming it first. > A 3rd iteration of my rpc.mountd will happen soon. >=20 > [0] https://marc.info/?l=3Dlinux-nfs&m=3D161653016627277&w=3D2 > [1] https://lore.kernel.org/linux-nfs/20220217131531.2890-1-richard@nod.a= t/ >=20 > Changes since v1: > https://lore.kernel.org/linux-nfs/20221117191151.14262-1-richard@nod.at/ >=20 > - Use LOOKUP_AUTOMOUNT only when NFSEXP_CROSSMOUNT is set (Jeff Layton) >=20 > Richard Weinberger (3): > NFSD: Teach nfsd_mountpoint() auto mounts > fs: namei: Allow follow_down() to uncover auto mounts > NFS: nfs_encode_fh: Remove S_AUTOMOUNT check >=20 > fs/namei.c | 6 +++--- > fs/nfs/export.c | 2 +- > fs/nfsd/vfs.c | 8 ++++++-- > include/linux/namei.h | 2 +- > 4 files changed, 11 insertions(+), 7 deletions(-) >=20 This set looks reasonable to me. Reviewed-by: Jeff Layton