Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp949548iob; Fri, 13 May 2022 17:27:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGRUfajMf/lwuX24Hyxk5yi/Xb3AhegVc8ytyDW7bycU5VBttVffZqii+HZODX0ihrcg8t X-Received: by 2002:a05:600c:4e91:b0:394:8d30:d6dd with SMTP id f17-20020a05600c4e9100b003948d30d6ddmr6652249wmq.21.1652488029073; Fri, 13 May 2022 17:27:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652488029; cv=none; d=google.com; s=arc-20160816; b=BNKinOnRNpzmrXZW3uGidbbNuSE/KdNT2DNRY2iftDnewuYLtfj/QQIW1Pwa2BBViT A0c8wUqG9L38Gv08Nno5ckNtNmO5QSCDxwiygaFSFMlCP07ViIpCa/p0u668aYTnckzq mUyUPWBLTQQi+1w4BY6/xn6KeZEz5ihR/DtgcB5ohNZCeJ/4cSXhsOEkIhwZ2AGKMOFa kd+H47xhN3lRrv3VnfIj/3WvmIphFiRZauvungRrleWrHZaDa3kghm6VlMGPZ0BJVKzF PyadCaF/yA1cBMy9NR7NIRqakaqH4GnZV0KuwrqOwN/JLJxJNT4/KxwBHCBvyW4rViLk QFmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=5RG02r69eZnKTp9Uzlr2A3sSYsmG309qXgqnZxLCnOc=; b=Jme06AfjxsO2xXv0uEafd7xirM06ZPgEKKQA2mZ7ic/9FAW/rLWD12bws+N9xK7Y46 Q8BAfDatmem8kDH3RCNbe0ywxudymrv/PUK1hpSFworoDcexMkrm1fUkXpkdNqmkfQj7 e1SMFJjHDK++94wdR85sq0d83BRZU1XyyLTeREH6Bc/WCKY4L1BpNSMoaGJw50iLROsL 0bjAqSsx9ksGzZwvPVFI+bf4nWG6R6rumWf20RLVoTArTkTiuTPneLbOtCoy3bssyrBS 7r1OR9IfOW1WzUj9Ne4suC+H/F9vTtMQE2rpNw1PLvPH8rDTNQRf04B/BA2kh0TXhdQo 53IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ZrW1SBuy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g4-20020a5d6984000000b0020ce01b4fcdsi3287682wru.936.2022.05.13.17.27.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 17:27:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ZrW1SBuy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 26C552F238A; Fri, 13 May 2022 16:20:11 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348137AbiEKVdn (ORCPT + 99 others); Wed, 11 May 2022 17:33:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236560AbiEKVdk (ORCPT ); Wed, 11 May 2022 17:33:40 -0400 Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com [IPv6:2607:f8b0:4864:20::b2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A03F672212 for ; Wed, 11 May 2022 14:33:38 -0700 (PDT) Received: by mail-yb1-xb2a.google.com with SMTP id v59so6350578ybi.12 for ; Wed, 11 May 2022 14:33:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5RG02r69eZnKTp9Uzlr2A3sSYsmG309qXgqnZxLCnOc=; b=ZrW1SBuyknTH0Pvt02TKD642XSK4dDYF44OjGQ0VBMY4sqk8wmxHJjX1Sq/cLJLTEy ZRo1N2cbFel7Rt1paK08Ddr/wL4a+R4+RWkVw3ZDGEv6TDV1RcMP3sse78Qo6IOf56cr tmGyd+/mxw6P1s0u6L9aQ9Ss0V1HFUr7Oqnrk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5RG02r69eZnKTp9Uzlr2A3sSYsmG309qXgqnZxLCnOc=; b=ZjiuGWLBs7lZoS5EZ9dTT8xX/hbFAa1O+mTZQ2Hl2ZEv5bcbfZOZZL7COfFJMWbYCP k8RUNa6Djy9OyRSuqRYCPD1lCwlU5e128qaIZL/tQjXNmaPvAKXstmDEk0+n3LDCG8bj KBW2Z1Qby8MuOoAsTB48Iso0BgAlcWJy8W/YBrcfkefdgD5cxAvVjXwdRXjs5FGaEcW1 XCZY2ChZhdKBzyuw9yuTmH4/fNnRL6Yqwyby/IQCshmVy6zkXyknb6gX7xhGNVxogmjK hK6HVxHDmm0+ITpD2O/KKmvhAgpli+2gB4+V2zYRqTq3IAbrkAuuRprLoMp7aIawaguy NBYw== X-Gm-Message-State: AOAM5304PaLJakhN1jML78V+dUUDNC/oFyOLIagsIoedSrZlbmMKWtbN jCw4hPLYm+50fHiz/CyNmq3AK8pyir/EFlUx40I4jA== X-Received: by 2002:a25:2a4c:0:b0:648:6a80:9cff with SMTP id q73-20020a252a4c000000b006486a809cffmr26542192ybq.507.1652304817908; Wed, 11 May 2022 14:33:37 -0700 (PDT) MIME-Version: 1.0 References: <20220511013057.245827-1-dlunev@chromium.org> <20220511113050.1.Ifc059f4eca1cce3e2cc79818467c94f65e3d8dde@changeid> In-Reply-To: From: Daniil Lunev Date: Thu, 12 May 2022 07:33:27 +1000 Message-ID: Subject: Re: [PATCH 1/2] fs/super: Add a flag to mark super block defunc To: Christoph Hellwig Cc: linux-fsdevel@vger.kernel.org, fuse-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Alexander Viro Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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-kernel@vger.kernel.org On Thu, May 12, 2022 at 12:54 AM Christoph Hellwig wrote: > > On Wed, May 11, 2022 at 11:30:56AM +1000, Daniil Lunev wrote: > > File system can mark a block "defunc" in order to prevent matching > > against it in a new mount. > > Why use a bool instead of using s_iflags? Oh, I was looking at the flag field, but for some reason got confused about its values. Looking again, I totally can use it. However, the other option, that Miklos proposed in a thread on the cover letter mail, is to remove the superblock from "type->fs_supers". I plan to upload a new version with that option. Which of those two would you prefer? > Also I suspect we should never reuse a force mounted superblock, > but at least for block devices we should also not allow allocating > a new one for that case but just refuse the mount. Re-use of a force unmounted superblock "just works" for at least ext4 - in fact, it continues to work as if nothing happened to it. Changing that may break existing use cases. For FUSE that unfortunately unachievable, given the daemon is disconnected from the driver and likely killed after force unmount, but ability to re-mount is essential, because force unmount is the only way to reliably achieve suspend while using FUSE, and if re-mount doesn't work, the connected device/share is missing after resume. Thanks, Daniil