Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2712824pxj; Mon, 17 May 2021 08:06:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqtOey9EDyQiqecn5nG8cjB+mTrwxX6udTsRBTaIJ2fBMPTeO/fFX9uMmXOBV2NrcXe3cI X-Received: by 2002:a92:db03:: with SMTP id b3mr112449iln.219.1621263970146; Mon, 17 May 2021 08:06:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621263970; cv=none; d=google.com; s=arc-20160816; b=XibiwTkrOouE3J0rKJyyrdd0G8UEE5mnEkAPnXqrCIjAOygZDyFqtEnNzTn96uEc8y r7HgLokq5gFYLiDlWZoADEF9B7qyAQdcwZ0bguzp2eEBDk2Q2n0syGQDu7vWvbW4Hfjh Nn/JIguP5NDtcuFbVZEMA3V2lXVYOSq2Ia3ValjGGuuGVdu+q/tMA/mbXG7JCRsh/i83 s/bV7kmsgH4VnsftQ3iWstJOsXOC79BJA9B7X6eJ7SZ9EbjojEeqF4xPf1l6T9zjD7ET Pim8UYvsS8z1QSAJWECELlxgAcSmqGy0k4jHYvSI61nE5ye93A8CDpIuAj1zJ7VJDP57 b3Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date; bh=kURcjh/3Cm9bR+9XjzuCXKk78YtBOKWFT7ZeabTuHTY=; b=OBFnDAkMgWL98IFWOsUafUO7+elDn0AOsq5aDE+Svi796+ZqoKYjtVx0eRo3pB7HMI Qq7ixFWFJ+9T3BylM6+BfDTOAfLF7o4j8B4wdE8pkISRQlyqU7yym0EzdVZrxPaAwZD/ HG2AhZmlh4c9u9UPeCFeW0nwko2tpVrbqs043lyKGE/DWLF+yjqmX0BaZj020VWcv75x Ewqrq16CF//uMYcb+XRTbE9JJH/HdfxwIG7aoyUsk+Ll9oXNzIWk4LSNjj95X7svhsbV PHji9fYRHVbaEqhr2HMhwnWgpg5vCUcbOttOozgbWC4FFCsTfTp35a26ZWaIQ0ZtOo5i ygeA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u10si17366376ilv.5.2021.05.17.08.05.42; Mon, 17 May 2021 08:06:10 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241082AbhEQPEE (ORCPT + 99 others); Mon, 17 May 2021 11:04:04 -0400 Received: from mx2.suse.de ([195.135.220.15]:50058 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242278AbhEQPCD (ORCPT ); Mon, 17 May 2021 11:02:03 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id D180AAEBB; Mon, 17 May 2021 15:00:45 +0000 (UTC) Date: Mon, 17 May 2021 17:00:43 +0200 From: Petr Vorel To: NeilBrown Cc: "J . Bruce Fields" , linux-nfs@vger.kernel.org, Steve Dickson , Chuck Lever , Alexey Kodanev Subject: Re: [PATCH/RFC v2 nfs-utils] Fix NFSv4 export of tmpfs filesystems. Message-ID: Reply-To: Petr Vorel References: <20210422191803.31511-1-pvorel@suse.cz> <20210422202334.GB25415@fieldses.org> <162035212343.24322.12361160756597283121@noble.neil.brown.name> <162122673178.19062.96081788305923933@noble.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <162122673178.19062.96081788305923933@noble.neil.brown.name> Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Hi Neil, > Some filesystems cannot be exported without an fsid or uuid. > tmpfs is the main example. > When mountd (or exportd) creates nfsv4 pseudo-root exports for the path > leading down to an export point it exports each directory without any > fsid or uuid. If one of these directories is on tmp, that will fail. > The net result is that exporting a subdirectory of a tmpfs filesystem > will not work over NFSv4 as the parents within the filesystem cannot be > exported. It will either fail, or fall-back to NFSv3 (depending on the > version of the mount.nfs program). > To fix this we need to provide an fsid or uuid for these pseudo-root > exports. This patch does that by creating an RFC-4122 V5 compatible > UUID based on an arbitrary seed and the path to the export. > To check if an export needs a uuid, text_export() is moved from exportfs > to libexport.a, modified slightly and renamed to export_test(). > Signed-off-by: NeilBrown Tested-by: Petr Vorel tmpfs and btrfs via LTP test nfs01 on openSUSE. Kind regards, Petr