<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/cli/src, branch v6.9</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>event: rename event_XXX with gf_ prefixed</title>
<updated>2019-08-28T08:34:45+00:00</updated>
<author>
<name>Xiubo Li</name>
<email>xiubli@redhat.com</email>
</author>
<published>2019-07-26T04:34:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=f7d1fa51cf7308a6d68ed9fa1e8cc4a7c66ad121'/>
<id>f7d1fa51cf7308a6d68ed9fa1e8cc4a7c66ad121</id>
<content type='text'>
I hit one crash issue when using the libgfapi.

In the libgfapi it will call glfs_poller() --&gt; event_dispatch()
in file api/src/glfs.c:721, and the event_dispatch() is defined
by libgluster locally, the problem is the name of event_dispatch()
is the extremly the same with the one from libevent package form
the OS.

For example, if a executable program Foo, which will also use and
link the libevent and the libgfapi at the same time, I can hit the
crash, like:

kernel: glfs_glfspoll[68486]: segfault at 1c0 ip 00007fef006fd2b8 sp
00007feeeaffce30 error 4 in libevent-2.0.so.5.1.9[7fef006ed000+46000]

The link for Foo is:
lib_foo_LADD = -levent $(GFAPI_LIBS)
It will crash.

This is because the glfs_poller() is calling the event_dispatch() from
the libevent, not the libglsuter.

The gfapi link info :
GFAPI_LIBS = -lacl -lgfapi -lglusterfs -lgfrpc -lgfxdr -luuid

If I link Foo like:
lib_foo_LADD = $(GFAPI_LIBS) -levent
It will works well without any problem.

And if Foo call one private lib, such as handler_glfs.so, and the
handler_glfs.so will link the GFAPI_LIBS directly, while the Foo won't
and it will dlopen(handler_glfs.so), then the crash will be hit everytime.

The link info will be:
foo_LADD = -levent
libhandler_glfs_LIBADD = $(GFAPI_LIBS)

I can avoid the crash temporarily by linking the GFAPI_LIBS in Foo too like:
foo_LADD = $(GFAPI_LIBS) -levent
libhandler_glfs_LIBADD = $(GFAPI_LIBS)

But this is ugly since the Foo won't use any APIs from the GFAPI_LIBS.

And in some cases when the --as-needed link option is added(on many dists
it is added as default), then the crash is back again, the above workaround
won't work.

Backport of:
&gt; https://review.gluster.org/#/c/glusterfs/+/23110/
&gt; Change-Id: I38f0200b941bd1cff4bf3066fca2fc1f9a5263aa
&gt; Fixes: #699
&gt; Signed-off-by: Xiubo Li &lt;xiubli@redhat.com&gt;

Change-Id: I38f0200b941bd1cff4bf3066fca2fc1f9a5263aa
updates: bz#1740525
Signed-off-by: Xiubo Li &lt;xiubli@redhat.com&gt;
(cherry picked from commit 799edc73c3d4f694c365c6a7c27c9ab8eed5f260)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I hit one crash issue when using the libgfapi.

In the libgfapi it will call glfs_poller() --&gt; event_dispatch()
in file api/src/glfs.c:721, and the event_dispatch() is defined
by libgluster locally, the problem is the name of event_dispatch()
is the extremly the same with the one from libevent package form
the OS.

For example, if a executable program Foo, which will also use and
link the libevent and the libgfapi at the same time, I can hit the
crash, like:

kernel: glfs_glfspoll[68486]: segfault at 1c0 ip 00007fef006fd2b8 sp
00007feeeaffce30 error 4 in libevent-2.0.so.5.1.9[7fef006ed000+46000]

The link for Foo is:
lib_foo_LADD = -levent $(GFAPI_LIBS)
It will crash.

This is because the glfs_poller() is calling the event_dispatch() from
the libevent, not the libglsuter.

The gfapi link info :
GFAPI_LIBS = -lacl -lgfapi -lglusterfs -lgfrpc -lgfxdr -luuid

If I link Foo like:
lib_foo_LADD = $(GFAPI_LIBS) -levent
It will works well without any problem.

And if Foo call one private lib, such as handler_glfs.so, and the
handler_glfs.so will link the GFAPI_LIBS directly, while the Foo won't
and it will dlopen(handler_glfs.so), then the crash will be hit everytime.

The link info will be:
foo_LADD = -levent
libhandler_glfs_LIBADD = $(GFAPI_LIBS)

I can avoid the crash temporarily by linking the GFAPI_LIBS in Foo too like:
foo_LADD = $(GFAPI_LIBS) -levent
libhandler_glfs_LIBADD = $(GFAPI_LIBS)

But this is ugly since the Foo won't use any APIs from the GFAPI_LIBS.

And in some cases when the --as-needed link option is added(on many dists
it is added as default), then the crash is back again, the above workaround
won't work.

Backport of:
&gt; https://review.gluster.org/#/c/glusterfs/+/23110/
&gt; Change-Id: I38f0200b941bd1cff4bf3066fca2fc1f9a5263aa
&gt; Fixes: #699
&gt; Signed-off-by: Xiubo Li &lt;xiubli@redhat.com&gt;

Change-Id: I38f0200b941bd1cff4bf3066fca2fc1f9a5263aa
updates: bz#1740525
Signed-off-by: Xiubo Li &lt;xiubli@redhat.com&gt;
(cherry picked from commit 799edc73c3d4f694c365c6a7c27c9ab8eed5f260)
</pre>
</div>
</content>
</entry>
<entry>
<title>core: avoid dynamic TLS allocation when possible</title>
<updated>2019-07-03T06:25:48+00:00</updated>
<author>
<name>Xavi Hernandez</name>
<email>xhernandez@redhat.com</email>
</author>
<published>2019-03-05T17:58:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=6697af343dfbe135735a035cbf592b94750bd589'/>
<id>6697af343dfbe135735a035cbf592b94750bd589</id>
<content type='text'>
Some interdependencies between logging and memory management functions
make it impossible to use the logging framework before initializing
memory subsystem because they both depend on Thread Local Storage
allocated through pthread_key_create() during initialization.

This causes a crash when we try to log something very early in the
initialization phase.

To prevent this, several dynamically allocated TLS structures have
been replaced by static TLS reserved at compile time using '__thread'
keyword. This also reduces the number of error sources, making
initialization simpler.

Backport of:
&gt; BUG: 1193929
&gt; Change-Id: I8ea2e072411e30790d50084b6b7e909c7bb01d50
&gt; Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;

Updates: bz#1724210
Change-Id: I8ea2e072411e30790d50084b6b7e909c7bb01d50
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some interdependencies between logging and memory management functions
make it impossible to use the logging framework before initializing
memory subsystem because they both depend on Thread Local Storage
allocated through pthread_key_create() during initialization.

This causes a crash when we try to log something very early in the
initialization phase.

To prevent this, several dynamically allocated TLS structures have
been replaced by static TLS reserved at compile time using '__thread'
keyword. This also reduces the number of error sources, making
initialization simpler.

Backport of:
&gt; BUG: 1193929
&gt; Change-Id: I8ea2e072411e30790d50084b6b7e909c7bb01d50
&gt; Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;

Updates: bz#1724210
Change-Id: I8ea2e072411e30790d50084b6b7e909c7bb01d50
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>geo-rep: IPv6 support</title>
<updated>2019-04-17T13:58:46+00:00</updated>
<author>
<name>Aravinda VK</name>
<email>avishwan@redhat.com</email>
</author>
<published>2019-03-14T14:36:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=cbb52082da9d968908dc2f62b59328e948ced271'/>
<id>cbb52082da9d968908dc2f62b59328e948ced271</id>
<content type='text'>
`address_family=inet6` needs to be added while mounting master and
slave volumes in gverify script.

New option introduced to gluster cli(`--inet6`) which will be used
internally by geo-rep while calling `gluster volume info
--remote-host=&lt;ipv6&gt;`.

Backport of https://review.gluster.org/22363

Fixes: bz#1695436
Change-Id: I1e0d42cae07158df043e64a2f991882d8c897837
Signed-off-by: Aravinda VK &lt;avishwan@redhat.com&gt;
(cherry picked from commit 240e1d6821fbb779c3dd73f6f0225d755a5b7cc6)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`address_family=inet6` needs to be added while mounting master and
slave volumes in gverify script.

New option introduced to gluster cli(`--inet6`) which will be used
internally by geo-rep while calling `gluster volume info
--remote-host=&lt;ipv6&gt;`.

Backport of https://review.gluster.org/22363

Fixes: bz#1695436
Change-Id: I1e0d42cae07158df043e64a2f991882d8c897837
Signed-off-by: Aravinda VK &lt;avishwan@redhat.com&gt;
(cherry picked from commit 240e1d6821fbb779c3dd73f6f0225d755a5b7cc6)
</pre>
</div>
</content>
</entry>
<entry>
<title>socket: socket event handlers now return void</title>
<updated>2019-03-02T11:54:24+00:00</updated>
<author>
<name>Milind Changire</name>
<email>mchangir@redhat.com</email>
</author>
<published>2019-02-15T08:50:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=4cb1d6d94ac85c5e79171f8989b545ca098b61d9'/>
<id>4cb1d6d94ac85c5e79171f8989b545ca098b61d9</id>
<content type='text'>
Problem:
Returning any value from socket event handlers to the event sub-system
doesn't make sense since event sub-system cannot handle socket
sub-system errors.

Solution:
Change return type of all socket event handlers to 'void'

mainline:
&gt; Change-Id: I70dc2c57f12b7ea2fae41120f71aa0d7fe0b2b6f
&gt; Fixes: bz#1651246
&gt; Signed-off-by: Milind Changire &lt;mchangir@redhat.com&gt;
&gt; Reviewed-on: https://review.gluster.org/c/glusterfs/+/22221

Change-Id: I70dc2c57f12b7ea2fae41120f71aa0d7fe0b2b6f
Fixes: bz#1683900
Signed-off-by: Milind Changire &lt;mchangir@redhat.com&gt;
(cherry picked from commit 776ba851c6ee6c265253d44cf1d6e4e3d4a21772)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Returning any value from socket event handlers to the event sub-system
doesn't make sense since event sub-system cannot handle socket
sub-system errors.

Solution:
Change return type of all socket event handlers to 'void'

mainline:
&gt; Change-Id: I70dc2c57f12b7ea2fae41120f71aa0d7fe0b2b6f
&gt; Fixes: bz#1651246
&gt; Signed-off-by: Milind Changire &lt;mchangir@redhat.com&gt;
&gt; Reviewed-on: https://review.gluster.org/c/glusterfs/+/22221

Change-Id: I70dc2c57f12b7ea2fae41120f71aa0d7fe0b2b6f
Fixes: bz#1683900
Signed-off-by: Milind Changire &lt;mchangir@redhat.com&gt;
(cherry picked from commit 776ba851c6ee6c265253d44cf1d6e4e3d4a21772)
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: Added the group option for volume set</title>
<updated>2019-02-04T12:56:00+00:00</updated>
<author>
<name>Rinku Kothiya</name>
<email>rkothiya@redhat.com</email>
</author>
<published>2019-01-21T11:16:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=f87a3e840306052a120529ea5a190240179078c1'/>
<id>f87a3e840306052a120529ea5a190240179078c1</id>
<content type='text'>
gluster volume set &lt;VOLUME&gt; group &lt;GROUP&gt; is used for setting multiple
pre-defined volume options, but this was undocumented. This patch doc-
ments this feature.

fixes: bz#1243991

Change-Id: Id346cf2537f85179caff32479f09555ce2e72e76
Signed-off-by: Rinku Kothiya &lt;rkothiya@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gluster volume set &lt;VOLUME&gt; group &lt;GROUP&gt; is used for setting multiple
pre-defined volume options, but this was undocumented. This patch doc-
ments this feature.

fixes: bz#1243991

Change-Id: Id346cf2537f85179caff32479f09555ce2e72e76
Signed-off-by: Rinku Kothiya &lt;rkothiya@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: Added a welcome and help message</title>
<updated>2019-01-21T03:23:23+00:00</updated>
<author>
<name>Rinku Kothiya</name>
<email>rkothiya@redhat.com</email>
</author>
<published>2019-01-14T13:24:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=55b40dfbb2551b1507d532a03bdf199acb37bf6a'/>
<id>55b40dfbb2551b1507d532a03bdf199acb37bf6a</id>
<content type='text'>
When gluster command is fired without any arguments it just shows the
prompt, so added a welcome message and info to get help.

fixes: bz#1535528

Change-Id: I627b66b67443716e9270025c1e47b98b6facba13
Signed-off-by: Rinku Kothiya &lt;rkothiya@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When gluster command is fired without any arguments it just shows the
prompt, so added a welcome message and info to get help.

fixes: bz#1535528

Change-Id: I627b66b67443716e9270025c1e47b98b6facba13
Signed-off-by: Rinku Kothiya &lt;rkothiya@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>core: Feature added to accept CidrIp in auth.allow</title>
<updated>2019-01-18T17:13:13+00:00</updated>
<author>
<name>Rinku Kothiya</name>
<email>rkothiya@redhat.com</email>
</author>
<published>2019-01-01T15:36:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=0687b0beb5cc58d5aac9e203f0feebcd7e9eea03'/>
<id>0687b0beb5cc58d5aac9e203f0feebcd7e9eea03</id>
<content type='text'>
Added functionality to gluster volume set auth.allow command to
accept CIDR IP addresses. Modified few functions to isolate cidr
feature so that it prevents other gluster commands such as peer
probe to use cidr format ip. The functions are modified in such
a way that they have an option to enable accepting of cidr
format for other gluster commands if required in furture.

updates: bz#1138841

Change-Id: Ie6734002a7078f1820e5df42d404411cce945e8b
Credits: Mohit Agrawal
Signed-off-by: Rinku Kothiya &lt;rkothiya@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added functionality to gluster volume set auth.allow command to
accept CIDR IP addresses. Modified few functions to isolate cidr
feature so that it prevents other gluster commands such as peer
probe to use cidr format ip. The functions are modified in such
a way that they have an option to enable accepting of cidr
format for other gluster commands if required in furture.

updates: bz#1138841

Change-Id: Ie6734002a7078f1820e5df42d404411cce945e8b
Credits: Mohit Agrawal
Signed-off-by: Rinku Kothiya &lt;rkothiya@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfs/src/mem-types.h: remove unused common enums from mem-types.h</title>
<updated>2018-12-30T11:59:27+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2018-11-15T20:05:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=3ce7b5dbf069e7bf09c3470753c21efe03339291'/>
<id>3ce7b5dbf069e7bf09c3470753c21efe03339291</id>
<content type='text'>
They were not used at all, just taking space.
I've also marked all those that are not common really, but used
in just one place - they probably should move there (in follow-up
patches)

As a test, I've removed from the stripe xlator unused private
enums and moved one that was in the common list, but only
used in the stripe code, to be a private enum.

Compile-tested only!

updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
Change-Id: I1158dc1d259f1fd3f69904336c46c9d83cea799f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
They were not used at all, just taking space.
I've also marked all those that are not common really, but used
in just one place - they probably should move there (in follow-up
patches)

As a test, I've removed from the stripe xlator unused private
enums and moved one that was in the common list, but only
used in the stripe code, to be a private enum.

Compile-tested only!

updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
Change-Id: I1158dc1d259f1fd3f69904336c46c9d83cea799f
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: fix memory leak</title>
<updated>2018-12-26T02:17:59+00:00</updated>
<author>
<name>Sunny Kumar</name>
<email>sunkumar@redhat.com</email>
</author>
<published>2018-12-19T21:11:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=c3d23b06ce6bda906bdfb9bc8909bf30016c9995'/>
<id>c3d23b06ce6bda906bdfb9bc8909bf30016c9995</id>
<content type='text'>
This patch fixes memory leak in cli/src/cli.c.

Change-Id: I4956c4180b34d4a9e3e6e60eeafba8cb2031896e
updates: bz#1633930
Signed-off-by: Sunny Kumar &lt;sunkumar@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes memory leak in cli/src/cli.c.

Change-Id: I4956c4180b34d4a9e3e6e60eeafba8cb2031896e
updates: bz#1633930
Signed-off-by: Sunny Kumar &lt;sunkumar@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: variable-length array declaration clang fix</title>
<updated>2018-12-14T04:38:23+00:00</updated>
<author>
<name>Sheetal Pamecha</name>
<email>sheetal.pamecha08@gmail.com</email>
</author>
<published>2018-12-10T12:32:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=2421453bf38469a8c0861f205bdee37e771aa39f'/>
<id>2421453bf38469a8c0861f205bdee37e771aa39f</id>
<content type='text'>
Problem: Declared variable-length array can have zero size

Added a goto statement to address this issue.

Updates: bz#1622665

Change-Id: Ibf80643490367a5f7e50f66f87e4296380be45de
Signed-off-by: Sheetal Pamecha &lt;sheetal.pamecha08@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: Declared variable-length array can have zero size

Added a goto statement to address this issue.

Updates: bz#1622665

Change-Id: Ibf80643490367a5f7e50f66f87e4296380be45de
Signed-off-by: Sheetal Pamecha &lt;sheetal.pamecha08@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
