[OpenAFS-devel] Linux cache manager throwing away callbacks

Chas Williams (CONTRACTOR) chas@cmf.nrl.navy.mil
Mon, 19 Jan 2009 08:42:02 -0500


In message <85CEAA68-194D-48A0-8289-E21F5FD3C521@inf.ed.ac.uk>,Simon Wilkinson 
writes:
>Yes, the patch removes put_inode completely. But it also makes  
>denty_iput call afs_InactiveVCache unconditionally (previously, it  
>only called it when CUnlinked was set).

afs_InactiveVCache() already has a conditional check for CUnlinked so
i didnt think it was helpful to check twice.

>My question is whether doing so just because the kernel has reduced  
>the reference count on the dentry is correct?

.dentry_iput() is only called when the refcount on the kernel inode
drops to 1.  atleast it did the last time i checked.  only .put_inode
was called for every decrement in the kernel inode refcount.

>> i dont think afs_InactiveVCache() specifically clears any callbacks.
>> however, it probably does make the vnode ready for recycling.
>
>afs_InactiveVCache calls afs_InvalidateAllSegments if CDirty is set,  
>afs_InvalidateAllSegments clears the callback, as well as deleting any  
>data that hasn't yet been sent to the fileserver.

if .dentry_iput is called, the inode is going inactive.  however, it
might be a bit soon to start throwing away data.  are you loosing
data?