<div dir="ltr">Thank you very much<div>I had test this before. I want all the client can see this counter and can update that, so I add an attribute for directory.</div><div>setxattr for directory was very <span style="font-size:12.8px">in-efficient (I saw a lot of lookup request to server because of setxattr) for every create file when our workload generate a lot of file. </span></div><div><span style="font-size:12.8px">So which one is better in your opinion?</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 2, 2017 at 5:06 PM, Amar Tumballi <span dir="ltr"><<a href="mailto:atumball@redhat.com" target="_blank">atumball@redhat.com</a>></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"><div><div class="h5">On Tue, May 2, 2017 at 5:30 PM, Tahereh Fattahi <span dir="ltr"><<a href="mailto:t28.fattahi@gmail.com" target="_blank">t28.fattahi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi<div><br><div>I want to use a file as a counter when I create a file in dht xlator.</div><div>I mean, after creating a new file, I want open a file in the same directory with a special name, read that, update the counter and write back. </div><div>I think for this purpose I should open in dht_create_cbk, read in dht_open_cbk and write in dht_readv_cbk.</div><div>I think I should use dht_open , dht_readv and dht_writev. Maybe I could create inputs for these function expect frame! is it correct to use the frame fro dht_create function?</div><div><br></div><div>Is this scenario correct or there is better way?</div></div></div>
<br></blockquote></div></div><div>This is correct. But very in-efficient (for so many different fops for one fop from user). See if you can keep another extended attribute itself which you can update. That way, you can just handle the counter management using 'xattrop' or `setxattr()' fops<br></div><div> <br></div><div>Regards,<br></div><div>Amar<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">______________________________<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><span class="HOEnZb"><font color="#888888"><br></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_-5696652079060576986gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Amar Tumballi (amarts)<br></div></div></div></div></div>
</font></span></div></div>
</blockquote></div><br></div>