A reasonable question. I'm not a FS expert so this may not be
a complete answer, but please consider it a start:
- The FS should be block-device-based (e.g. a ram-based FS
such as tmpfs should not enable cleancache)
- To ensure coherency/correctness, the FS must ensure that all
file removal or truncation operations either go through VFS
or add hooks to do the equivalent "flush" operations (e.g.
I started looking at FS-cache-based net FS's and was concerned
there might be problems, dunno for sure)
- To ensure coherency/correctness, inode numbers must be unique
(e.g. no emulating 64-bit inode space on 32-bit inode numbers)
- The FS must call the VFS superblock alloc and deactivate routines
or add hooks to do the equivalent cleancache calls done there.
- To maximize performance, all pages fetched from the FS should
go through the do_mpage_readpage routine or the FS should add
hooks to do the equivalent (e.g. btrfs requires a hook for this)
- Currently, the FS blocksize must be the same as PAGESIZE. This
is not an architectural restriction, but no backends currently
support anything different (e.g. hugetlbfs? should not enable
cleancache)
- A clustered FS should invoke the "shared_init_fs" cleancache
hook to get best performance for some backends.
Does that help?
Thanks,
Dan
--