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

List:       fuse-devel
Subject:    Re: [fuse-devel] Manual Dropping of FS Buffers
From:       Miklos Szeredi <miklos () szeredi ! hu>
Date:       2011-06-01 13:56:07
Message-ID: 87lixlirk8.fsf () tucsk ! pomaz ! szeredi ! hu
[Download RAW message or body]

Christian Thaeter <ct@pipapo.org> writes:

> Am Tue, 31 May 2011 22:16:14 +0200
> schrieb Jakob Blomer <jakob.blomer@cern.ch>:
>
>> Is there a way to manually drop all file system buffers connected to
>> the Fuse module's file system?  I know I can
>> use /proc/sys/vm/drop_caches, but that drops all caches from all file
>> systems.  The fadvise system call would be for the page cache of a
>> specific file.  If there is an option to temporarily disable the
>> dentry/inode cache from inside the Fuse module, I could turn off
>> caching and "drain out" the file system and only then apply the new
>> file system snapshot.  Of course I can also just sleep in the Fuse
>> module until the caches are expired for sure, but I'd really like to
>> do something better.  Is there something in libfuse that could solve
>> the problem?

On the low-level interface there's fuse_lowlevel_notify_inval_inode()
which may be used to drop the caches for a single inode.  If the
filesystem keeps track of which inode may have caches then it can
iterate through those and call this function.

> for normal filesystems you can remount without any new options 'mount -o
> remount /mountpoint' this might work in your case too.

"mount -oremount" will drop unused dentries together with the caches.
But this is only a side effect and not guaranteed to work.

>  I also barely remember that recent kernels (.38 or .39) got some
> syscall for syncing a filesystem, I have no idea if that can be used
> to drop caches selectively, take this just as hint, maybe you find
> some infos about that.

The new syncfs() syscall can only sync the filesystem, it cannot be used
to drop the caches.

Thanks,
Miklos

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
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