<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I know that when free capacity for a brick is less than min-free-disk,</div><div class="">create a link file.</div><div class=""><br class=""></div><div class="">but, when all subvols’ free capacity are less than min-free-disk,</div><div class="">just try to search the best subvol and do fops to the subvol.</div><div class=""><br class=""></div><div class="">I think restriction is needed as option.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">so, i suggest that when all subvols’ free capacity are less than min-free-disk,</div><div class="">reject fops for create and mknod (using min-free-disk).</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">like below codes. (of course, needed to modify the function; dht_free_disk_available_subvol)</div><div class=""><br class=""></div><div class=""><div class=""> avail_subvol = dht_free_disk_available_subvol (this, subvol, local);</div><div class=""><br class=""></div><div class=""> if (!avail_subvol) {</div><div class=""> gf_msg_debug (this->name, 0,</div><div class=""> "failed to create %s on %s",</div><div class=""> loc->path, subvol->name);</div><div class=""><br class=""></div><div class=""> DHT_STACK_UNWIND (mknod, frame, -1, ENOSPC,</div><div class=""> NULL, NULL, NULL, NULL, NULL);</div><div class=""><br class=""></div><div class=""> goto out;</div><div class=""> }</div><div class=""> else if (avail_subvol != subvol) {</div><div class=""> local->params = dict_ref (params);</div><div class=""> local->rdev = rdev;</div><div class=""> local->mode = mode;</div><div class=""> local->umask = umask;</div><div class=""> local->cached_subvol = avail_subvol;</div><div class=""> local->hashed_subvol = subvol;</div><div class=""><br class=""></div><div class=""> gf_msg_debug (this->name, 0,</div><div class=""> "creating %s on %s (link at %s)", loc->path,</div><div class=""> avail_subvol->name, subvol->name);</div><div class=""><br class=""></div><div class=""> dht_linkfile_create (frame,</div><div class=""> dht_mknod_linkfile_create_cbk,</div><div class=""> this, avail_subvol, subvol, loc);</div><div class=""><br class=""></div><div class=""> goto out;</div><div class=""> }</div></div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-position: 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; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; font-variant-ligatures: normal; font-variant-position: 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; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-position: 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; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-position: 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; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-position: 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; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">- 이태화 드림 -</div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">-----------------------------------------</div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">이 태 화<br class="">Taehwa Lee<br class="">Gluesys Co.,Ltd.<br class=""><a href="mailto:alghost.lee@gmail.com" class="">alghost.lee@gmail.com</a><br class="">010-3420-6114, 070-8785-6591</div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">-----------------------------------------</div></span></div></span></div></span></div></span></div></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">2017. 7. 13. 오후 3:22, Nithya Balachandran <<a href="mailto:nbalacha@redhat.com" class="">nbalacha@redhat.com</a>> 작성:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On 13 July 2017 at 11:46, Pranith Kumar Karampuri <span dir="ltr" class=""><<a href="mailto:pkarampu@redhat.com" target="_blank" class="">pkarampu@redhat.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote"><span class="">On Thu, Jul 13, 2017 at 10:11 AM, Taehwa Lee <span dir="ltr" class=""><<a href="mailto:alghost.lee@gmail.com" target="_blank" class="">alghost.lee@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class="">Thank you for response quickly</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I went through dht_get_du_info before I start developing this.</div><div class=""><br class=""></div><div class="">at that time, I think that this functionality should be independent module.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">so, I will move this into DHT without new statfs.</div></div></blockquote><div class=""><br class=""></div></span></div></div></div></blockquote><div class=""><br class=""></div><div class="">Can you provide the details of your usecase? I ask because we already have dht redirecting creates to other subvols if a particular brick's usage crosses a certain value.</div><div class=""><br class=""></div><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><span class=""><div class=""></div></span><div class="">Let'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 class=""></div><div class=""><div class="h5"><div class=""> </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" class=""><div class=""><br class=""></div><div class="">and then, will suggest it on gerrit ! </div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Thank you so much.</div><span class=""><br class=""><div class="">
<div style="word-wrap:break-word" class=""><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;" class=""><br class="">------------------------------<wbr class="">-----------<br class="">Taehwa Lee<br class="">Gluesys Co.,Ltd.<br class=""><a href="mailto:alghost.lee@gmail.com" target="_blank" class="">alghost.lee@gmail.com</a><br class="">+82-10-3420-6114, +82-70-8785-6591<br class="">------------------------------<wbr class="">-----------</div></div>
</div>
<br class=""></span><div class=""><blockquote type="cite" class=""><div class="">2017. 7. 13. 오후 1:06, Pranith Kumar Karampuri <<a href="mailto:pkarampu@redhat.com" target="_blank" class="">pkarampu@redhat.com</a>> 작성:</div><div class=""><div class="m_8036603510263190773h5"><br class="m_8036603510263190773m_746561717897587908Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class="">hey,<br class=""></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 class=""><br class=""></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's requirements. i.e. move out this functionality from DHT to this xlator or, move the functionality of this xlator into DHT.<br class=""><br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Jul 13, 2017 at 8:18 AM, Taehwa Lee <span dir="ltr" class=""><<a href="mailto:alghost.lee@gmail.com" target="_blank" class="">alghost.lee@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class="">Hi all, </div><div class=""><br class=""></div><div class="">I’ve been developing a xlator that create is rejected when used capacity of a volume higher than threshold.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">the reason why I’m doing is that I got problems when LV is used fully.</div><div class=""><br class=""></div><div class="">this patch is in the middle of develop.</div><div class=""><br class=""></div><div class="">just I want to know whether my approach is pretty correct to satisfy my requirement.</div><div class=""><br class=""></div><div class="">so, when you guys have a little spare time, please review my patch and tell me WHATEVER you’re thinking.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">and If you guys think that it is useful for glusterfs, I’m gonna do process to merge into glusterfs.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">thanks in advance</div><div class=""><br class=""></div><div class=""><br class=""></div></div><br class=""><div style="word-wrap:break-word" class=""><br class=""><div class="">
<div style="word-wrap:break-word" class=""><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" class=""><br class="">------------------------------<wbr class="">-----------<br class="">Taehwa Lee<br class="">Gluesys Co.,Ltd.<br class=""><a href="mailto:alghost.lee@gmail.com" target="_blank" class="">alghost.lee@gmail.com</a><br class="">+82-10-3420-6114, +82-70-8785-6591<br class="">------------------------------<wbr class="">-----------</div></div>
</div>
<br class=""></div><br class="">______________________________<wbr class="">_________________<br class="">
Gluster-devel mailing list<br class="">
<a href="mailto:Gluster-devel@gluster.org" target="_blank" class="">Gluster-devel@gluster.org</a><br class="">
<a href="http://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank" class="">http://lists.gluster.org/mailm<wbr class="">an/listinfo/gluster-devel</a><br class=""></blockquote></div><br class=""><br clear="all" class=""><br class="">-- <br class=""><div class="m_8036603510263190773m_746561717897587908gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class="">Pranith<br class=""></div></div>
</div>
</div></div></div></blockquote></div><br class=""></div></blockquote></div></div></div><span class="HOEnZb"><font color="#888888" class=""><br class=""><br clear="all" class=""><br class="">-- <br class=""><div class="m_8036603510263190773gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class="">Pranith<br class=""></div></div>
</font></span></div></div>
</blockquote></div><br class=""></div></div>
</div></blockquote></div><br class=""></body></html>