Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3702644rwl; Mon, 27 Mar 2023 18:53:47 -0700 (PDT) X-Google-Smtp-Source: AKy350Yjjx2BYubnwDoE84sx9wVBXhBoA4zs+U3bxFYYNddCzworNkjcyQkDOaFh4OYYM64wrWjV X-Received: by 2002:a17:902:e882:b0:1a1:f413:70b1 with SMTP id w2-20020a170902e88200b001a1f41370b1mr17152676plg.18.1679968426881; Mon, 27 Mar 2023 18:53:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679968426; cv=none; d=google.com; s=arc-20160816; b=bUCFjrThQwnDrjPi41rvZjIh2JUPcUMXiAEQhnREMj1TkMKbP2OxxRrm5hoNyOzt8n L7jlkIyuCRG2JfTXzcCiKEbNchmTGqcDAgGW0aFfiZqnUYvfeuEoXAKcLOv1GSdXmeFv JgnNm1pHLd12k7uhdy/8Lbah9tETJqEhrNBT2B5EdpToxCfWjIjYtAXGpda5vWZ3Bcx3 IBAFRCcBttuenrMxoN82/qvAJhXQjcrGd+0Bzl8t42DombYrv2kTTDnE2BCGM/6nBcmK ewqaT6DVUs0H1iBiI+lgM2lTliQjI26sf9ZNsbaN8rvyV1A0zjwf3RvE9C1kuOwFjDqJ O2+A== 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=drkQ92cPVg9tVgMwwt3QwYKwER+tkvuJkif72VmCj2c=; b=UG1P1B1K9EGEpN3hj4c6/TpbQW6rN6zRYfThiQ0rtG9/vHjDtsByRpi1KAEtjt8D1N vrcjIqTLSJfAZ1xKKxYrRfyGtIKAKbnKXm4D6b6NH5S9BvhIwH9lOXH42rkb5SberpU9 rs/wgOq4X+fqjCyJPBjr82FfQcon6iALVqdtPKIv/ksIvsFlmxJj+wC3/vzq+wL030bW jJ1T+4k2f8gz5+L4ijmEAe4k7riPG/ihN144hUZZgBseNda4AET6kt6y0mt4/RBiXSP1 oSmYmpFDyCyu6FX8JhabETY2v9sFVbcUsYe4uKePwTwlszPw+bgKnhr3AfwsiW3673Vn iu3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=LZB2Hi2E; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iz21-20020a170902ef9500b0019316d9e4c8si28548294plb.373.2023.03.27.18.53.35; Mon, 27 Mar 2023 18:53:46 -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=@infradead.org header.s=bombadil.20210309 header.b=LZB2Hi2E; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232470AbjC1Bt2 (ORCPT + 99 others); Mon, 27 Mar 2023 21:49:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230379AbjC1Bt1 (ORCPT ); Mon, 27 Mar 2023 21:49:27 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8907310CC; Mon, 27 Mar 2023 18:49:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=drkQ92cPVg9tVgMwwt3QwYKwER+tkvuJkif72VmCj2c=; b=LZB2Hi2EmrzTVwEHj57Y7lNAT1 hI/h3cOZ6/ShUNWqImkrN3UPZsuzSYXe/xLo15Up6wRtx6G6ksD176dIHjC1eGXzgrD8NSUIAkQaL DapaTBrlH7+sYkHRC1qtVVvQkTh/ShsQAkhMlCg2ZLkn71KzFUqAyZi4mcj4YWgdeKNbNFcZZtJex HHhVYlkrGV8T1e3SIwLEASTwsyC21Nj2d22RbRF6++gu+yTmRJKjF8BAEsaHKGH23xpdhXr7iL0Wr AXgJeJ7R+b/I0JMG+PHs8c2IRL2C+M6DDGzIbu+UhJKaqDutb1YuF6dwTjSV45YlonsMqEMbqT2P8 FAb6SxiA==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1pgySg-00CpFT-1e; Tue, 28 Mar 2023 01:49:22 +0000 Date: Mon, 27 Mar 2023 18:49:22 -0700 From: Christoph Hellwig To: "Darrick J. Wong" Cc: Ye Bin , linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, Ye Bin , Christoph Hellwig Subject: Re: [PATCH] xfs: fix BUG_ON in xfs_getbmap() Message-ID: References: <20230327140218.4154709-1-yebin@huaweicloud.com> <20230327151524.GC16180@frogsfrogsfrogs> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230327151524.GC16180@frogsfrogsfrogs> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE 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 08:15:24AM -0700, Darrick J. Wong wrote: > > There's issue as follows: > > XFS: Assertion failed: (bmv->bmv_iflags & BMV_IF_DELALLOC) != 0, file: fs/xfs/xfs_bmap_util.c, line: 329 > > Why not get rid of the assertion? It's not like it changes the course > of the code flow -- userspace still gets told there's a delalloc extent. > > Or, if the assert does serve some purpose, then do we need to take > the mmaplock for cow fork reporting too? Looking at the COW fork reporting I think it's actually even more broken as it never tried to flush data to start with. But COW report is a DEBUG only feature, so maybe forcing or requiring BMV_IF_DELALLOC there would make a whole lot of sense.