[Gluster-devel] IMP: GlusterD uses liburcu lists from now on.

Kaushal M kshlmster at gmail.com
Wed Mar 4 07:50:43 UTC 2015


Review http://review.gluster.org/9624 just got merged. This is the first
actual code change to be using liburcu within GlusterD.

This change replaces the usage of libglusterfs list data structures and
APIs, with the data structures and APIs provided by liburcu. The
replacement is mostly a case of prefixing the libglusterfs list data
structure and API names.

We chose to do a complete replacement within GlusterD to prevent confusion
to developers. We could have just used the liburcu lists just for the lists
we wanted to protect with RCU, but it would require more effort from
developers to decide on which list API to use for a given list.

The liburcu APIs and data structures have a `cds_` prefix, and are other
otherwise the same as libglusterfs counterparts. For eg.
list_head -> cds_list_head
INIT_LIST_HEAD -> CDS_INIT_LIST_HEAD
list_for_each -> cds_list_for_each
list_entry -> cds_list_entry
etc.

The above change just lays a base for the introduction of the actual RCU
protection changes, which will be following soon (beginning with protection
for peerinfos).

Thanks.

~kaushal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gluster.org/pipermail/gluster-devel/attachments/20150304/c0466738/attachment.html>


More information about the Gluster-devel mailing list