Re: [LSF/MM TOPIC] Network filesystem cache management system call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



J. Bruce Fields <bfields@xxxxxxxxxxxx> wrote:

> > One of these is the call to manage local caching on a file or volume.
> > This, however, doesn't really need to be limited to AFS, but could also be
> > applicable to NFS, CIFS, etc. - and possibly even to local filesystems.
> 
> Do you have a summary of the AFS interface to give an idea what's
> needed?

I have the pioctls listed here that I need to emulate:

	https://www.infradead.org/~dhowells/kafs/user_interface.html

along with my thoughts on how to do that.

For cache wangling, I was thinking of something like:

	fcachectl(int dirfd,
		  const char *pathname,
		  unsigned atflags,
		  const char *cmd,
		  char *result,
		  size_t *result_len);

The relevant pioctls are:

 (*) VIOCGETCACHEPARMS

     Get the size of the cache.

 (*) VIOCSETCACHESIZE

     Set the cache size.

 (*) VIOCFLUSH

     Invalidate the cached information for an object, both the inode/dentry
     structs and anything in the local cache.

 (*) VIOCFLUSHCB

     Invalidate any callbacks/leases outstanding on an object.  This might
     make more sense to be done via the same mechanism as lease/lock
     management.

 (*) VIOC_FLUSHVOLUME

     Flush all cached state for a volume, both from RAM and local disk cache
     as far as possible.  Files that are open aren't necessarily affected.

 (*) VIOC_FLUSHALL

     FLush all cached state for all volumes.

 (*) VIOCPREFETCH

     Prefetch a file into the cache.

So, maybe:

	fcachectl(AT_FDCWD,
		  "/afs/user/dhowells",
		  0,
		  "flush volume",
		  NULL, NULL);

to flush an AFS volume containing my home directory.

Note that doing this by fcntl() or ioctl() has potential difficulties as it
would have to work on non-file objects such as device files or symlinks.

Other functions that this could be used for are cache pinning and
fixup/integration should we ever want disconnected operation.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux