<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 4, 2015 at 1:11 PM, Raghavendra Bhat <span dir="ltr">&lt;<a href="mailto:rabhat@redhat.com" target="_blank">rabhat@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 09/04/2015 12:43 PM, Raghavendra Gowdappa wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
All,<br>
<br>
Posix allows access to file through open fds even if name associated with file is deleted. While this works for glusterfs for most of the cases, there are some corner cases where we fail.<br>
<br>
1. Reboot of brick:<br>
===================<br>
<br>
With the reboot of brick, fd is lost. unlink would&#39;ve deleted both gfid and path links to file and we would loose the file. As a solution, perhaps we should create an hardlink to the file (say in .glusterfs) which gets deleted only when last fd is closed?<br>
<br>
2. Graph switch:<br>
=================<br>
<br>
The issue is captured in bz 1259995 [1]. Pasting the content from bz verbatim:<br>
Consider following sequence of operations:<br>
1. fd = open (&quot;/mnt/glusterfs/file&quot;);<br>
2. unlink (&quot;/mnt/glusterfs/file&quot;);<br>
3. Do a graph-switch, lets say by adding a new brick to volume.<br>
4. migration of fd to new graph fails. This is because as part of migration we do a lookup and open. But, lookup fails as file is already deleted and hence migration fails and fd is marked bad.<br>
<br>
In fact this test case is already present in our regression tests, though the test checks whether the fd is just marked as bad. But the expectation of filing this bug is that migration should succeed. This is possible since there is an fd opened on brick through old-graph and hence can be duped using dup syscall.<br>
<br>
Of course the solution outlined here doesn&#39;t cover the case where file is not present on brick at all. For eg., a new brick was added to replica set and that new brick doesn&#39;t contain the file. Now, since the file is deleted, how do replica heals that file to another brick etc.<br>
<br>
But atleast this can be solved for those cases where file was present on a brick and fd was already opened.<br>
</blockquote>
<br></span>
Du,<br>
<br>
For this 2nd example (where the file is opened, unlinked and a graph swatch happens), there was a patch submitted long back.<br>
<br>
<a href="http://review.gluster.org/#/c/5428/" rel="noreferrer" target="_blank">http://review.gluster.org/#/c/5428/</a><br></blockquote><div><br></div><div>Thanks. Will take a look.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Regards,<br>
Raghavendra Bhat<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
3. Open-behind and unlink from a different client:<br>
==================================================<br>
<br>
While open-behind handles unlink from the same client (through which open was performed), if unlink and open are done from two different clients, file is lost. I cannot think of any good solution for this.<br>
<br>
I wanted to know whether these problems are real enough to channel our efforts to fix these issues. Comments are welcome in terms of solutions or other possible scenarios which can lead to this issue.<br>
<br>
[1] <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1259995" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1259995</a><br>
<br>
regards,<br>
Raghavendra.<br>
_______________________________________________<br></span>
Gluster-users mailing list<br>
<a href="mailto:Gluster-users@gluster.org" target="_blank">Gluster-users@gluster.org</a><br>
<a href="http://www.gluster.org/mailman/listinfo/gluster-users" rel="noreferrer" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-users</a><br>
</blockquote><div class="HOEnZb"><div class="h5">
<br>
_______________________________________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
<a href="http://www.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Raghavendra G<br></div>
</div></div>