<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/cli/src, branch v9dev</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>cluster/afr: Removing unsupported options from code base to improve coverage</title>
<updated>2020-04-07T04:26:33+00:00</updated>
<author>
<name>karthik-us</name>
<email>ksubrahm@redhat.com</email>
</author>
<published>2020-04-02T07:33:35+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=e1ad1483e0e82d70fcc32311b7842bc9a77c04aa'/>
<id>e1ad1483e0e82d70fcc32311b7842bc9a77c04aa</id>
<content type='text'>
Support for gluster volume heal &lt;volname&gt; info healed/heal-failed
was removed by commit bb02cfb56ae08f56df4452c2b948fa962ae1212b in
release-3.6. cli parser will display the usage message in all the
supported versions whenever these clis are run, leading to some
dead code in the latest branches. Since support for these clis
were removed long back, this should not give any backward
compatibility issues as well. Hence removing the dead code from
the code base which will lead to better code coverage by the
regression runs as well.

Updates: #1052
Change-Id: I0c2b061469caf233c06d9699b0d159ce48e240b9
Signed-off-by: karthik-us &lt;ksubrahm@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support for gluster volume heal &lt;volname&gt; info healed/heal-failed
was removed by commit bb02cfb56ae08f56df4452c2b948fa962ae1212b in
release-3.6. cli parser will display the usage message in all the
supported versions whenever these clis are run, leading to some
dead code in the latest branches. Since support for these clis
were removed long back, this should not give any backward
compatibility issues as well. Hence removing the dead code from
the code base which will lead to better code coverage by the
regression runs as well.

Updates: #1052
Change-Id: I0c2b061469caf233c06d9699b0d159ce48e240b9
Signed-off-by: karthik-us &lt;ksubrahm@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: display the error while probing the localhost</title>
<updated>2020-03-13T06:22:35+00:00</updated>
<author>
<name>Sanju Rakonde</name>
<email>srakonde@redhat.com</email>
</author>
<published>2020-03-10T09:35:08+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=2668e9f1892dbe898e41e3a14701258d78cb8f46'/>
<id>2668e9f1892dbe898e41e3a14701258d78cb8f46</id>
<content type='text'>
With bc6e206c6, we regressed in displaying the error
message when a user tries to probe localhost. With
this change, we display "probe on localhost not needed"
message to the user.

credits: Sachin Prabhu &lt;sprabhu@redhat.com&gt;

fixes: bz#1810042

Change-Id: Ibf82b5a658c371c08290a0b4f655e5ac5f436c06
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With bc6e206c6, we regressed in displaying the error
message when a user tries to probe localhost. With
this change, we display "probe on localhost not needed"
message to the user.

credits: Sachin Prabhu &lt;sprabhu@redhat.com&gt;

fixes: bz#1810042

Change-Id: Ibf82b5a658c371c08290a0b4f655e5ac5f436c06
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bitrot: Make number of signer threads configurable</title>
<updated>2020-02-07T06:30:19+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2020-02-03T12:40:17+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=8fad76650bd85463708f59d2518f5b764ae4c702'/>
<id>8fad76650bd85463708f59d2518f5b764ae4c702</id>
<content type='text'>
The number of signing process threads (glfs_brpobj)
is set to 4 by default. The recommendation is to set
it to number of cores available. This patch makes it
configurable as follows

gluster vol bitrot &lt;volname&gt; signer-threads &lt;count&gt;

fixes: bz#1797869
Change-Id: Ia883b3e5e34e0bc8d095243508d320c9c9c58adc
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The number of signing process threads (glfs_brpobj)
is set to 4 by default. The recommendation is to set
it to number of cores available. This patch makes it
configurable as follows

gluster vol bitrot &lt;volname&gt; signer-threads &lt;count&gt;

fixes: bz#1797869
Change-Id: Ia883b3e5e34e0bc8d095243508d320c9c9c58adc
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli - removing fetch of unnecessary items.</title>
<updated>2020-01-21T13:29:49+00:00</updated>
<author>
<name>Barak Sason Rofman</name>
<email>bsasonro@redhat.com</email>
</author>
<published>2019-12-04T16:48:23+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=61737898e84d30e02117baa7431f89cafff27f56'/>
<id>61737898e84d30e02117baa7431f89cafff27f56</id>
<content type='text'>
Somem methods dict_get...(...) values and then not use them anywhere.
Removed found occurrences.

fixes: #753

Change-Id: Iaeb8f4cec18f76078f6b2f4e4bd6f9795a3467bc
Signed-off-by: Barak Sason Rofman &lt;bsasonro@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Somem methods dict_get...(...) values and then not use them anywhere.
Removed found occurrences.

fixes: #753

Change-Id: Iaeb8f4cec18f76078f6b2f4e4bd6f9795a3467bc
Signed-off-by: Barak Sason Rofman &lt;bsasonro@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli - fixing a coverity issue</title>
<updated>2020-01-07T08:17:51+00:00</updated>
<author>
<name>Barak Sason Rofman</name>
<email>bsasonro@redhat.com</email>
</author>
<published>2020-01-05T10:11:07+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=10b0d19513100c3f7edf00936ea5ec06fc3f80a5'/>
<id>10b0d19513100c3f7edf00936ea5ec06fc3f80a5</id>
<content type='text'>
Removed unused variable.

fixes: CID#1412106
updates: bz#789278

Change-Id: I1d4e1c1625cecf882d51e9cf4f5290383f63d405
Signed-off-by: Barak Sason Rofman &lt;bsasonro@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removed unused variable.

fixes: CID#1412106
updates: bz#789278

Change-Id: I1d4e1c1625cecf882d51e9cf4f5290383f63d405
Signed-off-by: Barak Sason Rofman &lt;bsasonro@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: duplicate defns of cli_default_conn_timeout and cli_ten_minutes_timeout</title>
<updated>2020-01-06T07:47:49+00:00</updated>
<author>
<name>Kaleb S. KEITHLEY</name>
<email>kkeithle@redhat.com</email>
</author>
<published>2020-01-02T12:46:23+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=f66bd85af09397300ad434655fc68861f48c2e3c'/>
<id>f66bd85af09397300ad434655fc68861f48c2e3c</id>
<content type='text'>
Winter is coming. So is gcc-10.

Compiling with gcc-10-20191219 snapshot reveals dupe defns of
cli_default_conn_timeout and cli_ten_minutes_timeout in
.../cli/src/cli.[ch] due to missing extern decl.

There are many changes coming in gcc-10 described in
https://gcc.gnu.org/gcc-10/changes.html

compiling cli.c with gcc-9 we see:
   ...
        .quad   .LC88
        .comm   cli_ten_minutes_timeout,4,4
        .comm   cli_default_conn_timeout,4,4
        .text
   .Letext0:
   ...

and with gcc-10:
   ...
        .quad   .LC88
        .globl  cli_ten_minutes_timeout
        .bss
        .align 4
        .type   cli_ten_minutes_timeout, @object
        .size   cli_ten_minutes_timeout, 4
   cli_ten_minutes_timeout:
        .zero   4
        .globl  cli_default_conn_timeout
        .align 4
        .type   cli_default_conn_timeout, @object
        .size   cli_default_conn_timeout, 4
   cli_default_conn_timeout:
        .zero   4
        .text
   .Letext0:
   ...

which is reflected in the .o file as (gcc-9):
...
0000000000000004 C cli_ten_minutes_timeout
0000000000000004 C cli_default_conn_timeout
...

and (gcc-10):
...
0000000000000020 B cli_ten_minutes_timeout
0000000000000024 B cli_default_conn_timeout
...

See nm(1) and ld(1) for a description C (common) and B (BSS) and how
they are treated by the linker.

Note: there is still a small chance that gcc-10 will land in Fedora-32,
despite 31 Dec. 2019 having been the deadline for that to happen.

Change-Id: I54ea485736a4910254eeb21222ad263721cdef3c
Fixes: bz#1193929
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Winter is coming. So is gcc-10.

Compiling with gcc-10-20191219 snapshot reveals dupe defns of
cli_default_conn_timeout and cli_ten_minutes_timeout in
.../cli/src/cli.[ch] due to missing extern decl.

There are many changes coming in gcc-10 described in
https://gcc.gnu.org/gcc-10/changes.html

compiling cli.c with gcc-9 we see:
   ...
        .quad   .LC88
        .comm   cli_ten_minutes_timeout,4,4
        .comm   cli_default_conn_timeout,4,4
        .text
   .Letext0:
   ...

and with gcc-10:
   ...
        .quad   .LC88
        .globl  cli_ten_minutes_timeout
        .bss
        .align 4
        .type   cli_ten_minutes_timeout, @object
        .size   cli_ten_minutes_timeout, 4
   cli_ten_minutes_timeout:
        .zero   4
        .globl  cli_default_conn_timeout
        .align 4
        .type   cli_default_conn_timeout, @object
        .size   cli_default_conn_timeout, 4
   cli_default_conn_timeout:
        .zero   4
        .text
   .Letext0:
   ...

which is reflected in the .o file as (gcc-9):
...
0000000000000004 C cli_ten_minutes_timeout
0000000000000004 C cli_default_conn_timeout
...

and (gcc-10):
...
0000000000000020 B cli_ten_minutes_timeout
0000000000000024 B cli_default_conn_timeout
...

See nm(1) and ld(1) for a description C (common) and B (BSS) and how
they are treated by the linker.

Note: there is still a small chance that gcc-10 will land in Fedora-32,
despite 31 Dec. 2019 having been the deadline for that to happen.

Change-Id: I54ea485736a4910254eeb21222ad263721cdef3c
Fixes: bz#1193929
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>geo-rep: Note section is required for ignore_deletes</title>
<updated>2020-01-03T15:34:34+00:00</updated>
<author>
<name>Shwetha K Acharya</name>
<email>sacharya@redhat.com</email>
</author>
<published>2019-07-31T06:04:19+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=59ed165a60a58db62a67a9d9fbe75d8338e5ddeb'/>
<id>59ed165a60a58db62a67a9d9fbe75d8338e5ddeb</id>
<content type='text'>
There exists a window of 15 sec, where the deletes are picked up
by history crawl when the ignore_deletes is set to true.
And it eventually deletes the file/s from slave which is/are not
supposed to be deleted. Though it is working as per design, a
note regarding this is needed.

Added a warning message indicating the same.
Also logged info when the worker restarts after ignore-deletes
option set.

fixes: bz#1708603
Change-Id: I103be882fac18b4cef935efa355f5037a396f7c1
Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There exists a window of 15 sec, where the deletes are picked up
by history crawl when the ignore_deletes is set to true.
And it eventually deletes the file/s from slave which is/are not
supposed to be deleted. Though it is working as per design, a
note regarding this is needed.

Added a warning message indicating the same.
Also logged info when the worker restarts after ignore-deletes
option set.

fixes: bz#1708603
Change-Id: I103be882fac18b4cef935efa355f5037a396f7c1
Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli, libglusterfs: rely on libpthread static initializers</title>
<updated>2020-01-01T14:12:27+00:00</updated>
<author>
<name>Dmitry Antipov</name>
<email>dmantipov@yandex.ru</email>
</author>
<published>2019-12-27T10:35:33+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=7555ebc629774b95a878678f8ab0946c3bcf2f32'/>
<id>7555ebc629774b95a878678f8ab0946c3bcf2f32</id>
<content type='text'>
cli-cmd.c: drop cli_cmd_cond_init() because static mutex and
condition variable are initialized with PTHREAD_xxx_INITIALIZERs.

syncop-utils.c: since assignment PTHREAD_xxx_INITIALIZERs are
never failed, a few overengineered bits may be simplified.

Change-Id: Ic4d250a1697047386989f73f058b0abc8b55627b
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Updates: bz#1193929
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
cli-cmd.c: drop cli_cmd_cond_init() because static mutex and
condition variable are initialized with PTHREAD_xxx_INITIALIZERs.

syncop-utils.c: since assignment PTHREAD_xxx_INITIALIZERs are
never failed, a few overengineered bits may be simplified.

Change-Id: Ic4d250a1697047386989f73f058b0abc8b55627b
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Updates: bz#1193929
</pre>
</div>
</content>
</entry>
<entry>
<title>glfsheal: install as architecture-dependent binary helper</title>
<updated>2019-12-19T11:11:50+00:00</updated>
<author>
<name>Dmitry Antipov</name>
<email>dmantipov@yandex.ru</email>
</author>
<published>2019-12-05T13:57:28+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=d8adc66b79de3f21672884539a65327614e0c6bb'/>
<id>d8adc66b79de3f21672884539a65327614e0c6bb</id>
<content type='text'>
Since glfsheal is a binary helper which is not intented to be
invoked directly, install it under %{libexecdir}/glusterfs rather
than %{sbindir}, adjust invocation from CLI code and RPM spec.

Credits: Ravishankar N &lt;ravishankar@redhat.com&gt;.
Fixes: bz#1780190

Change-Id: I4b41892d96b89c24a332470ac8c1e82f6795159a
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since glfsheal is a binary helper which is not intented to be
invoked directly, install it under %{libexecdir}/glusterfs rather
than %{sbindir}, adjust invocation from CLI code and RPM spec.

Credits: Ravishankar N &lt;ravishankar@redhat.com&gt;.
Fixes: bz#1780190

Change-Id: I4b41892d96b89c24a332470ac8c1e82f6795159a
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli-rpc-ops.c: cleanups</title>
<updated>2019-12-19T09:12:36+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2019-10-28T19:29:50+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=bc6e206c6d29234a0b167b142d20c62ffd529f15'/>
<id>bc6e206c6d29234a0b167b142d20c62ffd529f15</id>
<content type='text'>
1. Move functions and structs to static
2. Use dictionary functions with fixed key length.
3. Reduce key length when not needed.
4. Use const char* for some messages.
5. Use fixed strings for some logs which is repeated in the code.
6. Remove redundant checks. Specifically, cli_to_glusterd() does
NULL checks already, so no need to do it before calling it.
7. Aligned some messages - not sure why they were cut over several
lines, but it made grep on the code harder.
8. Move dictionary fetching of values closer to where they are
actually used.

Overall, object size is ~4 smaller, hopefully without functional changes.

There's more that can be done, but as this is a very long (&gt;10K lines)
file, I think it's enough for one change.
Specifically, some functions fetch values from the dictionary
without using it - this is a bit of a waste.
Filed https://github.com/gluster/glusterfs/issues/753 about it.

Change-Id: I31f88d94ab25398e00aef2ea84a8c4af9383b75b
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. Move functions and structs to static
2. Use dictionary functions with fixed key length.
3. Reduce key length when not needed.
4. Use const char* for some messages.
5. Use fixed strings for some logs which is repeated in the code.
6. Remove redundant checks. Specifically, cli_to_glusterd() does
NULL checks already, so no need to do it before calling it.
7. Aligned some messages - not sure why they were cut over several
lines, but it made grep on the code harder.
8. Move dictionary fetching of values closer to where they are
actually used.

Overall, object size is ~4 smaller, hopefully without functional changes.

There's more that can be done, but as this is a very long (&gt;10K lines)
file, I think it's enough for one change.
Specifically, some functions fetch values from the dictionary
without using it - this is a bit of a waste.
Filed https://github.com/gluster/glusterfs/issues/753 about it.

Change-Id: I31f88d94ab25398e00aef2ea84a8c4af9383b75b
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
