Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp895951rwl; Wed, 12 Apr 2023 05:47:43 -0700 (PDT) X-Google-Smtp-Source: AKy350Zw92AuY8brnVwWpfHrGrcM9Ufeuw2PGKOD2puAKzLYRsbAC0XFyCq3eQO4o0Xz8hF4KEM9 X-Received: by 2002:a17:90b:164f:b0:240:67d5:aea1 with SMTP id il15-20020a17090b164f00b0024067d5aea1mr23931724pjb.14.1681303663104; Wed, 12 Apr 2023 05:47:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681303663; cv=none; d=google.com; s=arc-20160816; b=vdZ0mlXfjDxKzZZQFkpJUo6eJ1GHwnXxpbrEroXeEs+lJwpeo+nN2YKBQjL+uHAK/z NjnT7rdHpf3Mmkg+iG0twA+5Kpc0K3cB5JJgRLBKxhzUyBH8CKJB34QAhquHy/xIGSVy nPioZejcAbnLiwpmwFEqJ0AEE044Fu6YqdbyFUPGGUIj40crHm1MSLUCcoYkRqEGIyN9 UxS3Yahbve7Meweq5AtxAbmsFxGoffcB1goQTOt/VL8n9InU3+KyP2Ja8EfnRyoTCMVP ZOjI2F4Xm/IOWLFR9yDoIxFldRHhb3Q6c/igtU9ww2fsLxUSc/m5mH7QoeUHCcwYCLPt h8lQ== 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=ddg0vAHFen4K0AUyZN8TD9RJ8e2AKTjO8ch3srJurzE=; b=nxf04eKFuNGvyp59fotarzs+7d+y897Ts2VMlk0B8Cy14XzBu67mDhxotDgOVPjCQ8 9/+NPBXVk7pha1QE641tN3wy2N06reAcQyDofzBS7b7hZOdgmnhou8w1SkcvjtHJ8nMP xjYK1+/61XuuRRS/EsUkJ/lPADz/m7mt/mHq3DaX8hto6DHQ2hgqthWTk25MV+/tEpq1 7YMPH3O4rxZ99UDOlCJnwNIFan9syenLWAwnS/eafFlG8ZPvZ7R0cFiUoQ5w9IP6DSMU u3TqZmjDMw8SxfIQe7kYgbWMRKZ68CSKXD5Do5IsXbPsjb//FdKmcg0QuGe9BhWOH/eA o5RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=0NE81cyr; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-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 t5-20020a17090a950500b0024664356ef7si1814770pjo.152.2023.04.12.05.47.30; Wed, 12 Apr 2023 05:47:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=0NE81cyr; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231795AbjDLMmi (ORCPT + 99 others); Wed, 12 Apr 2023 08:42:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231512AbjDLMmS (ORCPT ); Wed, 12 Apr 2023 08:42:18 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEBEB7EC1; Wed, 12 Apr 2023 05:42:08 -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=ddg0vAHFen4K0AUyZN8TD9RJ8e2AKTjO8ch3srJurzE=; b=0NE81cyrNaY13C8K9Ohz51hMMT H8xLDlox7rtYU3JMpi/o1SAdWWlvObLHFQJfTqJCbAGM9dcW5OL8gHOZ2ZyXZ5JEpZ35YBRQ/SJDw Awg6JdUVWLxnk5KF/M2Zl8rnE5rVIWXzbsN5geWGxL03pJgn+yPqrtFK/f1rScaWvqKNiob9Q1uq4 zwBzDQd4VSvi9A91DWhyreN5V2CWY4ROZWwPn6JruDwiEvPhDvD3Tdms4YsiY3X3AIsTMbXL2g90M hMjXbvq2r3mP+FN6fVrvENh5aI7Debl3VW76+MlDBh6fTbdSchuGtO8uG4TwA5+cmLhI6OwLIqLCA 8ozb6KTg==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1pmZnb-003BFA-1a; Wed, 12 Apr 2023 12:42:07 +0000 Date: Wed, 12 Apr 2023 05:42:07 -0700 From: Christoph Hellwig To: Dave Chinner Cc: Eric Biggers , Christoph Hellwig , Andrey Albershteyn , djwong@kernel.org, dchinner@redhat.com, linux-xfs@vger.kernel.org, fsverity@lists.linux.dev, rpeterso@redhat.com, agruenba@redhat.com, xiang@kernel.org, chao@kernel.org, damien.lemoal@opensource.wdc.com, jth@kernel.org, linux-erofs@lists.ozlabs.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com Subject: Re: [PATCH v2 00/23] fs-verity support for XFS Message-ID: References: <20230404145319.2057051-1-aalbersh@redhat.com> <20230412023319.GA5105@sol.localdomain> <20230412031826.GI3223426@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230412031826.GI3223426@dread.disaster.area> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,URIBL_BLOCKED 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-ext4@vger.kernel.org On Wed, Apr 12, 2023 at 01:18:26PM +1000, Dave Chinner wrote: > Right. It's not entirely simple to store metadata on disk beyond EOF > in XFS because of all the assumptions throughout the IO path and > allocator interfaces that it can allocate space beyond EOF at will > and something else will clean it up later if it is not needed. This > impacts on truncate, delayed allocation, writeback, IO completion, > EOF block removal on file close, background garbage collection, > ENOSPC/EDQUOT driven space freeing, etc. Some of these things cross > over into iomap infrastructure, too. To me that actually makes it easier to support the metadata beyond i_size. Remember that the file is immutable after add fsverity hash is added. So basically we just need to skip freeing the eofblocks if that flag is set.