Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1994198pxb; Mon, 8 Mar 2021 11:10:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxpwlBS15ul2hYAIEs8ftcdwVUoL8FoVr/nN7spBovuZWblmF7HRz87cuqHCpEWIbtkihE X-Received: by 2002:a05:6402:26c9:: with SMTP id x9mr82813edd.322.1615230642747; Mon, 08 Mar 2021 11:10:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615230642; cv=none; d=google.com; s=arc-20160816; b=qL+GgKctP0U2N3gl9SU6gkQ9taMja685klXVNxIKSYGy8gPAetD4VJ1TmXmwAJhqzm XJKdeGnaVtPR3pTmt6P4kuehNqWQ/C8VPc6iueEJVYvWDWZu/EENG/loF7S51IHlZVLT 9HF0vgBofDjARvnQ11UHmD4upBg15lj6lFnH0Hvrc8EO0ddhkJMfS49Ykb8sbQDuz11U VcqYqr1wm3dsaFlLW5KWrf1PlCWH/DXDO1oGUkbhQOX7Udrco/z7VVfzxRlfQpnLdNr2 Wrp5h4YmUhp7QGm/vW+FTYIAKb7hXX2pn9JjMszpbAhbri2Hf4HIO5zRbEfCL4u4NYpP 8sFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-transfer-encoding :content-id:mime-version:subject:cc:to:references:in-reply-to:from :organization:dkim-signature; bh=pBhajOJHrx3P1bFfpTnaW+JD8S792IZZwlNpIQC5Q0g=; b=pcC43o1IKp2SxvEO8ymsWLMpx8jpEZqjxV4H/2blE5HI6VV/my687hNVG/ZZUoejsl sZMIzf6CcJrRWWYVOhoT5SlkAuZGOPF5fa5OtakCPwhamLmeO8nL/6NHV0q/u016YOx2 gMIOggf5ZZAwYPgGAplUGwr7V3CJiujYKrfJvPo6yVOl1YpUsek8BXtRlRMH3Md+W+QS myT8rx73wNGjw2Fi9yHByD2L0iG0yubZDBSMZmvjgG1ByFQj0SPRYKmS9v5dgWi+5axC mEXbAjW9cuiIpxqspt5iqTC75IWn8VUPJ54KTcd+vt5z0GZHtoJnWCPnfR4YNF53zM3U qrwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Wa4JJmEs; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h8si6923351edw.383.2021.03.08.11.10.14; Mon, 08 Mar 2021 11:10:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Wa4JJmEs; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230327AbhCHTJc (ORCPT + 99 others); Mon, 8 Mar 2021 14:09:32 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:53591 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229904AbhCHTJE (ORCPT ); Mon, 8 Mar 2021 14:09:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615230543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pBhajOJHrx3P1bFfpTnaW+JD8S792IZZwlNpIQC5Q0g=; b=Wa4JJmEsSW657KZboi0NuNYCQXrcQKQCtgdmsY34DNdoKDodEQNsFhO+K82qcz6gnXw3Am bYFm5nlw2LlXa7zv3+yRNJKop2+0AW3SkmncBdXUTIvmnY6QEqvJD0OH5QYAXX3wWi5faE px3MGm5oi5ZdKAjrcO5E9eXxvseaqnQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-285-mfpi1OsCPjKSNXMW3mY4Qw-1; Mon, 08 Mar 2021 14:09:02 -0500 X-MC-Unique: mfpi1OsCPjKSNXMW3mY4Qw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E8114801814; Mon, 8 Mar 2021 19:08:59 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-118-152.rdu2.redhat.com [10.10.118.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9B45F19C79; Mon, 8 Mar 2021 19:08:53 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20210308185410.GE7284@fieldses.org> References: <20210308185410.GE7284@fieldses.org> <2653261.1614813611@warthog.procyon.org.uk> <517184.1615194835@warthog.procyon.org.uk> To: "J. Bruce Fields" Cc: dhowells@redhat.com, Amir Goldstein , linux-cachefs@redhat.com, Jeff Layton , David Wysochanski , "Matthew Wilcox (Oracle)" , Christoph Hellwig , Dave Chinner , Alexander Viro , linux-afs@lists.infradead.org, Linux NFS Mailing List , CIFS , ceph-devel , v9fs-developer@lists.sourceforge.net, linux-fsdevel , linux-kernel , Miklos Szeredi Subject: Re: fscache: Redesigning the on-disk cache MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19638.1615230532.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Mon, 08 Mar 2021 19:08:52 +0000 Message-ID: <19639.1615230532@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org J. Bruce Fields wrote: > On Mon, Mar 08, 2021 at 09:13:55AM +0000, David Howells wrote: > > Amir Goldstein wrote: > > > With ->fiemap() you can at least make the distinction between a non = existing > > > and an UNWRITTEN extent. > > = > > I can't use that for XFS, Ext4 or btrfs, I suspect. Christoph and Dav= e's > > assertion is that the cache can't rely on the backing filesystem's met= adata > > because these can arbitrarily insert or remove blocks of zeros to brid= ge or > > split extents. > = > Could you instead make some sort of explicit contract with the > filesystem? Maybe you'd flag it at mkfs time and query for it before > allowing a filesystem to be used for fscache. You don't need every > filesystem to support fscache, right, just one acceptable one? I've asked about that, but the filesystem maintainers are reluctant to do that. Something might be possible in ext4 using direct access to jbd2, though I don't know exactly what facilities that offers. David