[OpenAFS-devel] possible solution for iput issue... (also transarc #60276)

Chas Williams chas@cmf.nrl.navy.mil
Mon, 16 Apr 2001 13:26:13 -0400


In message <F349BC4F5799D411ACE100D0B706B3BB34280D@umr-mail03.cc.umr.edu>,"Neul
inger, Nathan" writes:
>    VN_RELE(avc);

VN_RELE() is actually osi_iput() which should be doing the right thing
as far as locking (hopefully).

>VN_RELE(avc) or VN_RELE(vcp)? I think avc is correct, since afs-lookup is
>setting *avcp = tvc after the GetVCache calls.

probably avc, since you must be seeing the case vcp != avc, where avc will
need released.  it also looks like this routine is missing a crfree() as
well.  check_bad_parent() is one of those routines that probably hasnt
been well tested.

>I understand the basic purpose of check_bad_parent, but could someone give
>me a idea of a sequence of steps that I can use to reproduce the symptom
>that would NEED check_bad_parent, so this stuff can be tested on something
>other than my main server, and so transarc can reproduce it as well?

from the comments:

 * check_bad_parent() : Checks if this dentry's vcache is a root vcache
 * that has its mvid (parent dir's fid) pointer set to the wrong directory
 * due to being mounted in multiple points at once. If so, check_bad_parent()
 * calls afs_lookup() to correct the vcache's mvid, as well as the volume's
 * dotdotfid and mtpoint fid members.

so you would need to have a volume with multiple mount points.  
check_bad_parent() is called when the revalidate routines think they have
spotted mount point and might need to fix it.