<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi all,<br>
<br>
On 10/19/2016 01:19 PM, Eric Ren wrote:
</div>
<blockquote
cite="mid:1476854382-28101-1-git-send-email-zren@suse.com"
type="cite">
<pre wrap="">ocfs2_permission() and ocfs2_iop_get/set_acl() both call ocfs2_inode_lock().
The problem is that the call chain of ocfs2_permission() includes *_acl().
Possibly, there are three solutions I can think of. The first one is to
implement the inode permission routine for ocfs2 itself, replacing the
existing generic_permission(); this will bring lots of changes and
involve too many trivial vfs functions into ocfs2 code. Frown on this.
The second one is, what I am trying now, to keep track of the processes who
lock/unlock a cluster lock by the following draft patches. But, I quickly
find out that a cluster locking which has been taken by processA can be unlocked
by processB. For example, systemfiles like journal:0000 is locked during mout, and
unlocked during umount.</pre>
</blockquote>
We can avoid the problem above by:<br>
<br>
1) not keeping track of system file inode:<br>
<br>
if (!(OCFS2_I(inode)->ip_flags & OCFS2_INODE_SYSTEM_FILE))
{<br>
....<br>
}<br>
<br>
2) only keeping track of inode metadata lockres:<br>
<br>
OCFS2_I(inode)->ip_inode_lockres;<br>
<br>
because inode open lockres can also be get/release by different
processes.<br>
<br>
Eric<br>
<blockquote
cite="mid:1476854382-28101-1-git-send-email-zren@suse.com"
type="cite">
<pre wrap="">
The thrid one is to revert that problematic commit! It looks like get/set_acl()
are always been called by other vfs callback like ocfs2_permission(). I think
we can do this if it's true, right? Anyway, I'll try to work out if it's true;-)
Hope for your input to solve this problem;-)
Thanks,
Eric
_______________________________________________
Ocfs2-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Ocfs2-devel@oss.oracle.com">Ocfs2-devel@oss.oracle.com</a>
<a class="moz-txt-link-freetext" href="https://oss.oracle.com/mailman/listinfo/ocfs2-devel">https://oss.oracle.com/mailman/listinfo/ocfs2-devel</a>
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>