On Sat, 07 Nov 2009 23:10:13 +0100, Pavel Filipensky <Pavel.Filipensky at 
sun.com> wrote:

> can I get a code review for: 6897605 Deadlock in nfs4_active_reclaim()
> on r_lock if file and its XATTR are hashed in the same r4hashq_t
>
> Webrev:
>
> http://cr.opensolaris.org/~pavelf/6897605
>
> Background:
>
> If the system is low on memory, in can decide to reclaim memory from
> "rnode4_cache".
> This can lead to a deadlock if the rnode for a file uses extended
> attributes and both
> rnodes (file and its xattr) are hashed in the same r4hashq_t since the
> nfsv4 code will ask for the same r_lock twice.
>
> The fix makes the reclaim less strict but safe - we avoid releasing of
> xattr vnode.

I'm not much comfortable fix this fix. since this cached xattr dir vnode is 
accociated
with the rnode we're going to deactivate - who's going to release the xattr 
vnode
eventually ?

have you considered using VN_RELE_ASYNC(xattr vnode) here instead, which would
issue a taskq thread handling the VN_RELE() for the asynchronously ?

of course since we're in a low memory situation, a taskq may also have 
difficulties
being created, but at least it will eventually and we have this all consistant.

---
frankB

Reply via email to