On Mon, 1 May 2000, Steve Dodd wrote:

> On Mon, May 01, 2000 at 01:41:43AM +0400, Roman V. Shaposhnick wrote:
> > On Sun, Apr 30, 2000 at 03:28:18PM +0100, Steve Dodd wrote:
> 
> > > But an address_space is (or could be) a completely generic cache. It might
> > > never be associated with an inode, let alone a dentry or file structure.
> > 
> >   Ok, ok, hold on, it is filemap.c where all this stuff is defined, I guess
> > the name gives a hint about that it definitely is associated with some kind 
> > of file machinery. But I understand what you mean. See my comments below.
> 
> OK, more precisely, an address_space could (and IMO *should*) be a generic
> /page/ cache. Anything that's caching multiple pages of data indexed by an
> offset could use it. Then the page cache can sync pages, steal pages, etc.,
> etc., without having to know what the pages are being used for. At the moment,
> it's only used for inode data pages, but with some small changes it can be
> much more useful - and I believe this was Al's original intention.

It was and it still is. However, completely losing the damn struct file
may be tricky.

Theory: different clients may want to share the cache for remote file.
They use some authentication to sign the RPC requests. I.e. you need to
have some token passed to the methods. struct file * is bogus here - it's
void * and it should be ignored by almost every address_space.

generic_write_file() has every reason to expect that a-s it deals with
accepts file as a token (if it needs the thing at all), but that's
generic_file_write(). mm/filemap.c contains a lot of stuff that is
completely generic _and_ some file-related pieces. Yes, it needs further
cleanups and separation.

> > > For example, I've got some experimental NTFS code which caches all metadata
> > > in the page cache using the address_space stuff.
> [..]
> 
> >   IMHO, you are going wrong direction here. My point is that sometimes  
> > we would like to see address_space stuff as generic cache but it is not.
> 
> I disagree; at the moment the interface is not generic, but my belief is
> that it can be made so with only small changes to existing code. However,
> I haven't looked at all existing code yet. NFS is doing something odd, and I
> also should look at your code if that's possible (is it available somewhere?)

RPC signing...

Reply via email to