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=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 7C7BCC47082 for ; Tue, 8 Jun 2021 15:26:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5F799611AE for ; Tue, 8 Jun 2021 15:26:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231371AbhFHP17 (ORCPT ); Tue, 8 Jun 2021 11:27:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:59527 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233167AbhFHP1d (ORCPT ); Tue, 8 Jun 2021 11:27:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623165932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Br1rr7QBQj6YS5zJZEG2ZfZMvTHbAXZUz7RdIVHg2ZE=; b=QlwGOHE77Gmj7GZS2CnyKE1OXoaP/lB3tdU4QUGzCW6KtwWReNgwCU935RCVfaFKxl1Lq/ 0aJgI3IF9j1lC3u3TReCkMNzpCA+cTATwIFxyz7A5lbocfn2CGrl3qmGCOhxoNfrMVP6zN W+jVzI/gU7BKBGWAJAiEQavot7IJ7cI= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-387-yvl2-GesMsyNxXTKn1c7hg-1; Tue, 08 Jun 2021 11:25:31 -0400 X-MC-Unique: yvl2-GesMsyNxXTKn1c7hg-1 Received: by mail-wr1-f69.google.com with SMTP id m27-20020a056000025bb0290114d19822edso9586754wrz.21 for ; Tue, 08 Jun 2021 08:25:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=Br1rr7QBQj6YS5zJZEG2ZfZMvTHbAXZUz7RdIVHg2ZE=; b=fBrUJBApPX77j4Z+MhVkcLnfyqNWreLexGZYK/d1oEako3ejo5IOeicziC9tVtJ9Oh eQ+APoUq9UaDtcZdYIxflt7dnMYvK64FoA14o0uojteUXKwgqV8VVYT9KKRPNq2QBHeq TpSNeMqHwPyagAlgyUrxZ7fnUjPKsfTVuOpWHyZReLeoNU18uBIyCPQawtUJeTlnKgrZ x/SloL9KNS9J1LH+VBLhCj0+5WSsGLE2tl5/eQBSxMVTvYZDS8atWPwtH+yYvkrfyBvv PSQ+3OpT+qqqy0n5UFP1/Cr3auwNpOZ8CxnKW3eXt+tNq5S2J9kYKGBT1BScB71n5YpZ 41xA== X-Gm-Message-State: AOAM530FdXp1DT7o4OCPZ8fHE35FPa5iYFnIh7x3CGm0qDtfmOvvXRiC umz0iALMtoTBjTjbulmdfELX1PTIT8BS3GSgFXFT6dc/lsm0CYwgG96HJz+sJNkobKesNeT/5bE LOGUG2pN4/1l/SfcAAExUd3C5 X-Received: by 2002:adf:f207:: with SMTP id p7mr17509463wro.275.1623165930408; Tue, 08 Jun 2021 08:25:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmC1Lyls5BEV3cQOjm5iHNO4inyBWR7jW6utYjAybKyvaHNOJsr9hBv2b5dFrZgWVD7tUMVA== X-Received: by 2002:adf:f207:: with SMTP id p7mr17509455wro.275.1623165930303; Tue, 08 Jun 2021 08:25:30 -0700 (PDT) Received: from dresden.str.redhat.com ([2a02:908:1e46:160:b272:8083:d5:bc7d]) by smtp.gmail.com with ESMTPSA id b188sm4379485wmh.18.2021.06.08.08.25.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Jun 2021 08:25:30 -0700 (PDT) Subject: Re: [PATCH v2 4/7] fuse: Add dedicated filesystem context ops for submounts To: Greg Kurz , Miklos Szeredi Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, virtio-fs@redhat.com, Vivek Goyal References: <20210604161156.408496-1-groug@kaod.org> <20210604161156.408496-5-groug@kaod.org> From: Max Reitz Message-ID: <233b722a-4794-6905-f9d9-c0445ae24812@redhat.com> Date: Tue, 8 Jun 2021 17:25:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210604161156.408496-5-groug@kaod.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04.06.21 18:11, Greg Kurz wrote: > The creation of a submount is open-coded in fuse_dentry_automount(). > This brings a lot of complexity and we recently had to fix bugs > because we weren't setting SB_BORN or because we were unlocking > sb->s_umount before sb was fully configured. Most of these could > have been avoided by using the mount API instead of open-coding. > > Basically, this means coming up with a proper ->get_tree() > implementation for submounts and call vfs_get_tree(), or better > fc_mount(). > > The creation of the superblock for submounts is quite different from > the root mount. Especially, it doesn't require to allocate a FUSE > filesystem context, nor to parse parameters. > > Introduce a dedicated context ops for submounts to make this clear. > This is just a placeholder for now, fuse_get_tree_submount() will > be populated in a subsequent patch. > > Only visible change is that we stop allocating/freeing a useless FUSE > filesystem context with submounts. > > Signed-off-by: Greg Kurz > --- > fs/fuse/fuse_i.h | 5 +++++ > fs/fuse/inode.c | 16 ++++++++++++++++ > fs/fuse/virtio_fs.c | 3 +++ > 3 files changed, 24 insertions(+) Reviewed-by: Max Reitz