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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15522C76195 for ; Tue, 28 Mar 2023 01:49:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232378AbjC1Bt2 (ORCPT ); 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 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@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.