<div dir="ltr"><div><div>Just by looking at the need, it looked like more of <a href="https://github.com/gluster/glusterfs/issues/236">https://github.com/gluster/glusterfs/issues/236</a><br><br></div>Will the above change in posix itself be better?<br><br></div>-Amar<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 13, 2017 at 12:04 PM, Taehwa Lee <span dir="ltr">&lt;<a href="mailto:alghost.lee@gmail.com" target="_blank">alghost.lee@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>I know that when free capacity for a brick is less than min-free-disk,</div><div>create a link file.</div><div><br></div><div>but, when all subvols’ free capacity are less than min-free-disk,</div><div>just try to search the best subvol and do fops to the subvol.</div><div><br></div><div>I think restriction is needed as option.</div><div><br></div><div><br></div><div>so, i suggest that when all subvols’ free capacity are less than min-free-disk,</div><div>reject fops for create and mknod (using min-free-disk).</div><div><br></div><div><br></div><div>like below codes. (of course, needed to modify the function; dht_free_disk_available_<wbr>subvol)</div><div><br></div><div><div>                avail_subvol = dht_free_disk_available_subvol (this, subvol, local);</div><div><br></div><div>                if (!avail_subvol) {</div><div>                        gf_msg_debug (this-&gt;name, 0,</div><div>                                    &quot;failed to create %s on %s&quot;,</div><div>                                    loc-&gt;path, subvol-&gt;name);</div><div><br></div><div>                        DHT_STACK_UNWIND (mknod, frame, -1, ENOSPC,</div><div>                                        NULL, NULL, NULL, NULL, NULL);</div><div><br></div><div>                        goto out;</div><div>                }</div><div>                else if (avail_subvol != subvol) {</div><div>                        local-&gt;params = dict_ref (params);</div><div>                        local-&gt;rdev = rdev;</div><div>                        local-&gt;mode = mode;</div><div>                        local-&gt;umask = umask;</div><div>                        local-&gt;cached_subvol = avail_subvol;</div><div>                        local-&gt;hashed_subvol = subvol;</div><div><br></div><div>                        gf_msg_debug (this-&gt;name, 0,</div><div>                                      &quot;creating %s on %s (link at %s)&quot;, loc-&gt;path,</div><div>                                      avail_subvol-&gt;name, subvol-&gt;name);</div><div><br></div><div>                        dht_linkfile_create (frame,</div><div>                                             dht_mknod_linkfile_create_<wbr>cbk,</div><div>                                             this, avail_subvol, subvol, loc);</div><div><br></div><div>                        goto out;</div><div>                }</div></div><div><br></div><div><br></div><br><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><span class="m_1635386797103282891Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;border-spacing:0px"><div style="word-wrap:break-word"><span class="m_1635386797103282891Apple-style-span" style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px"><div style="word-wrap:break-word"><span class="m_1635386797103282891Apple-style-span" style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px"><div style="word-wrap:break-word"><span class="m_1635386797103282891Apple-style-span" style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px"><div style="word-wrap:break-word">- 이태화 드림 -</div><div style="word-wrap:break-word"><br></div><div style="word-wrap:break-word">------------------------------<wbr>-----------</div><div style="word-wrap:break-word">이 태 화<span class=""><br>Taehwa Lee<br>Gluesys Co.,Ltd.<br><a href="mailto:alghost.lee@gmail.com" target="_blank">alghost.lee@gmail.com</a><br></span>010-3420-6114, 070-8785-6591</div><div style="word-wrap:break-word">------------------------------<wbr>-----------</div></span></div></span></div></span></div></span></div></div></div>
</div>
<br><div><blockquote type="cite"><div>2017. 7. 13. 오후 3:22, Nithya Balachandran &lt;<a href="mailto:nbalacha@redhat.com" target="_blank">nbalacha@redhat.com</a>&gt; 작성:</div><div><div class="h5"><br class="m_1635386797103282891Apple-interchange-newline"><div><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 13 July 2017 at 11:46, Pranith Kumar Karampuri <span dir="ltr">&lt;<a href="mailto:pkarampu@redhat.com" target="_blank">pkarampu@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"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Thu, Jul 13, 2017 at 10:11 AM, Taehwa Lee <span dir="ltr">&lt;<a href="mailto:alghost.lee@gmail.com" target="_blank">alghost.lee@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Thank you for response quickly</div><div><br></div><div><br></div><div>I went through dht_get_du_info before I start developing this.</div><div><br></div><div>at that time, I think that this functionality should be independent module.</div><div><br></div><div><br></div><div>so, I will move this into DHT without new statfs.</div></div></blockquote><div><br></div></span></div></div></div></blockquote><div><br></div><div>Can you provide the details of your usecase? I ask because we already have dht redirecting creates to other subvols if a particular brick&#39;s usage crosses a certain value.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><div></div></span><div>Let&#39;s here from dht folks also what they think about this change before you make modifications. I included some of the dht folks to the thread.<br></div><div><div class="m_1635386797103282891h5"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>and then, will suggest it on gerrit ! </div><div><br></div><div><br></div><div>Thank you so much.</div><span><br><div>
<div style="word-wrap:break-word"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br>------------------------------<wbr>-----------<br>Taehwa Lee<br>Gluesys Co.,Ltd.<br><a href="mailto:alghost.lee@gmail.com" target="_blank">alghost.lee@gmail.com</a><br>+82-10-3420-6114, +82-70-8785-6591<br>------------------------------<wbr>-----------</div></div>
</div>

<br></span><div><blockquote type="cite"><div>2017. 7. 13. 오후 1:06, Pranith Kumar Karampuri &lt;<a href="mailto:pkarampu@redhat.com" target="_blank">pkarampu@redhat.com</a>&gt; 작성:</div><div><div class="m_1635386797103282891m_8036603510263190773h5"><br class="m_1635386797103282891m_8036603510263190773m_746561717897587908Apple-interchange-newline"><div><div dir="ltr"><div><div>hey,<br></div>      I went through the patch. I see that statfs is always wound for create fop. So number of network operations increase and performance will be less even in normal case. I think similar functionality is in DHT, may be you should take a look at that?<br><br></div>Check dht_get_du_info() which is used by dht_mknod(). It keeps refreshing this info every X seconds. I will let DHT guys comment a bit more about this. One more thing to check is if we can have just one implementation that satisfied everyone&#39;s requirements. i.e. move out this functionality from DHT to this xlator or, move the functionality of this xlator into DHT.<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 13, 2017 at 8:18 AM, Taehwa Lee <span dir="ltr">&lt;<a href="mailto:alghost.lee@gmail.com" target="_blank">alghost.lee@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hi all, </div><div><br></div><div>I’ve been developing a xlator that create is rejected when used capacity of a volume higher than threshold.</div><div><br></div><div><br></div><div>the reason why I’m doing is that I got problems when LV is used fully.</div><div><br></div><div>this patch is in the middle of develop.</div><div><br></div><div>just I want to know whether my approach is pretty correct to satisfy my requirement.</div><div><br></div><div>so, when you guys have a little spare time, please review my patch and tell me WHATEVER you’re thinking.</div><div><br></div><div><br></div><div>and If you guys think that it is useful for glusterfs, I’m gonna do process to merge into glusterfs.</div><div><br></div><div><br></div><div>thanks in advance</div><div><br></div><div><br></div></div><br><div style="word-wrap:break-word"><br><div>
<div style="word-wrap:break-word"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br>------------------------------<wbr>-----------<br>Taehwa Lee<br>Gluesys Co.,Ltd.<br><a href="mailto:alghost.lee@gmail.com" target="_blank">alghost.lee@gmail.com</a><br>+82-10-3420-6114, +82-70-8785-6591<br>------------------------------<wbr>-----------</div></div>
</div>


<br></div><br>______________________________<wbr>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
<a href="http://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://lists.gluster.org/mailm<wbr>an/listinfo/gluster-devel</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="m_1635386797103282891m_8036603510263190773m_746561717897587908gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Pranith<br></div></div>
</div>
</div></div></div></blockquote></div><br></div></blockquote></div></div></div><span class="m_1635386797103282891HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_1635386797103282891m_8036603510263190773gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Pranith<br></div></div>
</font></span></div></div>
</blockquote></div><br></div></div>
</div></div></div></blockquote></div><br></div><br>______________________________<wbr>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
<a href="http://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://lists.gluster.org/<wbr>mailman/listinfo/gluster-devel</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Amar Tumballi (amarts)<br></div></div></div></div></div>
</div>