Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20025865rwd; Wed, 28 Jun 2023 18:42:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7EkCewFTbCPw4ApomD/HjMin0UaAsqoO5V4bO4h6SGUatQAMlpDzpJ7+CMdxivTrkxjKsj X-Received: by 2002:a17:902:c244:b0:1b6:a99b:cece with SMTP id 4-20020a170902c24400b001b6a99bcecemr2994271plg.30.1688002963809; Wed, 28 Jun 2023 18:42:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688002963; cv=none; d=google.com; s=arc-20160816; b=TZ/cMYuzNkduaboTrqyxNTSSUaBKCSmaOBAJoiKCYKM3IWlfq1SpJbVwJqlHKB5OJ5 V5aG3Nbl1eHgwXLmjt2bFJzZBwrHMxv+ewRHLs3+1B1zs4D81HGdzBc1j1ZRUXtDkm4W YtySMA+C6MTd68yeNd1FYEfgB8dGdYmCxFf8VyH/ztK/vURro+155gw7ne3aJckeBQN5 44xWIKIX8Cl7c7a28i17j9CfKQL7I5LY/7HB7U5CsC4x05QSFPzhMGGY4LHpaceoOdOI S1k/TQNICf5M75jsQqiO0GVT7K4BN8RneapgbVuUEjEPhcXOFQDTo2c5cfTg+1WWrdJy QQRw== 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:message-id:subject:cc:to:from:date:dkim-signature; bh=YFSh4UQMxigzwwvL8diZTzDsQNOBblrcP22N90L84Vs=; fh=vexm3IQijlUe1vuKLNhAyy/C1h/KBIgiOQy31y0fvgI=; b=K7sLL19aLY6cAk9Jk/nVUB8exsU5SRpfAzJncUNZ4odfdT60FdUs0BFEqJj6ZnfRHn lU+KghXxpTF23bNatifexVntrJLueAoVSisJZIaEOp9SFwkfJ6SDXwI2uPBDjWfNzgmA yL6Y8NJM/ogW6HkU4nlkeA1WEALFdAlFYp44qZPkkJTMInZrGiea07WzQ/nkF3v/D2VL FFb7b2OrMH2hXZEDI1VzZN1k7rxMGi1+r3k64QTUiYXiv1g6iLo9EE3mUitsAiiXGKO8 MV8FtQC1faK2b/XGZZBde6XZ53ZxwkgxrqyZtKM2TjSfGhdxiu8n4KjNV4J1usGdzHv2 pDyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fromorbit-com.20221208.gappssmtp.com header.s=20221208 header.b=kCcBmQYr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e5-20020a170902744500b001ac4f733007si9403763plt.549.2023.06.28.18.42.28; Wed, 28 Jun 2023 18:42:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@fromorbit-com.20221208.gappssmtp.com header.s=20221208 header.b=kCcBmQYr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231392AbjF2BAo (ORCPT + 99 others); Wed, 28 Jun 2023 21:00:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231406AbjF2BAl (ORCPT ); Wed, 28 Jun 2023 21:00:41 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63B0A2689 for ; Wed, 28 Jun 2023 18:00:40 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1b8033987baso879915ad.0 for ; Wed, 28 Jun 2023 18:00:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fromorbit-com.20221208.gappssmtp.com; s=20221208; t=1688000440; x=1690592440; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=YFSh4UQMxigzwwvL8diZTzDsQNOBblrcP22N90L84Vs=; b=kCcBmQYr8egVuJFSES59uunr/I5DWWW/oVY38mczGq9tVtawHM54hG6vXq0XMkcXvw Walcv4qUS5C/tNKmiS0r2O02x49/+QmbVMQZm5lmGrJS6+S8fr3vDTCceDeigPa4wze7 wNMdtjOvk6TNdR5NGk95jN8A19ZSo6zHnyLY7VSOBE8Q3fdqQwr+DZ3IZfKncZ87eNKR 8fVvodAsY9k+EaQ823GLrU4al1j6bu8T9+NVSHRAaMjRngyvx/6bqNYOQroUGh2F0QWc LMvARJ/xA5WAVQYxU624wwuV3w8GYPQ2TUiiCmyK/f3fVn/u9ZEPXXvdgC6CjYDf6H8Q gerQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688000440; x=1690592440; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=YFSh4UQMxigzwwvL8diZTzDsQNOBblrcP22N90L84Vs=; b=QPr1c5c7O3cpJb9Jc8nSy+1zxH4XcU+wLt8eS2CXFytrlisQGLx1UH6KnSzaBXgX1q ZIhJFRmrssKm/yXQll8/86tvY16GUDoo9+gMa2E/PuPlKHKJyni4zg2xuQQIpyu2mH9a c9rt0XVJl4WP3OAZPCS7QXyssfJwGywg5iZfuWSC8GCLZmKixvZU0DIgnAxhtNmlipYA X6e6J3w/qzV/Xr0Fh0cOL68ZmjpbHUkHvbpyOoVpgjMf/xANdxQ65AYH58v0szqCGNgw BkGIfefdCVn92aqJJprtvKM9a5lt/vWiebXeYl7ltWn91EvMzHjjLDw9I2xxbbUGnpCN qaHA== X-Gm-Message-State: AC+VfDyWGrbg37hOAKPYf61uagPl83OwbdXAR2rd0WX08Vi/lxP1e+Oo LdvfNmagltiJbyezfofYIMbe8vlGuOUnx3k79Wo= X-Received: by 2002:a17:902:e551:b0:1b8:3936:7b64 with SMTP id n17-20020a170902e55100b001b839367b64mr4104977plf.1.1688000439787; Wed, 28 Jun 2023 18:00:39 -0700 (PDT) Received: from dread.disaster.area (pa49-186-94-37.pa.vic.optusnet.com.au. [49.186.94.37]) by smtp.gmail.com with ESMTPSA id t7-20020a1709028c8700b001b03842ab78sm8224744plo.89.2023.06.28.18.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 18:00:38 -0700 (PDT) Received: from dave by dread.disaster.area with local (Exim 4.96) (envelope-from ) id 1qEg1T-00HR8i-1z; Thu, 29 Jun 2023 11:00:35 +1000 Date: Thu, 29 Jun 2023 11:00:35 +1000 From: Dave Chinner To: Kent Overstreet Cc: Jens Axboe , torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-bcachefs@vger.kernel.org, Christoph Hellwig , Christian Brauner , Al Viro Subject: Re: [GIT PULL] bcachefs Message-ID: References: <4b863e62-4406-53e4-f96a-f4d1daf098ab@kernel.dk> <20230628175204.oeek4nnqx7ltlqmg@moria.home.lan> <2e635579-37ba-ddfc-a2ab-e6c080ab4971@kernel.dk> <20230628221342.4j3gr3zscnsu366p@moria.home.lan> <20230628225514.n3xtlgmjkgapgnrd@moria.home.lan> <1e2134f1-f48b-1459-a38e-eac9597cd64a@kernel.dk> <20230628235018.ttvtzpfe42fri4yq@moria.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230628235018.ttvtzpfe42fri4yq@moria.home.lan> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org On Wed, Jun 28, 2023 at 07:50:18PM -0400, Kent Overstreet wrote: > On Wed, Jun 28, 2023 at 05:14:09PM -0600, Jens Axboe wrote: > > On 6/28/23 4:55?PM, Kent Overstreet wrote: > > >> But it's not aio (or io_uring or whatever), it's simply the fact that > > >> doing an fput() from an exiting task (for example) will end up being > > >> done async. And hence waiting for task exits is NOT enough to ensure > > >> that all file references have been released. > > >> > > >> Since there are a variety of other reasons why a mount may be pinned and > > >> fail to umount, perhaps it's worth considering that changing this > > >> behavior won't buy us that much. Especially since it's been around for > > >> more than 10 years: > > > > > > Because it seems that before io_uring the race was quite a bit harder to > > > hit - I only started seeing it when things started switching over to > > > io_uring. generic/388 used to pass reliably for me (pre backpointers), > > > now it doesn't. > > > > I literally just pasted a script that hits it in one second with aio. So > > maybe generic/388 doesn't hit it as easily, but it's surely TRIVIAL to > > hit with aio. As demonstrated. The io_uring is not hard to bring into > > parity on that front, here's one I posted earlier today for 6.5: > > > > https://lore.kernel.org/io-uring/20230628170953.952923-4-axboe@kernel.dk/ > > > > Doesn't change the fact that you can easily hit this with io_uring or > > aio, and probably more things too (didn't look any further). Is it a > > realistic thing outside of funky tests? Probably not really, or at least > > if those guys hit it they'd probably have the work-around hack in place > > in their script already. > > > > But the fact is that it's been around for a decade. It's somehow a lot > > easier to hit with bcachefs than XFS, which may just be because the > > former has a bunch of workers and this may be deferring the delayed fput > > work more. Just hand waving. > > Not sure what you're arguing here...? > > We've had a long standing bug, it's recently become much easier to hit > (for multiple reasons); we seem to be in agreement on all that. All I'm > saying is that the existence of that bug previously is not reason to fix > it now. I agree with Kent here - the kernel bug needs to be fixed regardless of how long it has been around. Blaming the messenger (userspace, fstests, etc) and saying it should work around a spurious, unpredictable, undesirable and user-undebuggable kernel behaviour is not an acceptible solution here... I don't care how the kernel bug gets fixed, I just want the spurious unmount failures when there are no userspace processes actively using the filesytsem to go away forever. -Dave. -- Dave Chinner david@fromorbit.com