[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Reclaiming vnodes
On Tue, Sep 15, 2009 at 12:54:00AM +0200, Adam Hamsik wrote:
> In zfs there is a problem with calling getnewvnode form zfs_zget, in
> some cases getnewvnode pick vnode from a free list and call
> VOP_RECLAIM. This can lead to deadlock because VOP_RECLAIM can try to
> lock same mutex as was hold by zfs_zget. This can't be easily fixed if
> we do not want to touch and change whole zfs locking protocol.
You still have a potential deadlock - or at least a failure if
getnewvnode() cannot actually return a new vnode because none are
free at the exact moment of the allocate request.
You can't sleep awaiting vnodes because that will deadlock against
the reclaim thread, so a system that is cycling vnodes very quickly
will fail during the allocate.
I suspect the only real answer is to get a new vnode while the code
can still sleep - and free it as unused if it wasn't actually wanted.
David Laight: david%l8s.co.uk@localhost
Main Index |
Thread Index |