[OpenAFS-devel] Linux cache manager throwing away callbacks
Chas Williams (CONTRACTOR)
chas@cmf.nrl.navy.mil
Mon, 19 Jan 2009 11:47:20 -0500
In message <1B1DC52E-3763-44B8-B050-0729B6916E94@inf.ed.ac.uk>,Simon Wilkinson
writes:
>> checking CUnlinked doesnt prevent that. this code in .dentry_iput has
>> been around quite a while i think.
>
>So, this is the behaviour I'm seeing... dentry_iput gets called when
>the dentry count reaches 0, regardless of what the inode count is
>doing. So, the kernel can end up dereferencing the dentry by calling
>dentry_iput whilst the cache manager is still holding references on
>the inode.
the problem would be that the cache manager takes a reference to the
inode to keep it from returning to the kernel. this keeps you from
using any of the iput() hooks, like .delete_inode or .drop_inode.
.put_inode (which was called for each iput() disappeared at some
point).
the right fix seems like it wont be simple.
>This is hurting me in disconnected mode, but I also wonder if there
>are potential locations where invalidating the segments may break
>things when running normally, in particular where we are using
>background stores against a slow file server.
not sure. disconnected is new and i never tested background writes.