Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3712337rwl; Mon, 27 Mar 2023 19:05:21 -0700 (PDT) X-Google-Smtp-Source: AKy350Z715OVhuZr5ucMGBJP/je2bMQv/GQ5OnmRATZ9HRlLVpw82Kd2iLSk3cqUtY12v3YVNVwf X-Received: by 2002:a17:907:3f27:b0:870:b950:18d4 with SMTP id hq39-20020a1709073f2700b00870b95018d4mr18400254ejc.5.1679969120973; Mon, 27 Mar 2023 19:05:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679969120; cv=none; d=google.com; s=arc-20160816; b=MJOZLhlVxaQlo4bFMegQ2P6Z+aekELKEbiM9Ksl8KpLY5zQwpCe/mjW0iI58St2l5a s7njMV/R9dB1zrcm8KmIEfwnXkil6+B5yWxu0ynuPInstoLt/g+8J3LoGhXYDwzB58Fz h/x4vsXF7qxJSxPV1sVTuraWimFxTKxgAvOGKPCXraGuCnVGP9SeMaeGqh+6XodpE9U0 V8M8EE/w3Inzo8SK/NDankEpPfWmyTn3vAmnamo+NKLN1AwYxyWskHWNrVx8QB8uXc34 yz5hnhmITjkpFHeBwEyAyAsn5FuyMkKVwqvVmrtoPZ+BNKeFkhd4xBYRX6TgsRdc48Cm o9RQ== 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=rA2cY4p1v6ekYtf8DsnKHqijjNXm66+S+4+5O8TC21w=; b=JBzy3QiqkuMGkrst6QwBPfjHnFV55ucBUfsG6emLgK++BNlWHw4vGxx32Lllbcy8cU ruPACebkG9MYixkJd82ki1iPdgpZ5SgW2EOq02fNgNdPWFthD0rP4vf+YX8ijIOszQiQ AG9mQYBUKyMQ6vKKqq4tn6ZiwXPv4Mwn1yd7OREsHo2gmJJbpXjN3l4XEuFArVOtrSzd t5fgpCQ5kerE7UFz1KTqa3smCmgALun5ZavYdnX14YvLGRUWjOYdJAmu9fi/Sfywt0Gr E6ygP4rPvQddb+/hbG+x6MrQ78We6F/EcVV9slM3VUi23MAJRsjr1OkazskfIyJpGBSU AVjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=paZwrCfy; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ke27-20020a17090798fb00b008b1785971dcsi29726693ejc.630.2023.03.27.19.04.56; Mon, 27 Mar 2023 19:05:20 -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=@kernel.org header.s=k20201202 header.b=paZwrCfy; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232509AbjC1CDx (ORCPT + 99 others); Mon, 27 Mar 2023 22:03:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229631AbjC1CDr (ORCPT ); Mon, 27 Mar 2023 22:03:47 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C50EC2706; Mon, 27 Mar 2023 19:03:45 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 93BCBB8172C; Tue, 28 Mar 2023 02:03:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C072C4339C; Tue, 28 Mar 2023 02:03:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679969023; bh=rDGD6nXzD31aEJ2frSrLKNBg7SisZInufjue0FyMu04=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=paZwrCfyISP0Ppx1W9FYJ/00UCK474Yg7feY1babWAjmhlTXlEqXC0F8q+GomVlBw gipCsKaCqun50XoccNJEGF94paMEkqdAl02MVtYzmfwne5lGKvNRxPQ4SzmsTWSMbX 9AZXFedqhEte0rnloOgoDoB88JgAogAU5BMWePua1roYZ591ws2Lk2nM2dXuQozfX7 Az3FaJj4bPeOWM54q564hM6Sg57pBaFKD0sJAyD5oDKgEnAfSspinx099T0iaFSCfc KVRlepkDvaCoryCH/rQA/0Qx53FMJRlQ8BdfQbMc9nghMniVa91HLqityAQZlzcZva O/CCxLAp8JO9g== Date: Mon, 27 Mar 2023 19:03:41 -0700 From: "Darrick J. Wong" To: Christoph Hellwig Cc: "yebin (H)" , Ye Bin , linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] xfs: fix BUG_ON in xfs_getbmap() Message-ID: <20230328020341.GH16180@frogsfrogsfrogs> References: <20230327140218.4154709-1-yebin@huaweicloud.com> <20230327151524.GC16180@frogsfrogsfrogs> <64224406.5090106@huawei.com> <20230328014328.GG16180@frogsfrogsfrogs> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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 Mon, Mar 27, 2023 at 06:47:54PM -0700, Christoph Hellwig wrote: > On Mon, Mar 27, 2023 at 06:43:28PM -0700, Darrick J. Wong wrote: > > Seeing as the data fork mappings can change the instant the > > ILOCK drops, I'm not /that/ worried about users seeing a delalloc > > mapping even if the user requested a flush. The results are already > > obsolete when they get to userspace, unless the application software has > > found another means to lock out access to the file. > > That is true, but then again the users asked to not see delalloc > mappings, so we really shouldn't report one, right? Yeah, I suppose so. I wonder how many programs there are out there that don't pass in BMV_IF_DELALLOC /and/ can't handle that? But I suppose taking MMAP_EXCL is good enough to shut up the obvious assertion vector. The COW implementation probably ought to be doing the flush too. --D