[Gluster-devel] questions on callstubs and "link-count" in index translator

Ravishankar N ravishankar at redhat.com
Sat Apr 27 06:20:01 UTC 2019


On 26/04/19 10:53 PM, Junsong Li wrote:
>
> Hello list,
>
> I have a couple of questions on index translator implementation.
>
>   * Why does gluster need callstub and a different worker queue (and
>     thread) to process those call stubs? Is it just to lower the
>     priority of fops of internal inodes?
>
As far as I know, this is to move the processing to background and free 
up the server thread to process other requests.
>
>  *
>
>
>   * What’s the purpose of “link-count” in xdata? It’s being used only
>     in index_fstat and index_lookup. I see sometimes the key is
>     assigned 0/1 after callback, and sometimes AFR uses it to store
>     flag GF_XATTROP_INDEX_COUNT. Is the code purposely reusing the key?
>
A non-zero link count means there are entries that are pending heal. AFR 
requests this information in lookup and fstat fops and updates 
priv->need_heal in the fop-callbacks. It then uses that information to 
not nullify the inodes of the entries fetched during a readdirp call, 
improving readdirp performance.

https://review.gluster.org/#/c/glusterfs/+/12507/ is the patch that 
introduced it.

HTH,
Ravi
>
>  *
>
> Thanks,
>
> Junsong
>
>
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel at gluster.org
> https://lists.gluster.org/mailman/listinfo/gluster-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gluster.org/pipermail/gluster-devel/attachments/20190427/1cbc0570/attachment-0001.html>


More information about the Gluster-devel mailing list