<html><head></head><body>Looks good! <br><br><div class="gmail_quote">On January 30, 2015 4:58:35 AM PST, Jeff Darcy &lt;jdarcy@redhat.com&gt; wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> Pranith and I had a discussion regarding this issue and here is what we have<br /> in our mind right now.<br /> <br /> We plan to provide the user commands to execute from mount so that he can<br /> access the files in split-brain. This way he can choose which copy is to be<br /> used as source. The user will have to perform a set of getfattrs and<br /> setfattrs (on virtual xattrs) to decide which child to choose as source and<br /> inform AFR with his decision.<br /> <br /> A) To know the split-brain status :<br /> getfattr -n trusted.afr.split-brain-status &lt;path-to-file&gt;<br /> <br /> This will provide user with the following details -<br /> 1) Whether the file is in metadata split-brain<br /> 2) Whether the file is in data split-brain<br /> <br /> It will also list the name of afr-children to choose from. Something like :<br /> Option0:
client-0<br /> Option1: client-1<br /> <br /> We also tell the user what the user could do to view metadata/data info; like<br /> stat to get metadata etc.<br /> <br /> B) Now the user has to choose one of the options (client-x/client-y..) to<br /> inspect the files.<br /> e.g., setfattr -n trusted.afr.split-brain-choice -v client-0 &lt;path-to-file&gt;<br /> We save the read-child info in inode-ctx in order to provide the user access<br /> to the file in split-brain from that child. Once the user inspects the file,<br /> he proceeds to do the same from the other child of replica pair and makes an<br /> informed decision.<br /> <br /> C) Once the above steps are done, AFR is to be informed with the final choice<br /> for source. This is achieved by -<br /> (say the fresh copy is in client-0)<br /> e.g., setfattr -n trusted.afr.split-brain-heal-finalize -v client-0<br /> &lt;path-to-file&gt;<br /> This child will be chosen as source and split-brain resolution will be done.<br
/></blockquote><br />+1<br /><br />That looks quite nice, and AFAICT shouldn't be prohibitively hard to<br />implement.<br /><br /><br /></pre></blockquote></div><br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>