>From Malahal <mala...@gmail.com>:

Hello Daniel Gryniewicz,

I'd like you to do a code review. Please visit

    https://review.gerrithub.io/383575

to review the following change.


Change subject: Fix attr and content lock deadlock with readdir and other 
operations
......................................................................

Fix attr and content lock deadlock with readdir and other operations

attr_lock and content_lock of an object are well ordered.  Attr_lock
needs to be acquired first and then the content_lock. Readdir operation
acquires the content_lock on the directory and then attr_lock of a
child is acquired. The exception is for ".." direntry which actually
ends up acquiring attr_lock on its parent which leads to ABBA deadlock.

The fix drops the content_lock on the directory while searching for ".."
direntry. This preserves the order that parent object locks are acquired
before acquiring child locks, there by avoiding the deadlock.

Change-Id: I64a6ac7e8141179bcda2ca15dfab3912f808a74a
Signed-off-by: Daniel Gryniewicz <d...@redhat.com>
Signed-off-by: Malahal Naineni <mala...@us.ibm.com>
[for minor corrections and git message]
---
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_helpers.c
1 file changed, 17 insertions(+), 4 deletions(-)



  git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha 
refs/changes/75/383575/1
-- 
To view, visit https://review.gerrithub.io/383575
To unsubscribe, visit https://review.gerrithub.io/settings

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: I64a6ac7e8141179bcda2ca15dfab3912f808a74a
Gerrit-Change-Number: 383575
Gerrit-PatchSet: 1
Gerrit-Owner: Malahal <mala...@gmail.com>
Gerrit-Reviewer: Daniel Gryniewicz <d...@redhat.com>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel

Reply via email to