2021-03-08 18:56:02

by J. Bruce Fields

[permalink] [raw]
Subject: Re: fscache: Redesigning the on-disk cache

On Mon, Mar 08, 2021 at 09:13:55AM +0000, David Howells wrote:
> Amir Goldstein <[email protected]> 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 Dave's
> assertion is that the cache can't rely on the backing filesystem's metadata
> because these can arbitrarily insert or remove blocks of zeros to bridge 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?

--b.