[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fuse-devel
Subject:    Re: [fuse-devel] dentry caching
From:       Miklos Szeredi <miklos () szeredi ! hu>
Date:       2007-04-20 19:23:14
Message-ID: E1HeyhO-0001EC-00 () dorka ! pomaz ! szeredi ! hu
[Download RAW message or body]

> > Yeah, if I actually think about it, all a 'find' does is read
> > directories.  And directory _contents_ are not cached by the kernel at
> > the moment, only file data and metatadata.
> > 
> > There's no strong reason, why directory contents couldn't be cached,
> > but since the VFS doesn't do it, it's a bit more work to add it to the
> > fuse kernel module.
> > 
> > I'll add it to the todo, and in the mean time suggest that if reading
> > a directory is very solw in your filesystem, that you add caching to
> > the userspace filesystem itself.  You can look at sshfs/cache.c for an
> > example.
> 
> That makes sense. But then, what does 'entry_timeout' control?

It controls the time until a looked up directory entry is valid.  When
this expires the kernel will issue a new LOOKUP request for the entry.

On the high level interface, this just means, that the existence of
the file/directory is checked and some sanity checking is made on the
attributes (the file type hasn't chaged, etc.)

> Are the entry, attr, and file data caches in the fuse kernel module, or
> in the fuse library?

They are in the kernel in the VFS, which is code shared by all
filesystems.  So neither of these caches are fuse kernel module
specific.

> And somewhat related, what is the purpose of the two auto cache parameters?

The "auto_cache" is similar to "kernel_cache" but instead of always
leaving cached file data alone, it flushes the cache only if the file
modification time changed.  The ac_attr_timeout is the timeout after
which the attributes are refreshed for the purpuse of checking the
modification time.

Miklos

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
fuse-devel mailing list
fuse-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuse-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic