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@gluster.org
https://lists.gluster.org/mailman/listinfo/gluster-devel
_______________________________________________
Gluster-devel mailing list
Gluster-devel@gluster.org
https://lists.gluster.org/mailman/listinfo/gluster-devel

Reply via email to