Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src
On Feb 27, 2014, at 7:01 PM, Mindaugas Rasiukevicius
<rmind%netbsd.org@localhost> wrote:
> "J. Hannken-Illjes" <hannken%eis.cs.tu-bs.de@localhost> wrote:
>>> I have not had time to follow your VFS changes, but can you explain why
>>> did you remove VOP_LOCK/VOP_UNLOCK in tmpfs_reclaim()? It was added to
>>> prevent from the racy access of tn_links.
>>
>> Hopefully a vnode lock is needed to access tn_links -- otherwise the
>> VOP_LOCK/UNLOCK in tmpfs_reclaim() didn't protect it ...
>
> Yes, tn_links is modified with the vnode lock held. Unlocked access in
> VOP_RECLAIM() racing with the release of the last last reference, used to
> cause crashes due to premature reclamation attempts. Given that VOP_LOCK()
> acquires the vnode node, can you explain why this "didn't protect it"?
As stated above I hoped tn_links is modified only with the lock held.
>> As this commit prevents other threads from obtaining a lock while
>> VOP_RECLAIM() is running the protection should be the same as before.
>
> You mean VOP_RECLAIM() is now called with the vnode lock held? Can you
> please add an assert in tmpfs_reclaim() which demonstrates that?
No -- while VOP_RECLAIM() is called no thread may get the lock which is
the same as if it were held here.
--
J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig
(Germany)
Home |
Main Index |
Thread Index |
Old Index