Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4944899pxv; Tue, 20 Jul 2021 15:12:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznpTkvcIlqLiRHZRLk66DYRgxfJEE8C+o1YAwbUpybmb73+4MSJ82Z9iOPMtnuJlm41RwD X-Received: by 2002:a05:6402:1d96:: with SMTP id dk22mr43414874edb.7.1626819135800; Tue, 20 Jul 2021 15:12:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626819135; cv=none; d=google.com; s=arc-20160816; b=tic+2P6ga0wxfjHsBpTAlsVf5+IYJ7TdJYUO+nCgAWb/VLNqbE1L7h7KD2ca7rcFr5 MHdslX/f77X322CD8WRqByn/9XmLw7NNu3ejDtAqODV+M7U9zRgt6EvOKgVHgNuf3Th4 HhWjcpCa9UqlI17c6w/VfSbXQwrtZJpLXp38geowrCieiFGg1EmRrUMtvDx073X5/AUg bglOSagpw93mwrj9iTBgpKZaRO5DRyOaRn2l5BaHZ656zVYNA7bwF5E2F43c6V2Q63FD MTHZkFqdf7Xv4dT5uCo3iielhkgJa8ZXduOcR5H7MfxNRz2o0f621IWj301OkElDGQOk yCsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=LtQY5pxcSArdGZFknLSBlW9FrCcEI34fvbHFuaQyogg=; b=NkRIZ3LFNOdh/VutcFi5tz+dbrFVMOGB56FdmPyzWj6KyoxcziMLuYNIlT7FmcFOpV YY3pFIbusAq+opYcVwyqim9uQGIuS2/+3yzTjPkDaRg1UUnST/xpaWgUG/Qb/g7vUil5 f72GkSO1CdCt3GXUP4uT2oXgyRnzumYRB6y4Wn0ctxo4df2AceV4wwdGMAFIw7O96BdD vVsql6a72xd1BvALD3YQ6DXZQfig7XHdkCZr9mxo54JwS+damsSAIiVO0egXVflf7bUu 9E7rZ7TBbWBENW8/GUPqdzjtNt8EcRWCsJstBz6O04dSHww513Zobe/N5u/Q5q0jKhIm AcAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b="z/mUlVP4"; 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 t24si4972538ejs.95.2021.07.20.15.11.38; Tue, 20 Jul 2021 15:12:15 -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; dkim=pass header.i=@fieldses.org header.s=default header.b="z/mUlVP4"; 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 S229606AbhGTVat (ORCPT + 99 others); Tue, 20 Jul 2021 17:30:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231770AbhGTVap (ORCPT ); Tue, 20 Jul 2021 17:30:45 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E314C0613E0; Tue, 20 Jul 2021 15:10:47 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id CDD006801; Tue, 20 Jul 2021 18:10:44 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org CDD006801 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1626819044; bh=LtQY5pxcSArdGZFknLSBlW9FrCcEI34fvbHFuaQyogg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=z/mUlVP4bhdzK/bCfP9BbYrmPf9FswIlx1cglIiLZyW5C9RzXTBYq5Gdwn0nMtQQR g63IIkVYRnrPdSRr43VG0oSuxVUMNHhX/uDzQf1Fe666RFKXGvd4H9T2451nNzaq11 1Tfqda1//Qzecw6mQbuQX+KJsTmPCX76mv3yWzh8= Date: Tue, 20 Jul 2021 18:10:44 -0400 From: "J. Bruce Fields" To: Josef Bacik Cc: Christoph Hellwig , NeilBrown , Chuck Lever , Chris Mason , David Sterba , linux-nfs@vger.kernel.org, Wang Yugui , Ulli Horlacher , linux-btrfs@vger.kernel.org Subject: Re: [PATCH/RFC] NFSD: handle BTRFS subvolumes better. Message-ID: <20210720221044.GD19507@fieldses.org> References: <20210613115313.BC59.409509F4@e16-tech.com> <20210310074620.GA2158@tik.uni-stuttgart.de> <162632387205.13764.6196748476850020429@noble.neil.brown.name> <28bb883d-8d14-f11a-b37f-d8e71118f87f@toxicpanda.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, Jul 15, 2021 at 02:01:11PM -0400, Josef Bacik wrote: > The problem I ran into was the automount stuff requires that we have a > completely different superblock for every vfsmount. This is fine for > things like nfs or samba where the automount literally points to a > completely different mount, but doesn't work for btrfs where it's on > the same file system. If you have 1000 subvolumes and run sync() > you're going to write the superblock 1000 times for the same file > system. Dumb question: why do you have to write the superblock 1000 times, and why is that slower than writing to 1000 different filesystems? > You are > going to reclaim inodes on the same file system 1000 times. You are > going to reclaim dcache on the same filesytem 1000 times. You are > also going to pin 1000 dentries/inodes into memory whenever you > wander into these things because the super is going to hold them > open. That last part at least is the same for the 1000-different-filesystems case, isn't it? --b. > This is not a workable solution. It's not a matter of simply tying > into existing infrastructure, we'd have to completely rework how the > VFS deals with this stuff in order to be reasonable. And when I > brought this up to Al he told me I was insane and we absolutely had > to have a different SB for every vfsmount, which means we can't use > vfsmount for this, which means we don't have any other options. > Thanks, > > Josef