From: John M. <jo...@jm...> - 2010-06-29 14:56:18
|
Stef Bon <ste...@pu...> writes: > As fas as I understand the kernel VFS sends a forget signal, to forget > a number of lookups. The VFS-fuse will lookup() based on a parent inode and a file name, resulting in an inode with a lookup count incremented by 1. The lookup count is also set to 1 for creation of a file. It is possible that you will receive multiple lookup requests, in which case you are to increase your lookup counter. While the inode is looked-up, the file-system should keep a record in it's cache because it can expect operations on that inode directly. The kernel may forget inodes under three circumstances: 1. The inode is deleted and it is not open. 2. Pressure on the cache causes the kernel to free some cached information including that for the inode. 3. The file-system is unmounted (similar to 2, but freeing everything about the file-system) - although perhaps the default fuse implementation here is to suppress forget operations in this case (in the multi-threaded fuse loop function). Essentially you should be keeping track of the inode while you have a lookup count that is larger than 0 so that you can do operations on it instantly without having to lookup the inode yourself. Regards, John. |