| To: | linux-xfs@xxxxxxxxxxx |
|---|---|
| Subject: | a deadlock problem |
| From: | tom <twang@xxxxxxxxxxxxxxxxxxxx> |
| Date: | Fri, 06 Sep 2002 17:13:59 -0700 |
| Sender: | linux-xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1a+) Gecko/20020626 |
Hi XFS developers,When studying xfs code(2.4.19), I found that the inode will be locked by XFS_ILOCK_SHARE flags before we get acl, which may cause deadlock. Because when getting acl, it will allocate memory in KM_SLEEP, If the memory is tight, the process will call xfs_strategy, and may lock(XFS_ILOCK_SHARE)the same inode again. If between these two locks, another process try to lock the inode by XFS_ILOCK_EXCL, these two processes will be deadlock. As follows,
A process get ea B process want lock ipA
1) xfs_ilock(ipA, XFS_ILOCK_SHARE) .....................
| |
| |
get acl 2) xfs_ilock(ipA, XFS_ILOCK_EXCL)
| |
| |
memory tight
|
|
xfs_stragegy
|
|
3)xfs_ilock(ipA, XFS_ILOCK_SHARE) ............................
these two processes will be dead lock.
So I believe that acl allocation GFP_MASKshould be changed to KM_NOFS.
right?
best regards
wdd
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: update summary page, Seth Mos |
|---|---|
| Next by Date: | XFS patch for kernel 2.4.20-pre5., Paul Blazejowski |
| Previous by Thread: | TAKE - attr/acl, Nathan Scott |
| Next by Thread: | XFS patch for kernel 2.4.20-pre5., Paul Blazejowski |
| Indexes: | [Date] [Thread] [Top] [All Lists] |