[Linux-cachefs] Cachefs + FUSE (Was: [PATCH] [Request for inclusion] Filesystem in Userspace)

Miklos Szeredi miklos at szeredi.hu
Tue Nov 30 16:37:09 UTC 2004


[please CC me, I'm not subscribed to the list]

> Actual data pages in the pagecache are owned by the netfs. The netfs asks
> fscache to load data from a cache into a page the netfs owns. If there wasn't
> a page in the cache, or the netfs wants to update the cache, the netfs asks
> fscache to store the data in the cache.

I understand now. 

> It sounds like I've missed part of this conversation, but you can
> always write to FS-Cache and downcall to userspace simultaneously.

So is this what a normal netfs would do?  Do it's own writeback over
the network together with the cache operation, and throw away the page
when both have finished.  Or is there an alternative strategy?

> I can add an interface to allow userspace to access the caches directly if
> need be; something you'll probably want if you want to be able to sync
> unwritten data stored in the cache during off-line operation.

No, I don't think that getting the data while off-line (unmounted)
isn't necessary.

The question is rather, if cachefs can pin the data, so it won't go
away until the userspace is ready to do the writeback?  If this is
available, then the netfs can relinquish the page even if it can't
write it back immediately, and pull it back from the cache later.

An unrelated question: why doesn't cachefs use the swap as backing?
This would be _much_ easier to use for most people than a separate
partition.

Thanks,
Miklos




More information about the Linux-cachefs mailing list