<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/libglusterfs/src/glusterfs, branch release-9</title>
<subtitle>GlusterFS is a distributed file-system capable of scaling to several petabytes. It aggregates various storage bricks over Infiniband RDMA or TCP/IP interconnect into one large parallel network file system.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/'/>
<entry>
<title>posix: fix chmod error on symlinks (#2158)</title>
<updated>2021-02-12T14:59:36+00:00</updated>
<author>
<name>Xavi Hernandez</name>
<email>xhernandez@users.noreply.github.com</email>
</author>
<published>2021-02-12T14:59:36+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=f03593e67f7131db54b8cfcd5a4be9586d77078a'/>
<id>f03593e67f7131db54b8cfcd5a4be9586d77078a</id>
<content type='text'>
After glibc 2.32, lchmod() is returning EOPNOTSUPP instead of ENOSYS when
called on symlinks. The man page says that the returned code is ENOTSUP.
They are the same in linux, but this patch correctly handles all errors.

Fixes: #2154
Change-Id: Ib3bb3d86d421cba3d7ec8d66b6beb131ef6e0925
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After glibc 2.32, lchmod() is returning EOPNOTSUPP instead of ENOSYS when
called on symlinks. The man page says that the returned code is ENOTSUP.
They are the same in linux, but this patch correctly handles all errors.

Fixes: #2154
Change-Id: Ib3bb3d86d421cba3d7ec8d66b6beb131ef6e0925
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>glusterd[brick_mux]: Optimize friend handshake code to avoid call_bail (#1614)</title>
<updated>2020-11-30T12:09:53+00:00</updated>
<author>
<name>mohit84</name>
<email>moagrawa@redhat.com</email>
</author>
<published>2020-11-30T12:09:53+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=12545d91eed27ff9abb0505a12c7d4e75b45a53e'/>
<id>12545d91eed27ff9abb0505a12c7d4e75b45a53e</id>
<content type='text'>
During glusterd handshake glusterd received a volume dictionary
from peer end to compare the own volume dictionary data.If the options
are differ it sets the key to recognize volume options are changed
and call import syntask to delete/start the volume.In brick_mux
environment while number of volumes are high(5k) the dict api in function
glusterd_compare_friend_volume takes time because the function
glusterd_handle_friend_req saves all peer volume data in a single dictionary.
Due to time taken by the function glusterd_handle_friend RPC requests receives
a call_bail from a peer end gluster(CLI) won't be able to show volume status.

Solution: To optimize the code done below changes
1) Populate a new specific dictionary to save the peer end version specific
   data so that function won't take much time to take the decision about the
   peer end has some volume updates.
2) In case of volume has differ version set the key in status_arr instead
   of saving in a dictionary to make the operation is faster.

Note: To validate the changes followed below procedure
1) Setup 5100 distributed volumes 3x1
2) Enable brick_mux
3) Start all the volumes
4) Kill all gluster processes on 3rd node
5) Run a loop to update volume option on a 1st node
   for i in {1..5100}; do gluster v set vol$i performance.open-behind off; done
6) Start the glusterd process on the 3rd node
7) Wait to finish handshake and check there should not be any call_bail message
   in the logs

Change-Id: Ibad7c23988539cc369ecc39dea2ea6985470bee1
Fixes: #1613
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During glusterd handshake glusterd received a volume dictionary
from peer end to compare the own volume dictionary data.If the options
are differ it sets the key to recognize volume options are changed
and call import syntask to delete/start the volume.In brick_mux
environment while number of volumes are high(5k) the dict api in function
glusterd_compare_friend_volume takes time because the function
glusterd_handle_friend_req saves all peer volume data in a single dictionary.
Due to time taken by the function glusterd_handle_friend RPC requests receives
a call_bail from a peer end gluster(CLI) won't be able to show volume status.

Solution: To optimize the code done below changes
1) Populate a new specific dictionary to save the peer end version specific
   data so that function won't take much time to take the decision about the
   peer end has some volume updates.
2) In case of volume has differ version set the key in status_arr instead
   of saving in a dictionary to make the operation is faster.

Note: To validate the changes followed below procedure
1) Setup 5100 distributed volumes 3x1
2) Enable brick_mux
3) Start all the volumes
4) Kill all gluster processes on 3rd node
5) Run a loop to update volume option on a 1st node
   for i in {1..5100}; do gluster v set vol$i performance.open-behind off; done
6) Start the glusterd process on the 3rd node
7) Wait to finish handshake and check there should not be any call_bail message
   in the logs

Change-Id: Ibad7c23988539cc369ecc39dea2ea6985470bee1
Fixes: #1613
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>core: tcmu-runner process continuous growing logs lru_size showing -1 (#1776)</title>
<updated>2020-11-24T09:59:58+00:00</updated>
<author>
<name>mohit84</name>
<email>moagrawa@redhat.com</email>
</author>
<published>2020-11-24T09:59:58+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=06d5cd06724bbef7970167df1cdd191717672cff'/>
<id>06d5cd06724bbef7970167df1cdd191717672cff</id>
<content type='text'>
* core: tcmu-runner process continuous growing logs lru_size showing -1

At the time of calling inode_table_prune it checks if current lru_size
is greater than lru_limit but lru_list is empty it throws a log message
"Empty inode lru list found but with (%d) lru_size".As per code reading
it seems lru_size is out of sync with the actual number of inodes in
lru_list. Due to throwing continuous error messages entire disk is
getting full and the user has to restart the tcmu-runner process to use
the volumes.The log message was introduce by a patch
https://review.gluster.org/#/c/glusterfs/+/15087/.

Solution: Introduce a flag in_lru_list to take decision about inode is
          being part of lru_list or not.
Fixes: #1775
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;

Change-Id: I4b836bebf4b5db65fbf88ff41c6c88f4a7ac55c1

* core: tcmu-runner process continuous growing logs lru_size showing -1
Update in_lru_list flag only while modify lru_size

Fixes: #1775
Change-Id: I3bea1c6e748b4f50437999bae59edeb3d7677f47
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;

* core: tcmu-runner process continuous growing logs lru_size showing -1

Resolve comments in inode_table_destroy and inode_table_prune

Fixes: #1775
Change-Id: I5aa4d8c254f0fe374daa5ec604f643dea8dd56ff
Signed-off-by: Mohit Agrawal moagrawa@redhat.com

* core: tcmu-runner process continuous growing logs lru_size showing -1

Update in_lru_list only while update lru_size

Fixes: #1775
Change-Id: I950eb1f0010c3d4bcc44a33225a502d2291d1a83
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* core: tcmu-runner process continuous growing logs lru_size showing -1

At the time of calling inode_table_prune it checks if current lru_size
is greater than lru_limit but lru_list is empty it throws a log message
"Empty inode lru list found but with (%d) lru_size".As per code reading
it seems lru_size is out of sync with the actual number of inodes in
lru_list. Due to throwing continuous error messages entire disk is
getting full and the user has to restart the tcmu-runner process to use
the volumes.The log message was introduce by a patch
https://review.gluster.org/#/c/glusterfs/+/15087/.

Solution: Introduce a flag in_lru_list to take decision about inode is
          being part of lru_list or not.
Fixes: #1775
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;

Change-Id: I4b836bebf4b5db65fbf88ff41c6c88f4a7ac55c1

* core: tcmu-runner process continuous growing logs lru_size showing -1
Update in_lru_list flag only while modify lru_size

Fixes: #1775
Change-Id: I3bea1c6e748b4f50437999bae59edeb3d7677f47
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;

* core: tcmu-runner process continuous growing logs lru_size showing -1

Resolve comments in inode_table_destroy and inode_table_prune

Fixes: #1775
Change-Id: I5aa4d8c254f0fe374daa5ec604f643dea8dd56ff
Signed-off-by: Mohit Agrawal moagrawa@redhat.com

* core: tcmu-runner process continuous growing logs lru_size showing -1

Update in_lru_list only while update lru_size

Fixes: #1775
Change-Id: I950eb1f0010c3d4bcc44a33225a502d2291d1a83
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>enahancement/debug: Option to generate core dump without killing the process (#1814)</title>
<updated>2020-11-23T02:39:44+00:00</updated>
<author>
<name>Vinayak hariharmath</name>
<email>65405035+VHariharmath-rh@users.noreply.github.com</email>
</author>
<published>2020-11-23T02:39:44+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=f74d3ab643a00632fdeb9b4912211b1767fa120a'/>
<id>f74d3ab643a00632fdeb9b4912211b1767fa120a</id>
<content type='text'>
Comments and idea proposed by: Xavi Hernandez(jahernan@redhat.com):

On production systems sometimes we see a log message saying that an assertion
has failed. But it's hard to track why it failed without additional information
(on debug builds, a GF_ASSERT() generates a core dump and kills the process,
so it can be used to debug the issue, but many times we are only able to
reproduce assertion failures on production systems, where GF_ASSERT() only logs
a message and continues).

In other cases we may have a core dump caused by a bug, but the core dump doesn't
necessarily happen when the bug has happened. Sometimes the crash happens so much
later that the causes that triggered the bug are lost. In these cases we can add
more assertions to the places that touch the potential candidates to cause the bug,
but the only thing we'll get is a log message, which may not be enough.

One solution would be to always generate a core dump in case of assertion failure,
but this was already discussed and it was decided that it was too drastic. If a
core dump was really needed, a new macro was created to do so: GF_ABORT(),
but GF_ASSERT() would continue to not kill the process on production systems.

I'm proposing to modify GF_ASSERT() on production builds so that it conditionally
triggers a signal when a debugger is attached. When this happens, the debugger
will generate a core dump and continue the process as if nothing had happened.
If there's no debugger attached, GF_ASSERT() will behave as always.

The idea I have is to use SIGCONT to do that. This signal is harmless, so we can
unmask it (we currently mask all unneeded signals) and raise it inside a GF_ASSERT()
when some global variable is set to true.

To produce the core dump, run the script under extras/debug/gfcore.py on other
terminal. gdb breaks and produces coredump when GF_ASSERT is hit.

The script is copied from #1810 which is written by Xavi Hernandez(jahernan@redhat.com)

Fixes: #1810
Change-Id: I6566ca2cae15501d8835c36f56be4c6950cb2a53
Signed-off-by: Vinayakswami Hariharmath &lt;vharihar@redhat.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Comments and idea proposed by: Xavi Hernandez(jahernan@redhat.com):

On production systems sometimes we see a log message saying that an assertion
has failed. But it's hard to track why it failed without additional information
(on debug builds, a GF_ASSERT() generates a core dump and kills the process,
so it can be used to debug the issue, but many times we are only able to
reproduce assertion failures on production systems, where GF_ASSERT() only logs
a message and continues).

In other cases we may have a core dump caused by a bug, but the core dump doesn't
necessarily happen when the bug has happened. Sometimes the crash happens so much
later that the causes that triggered the bug are lost. In these cases we can add
more assertions to the places that touch the potential candidates to cause the bug,
but the only thing we'll get is a log message, which may not be enough.

One solution would be to always generate a core dump in case of assertion failure,
but this was already discussed and it was decided that it was too drastic. If a
core dump was really needed, a new macro was created to do so: GF_ABORT(),
but GF_ASSERT() would continue to not kill the process on production systems.

I'm proposing to modify GF_ASSERT() on production builds so that it conditionally
triggers a signal when a debugger is attached. When this happens, the debugger
will generate a core dump and continue the process as if nothing had happened.
If there's no debugger attached, GF_ASSERT() will behave as always.

The idea I have is to use SIGCONT to do that. This signal is harmless, so we can
unmask it (we currently mask all unneeded signals) and raise it inside a GF_ASSERT()
when some global variable is set to true.

To produce the core dump, run the script under extras/debug/gfcore.py on other
terminal. gdb breaks and produces coredump when GF_ASSERT is hit.

The script is copied from #1810 which is written by Xavi Hernandez(jahernan@redhat.com)

Fixes: #1810
Change-Id: I6566ca2cae15501d8835c36f56be4c6950cb2a53
Signed-off-by: Vinayakswami Hariharmath &lt;vharihar@redhat.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>posix: Attach a posix_spawn_disk_thread with glusterfs_ctx (#1595)</title>
<updated>2020-11-09T11:45:42+00:00</updated>
<author>
<name>mohit84</name>
<email>moagrawa@redhat.com</email>
</author>
<published>2020-11-09T11:45:42+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=3f93be77e1acf5baacafa97a320e91e6879d1c0e'/>
<id>3f93be77e1acf5baacafa97a320e91e6879d1c0e</id>
<content type='text'>
Currently posix xlator spawns posix_disk_space_threads per brick and in
case of brick_mux environment while glusterd attached bricks at maximum
level(250) with a single brick process in that case 250 threads are
spawned for all bricks and brick process memory size also increased.

Solution: Attach a posix_disk_space thread with glusterfs_ctx to
          spawn a thread per process basis instead of spawning a per brick

Fixes: #1482
Change-Id: I8dd88f252a950495b71742e2a7588bd5bb019ec7
Signed-off-by: Mohit Agrawal moagrawa@redhat.com</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently posix xlator spawns posix_disk_space_threads per brick and in
case of brick_mux environment while glusterd attached bricks at maximum
level(250) with a single brick process in that case 250 threads are
spawned for all bricks and brick process memory size also increased.

Solution: Attach a posix_disk_space thread with glusterfs_ctx to
          spawn a thread per process basis instead of spawning a per brick

Fixes: #1482
Change-Id: I8dd88f252a950495b71742e2a7588bd5bb019ec7
Signed-off-by: Mohit Agrawal moagrawa@redhat.com</pre>
</div>
</content>
</entry>
<entry>
<title>xlators: misc conscious language changes (#1715)</title>
<updated>2020-11-02T12:33:01+00:00</updated>
<author>
<name>Ravishankar N</name>
<email>ravishankar@redhat.com</email>
</author>
<published>2020-11-02T12:33:01+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=e4c9a14429c51d8d059287c2a2c7a76a5116a362'/>
<id>e4c9a14429c51d8d059287c2a2c7a76a5116a362</id>
<content type='text'>
core:change xlator_t-&gt;ctx-&gt;master to xlator_t-&gt;ctx-&gt;primary
afr: just changed comments.
meta: change .meta/master to .meta/primary. Might break scripts.
changelog: variable/function name changes only.

These are unrelated to geo-rep.
Fixes: #1713

Change-Id: I58eb5fcd75d65fc8269633acc41313503dccf5ff
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
core:change xlator_t-&gt;ctx-&gt;master to xlator_t-&gt;ctx-&gt;primary
afr: just changed comments.
meta: change .meta/master to .meta/primary. Might break scripts.
changelog: variable/function name changes only.

These are unrelated to geo-rep.
Fixes: #1713

Change-Id: I58eb5fcd75d65fc8269633acc41313503dccf5ff
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfs/coverity: pointer to local outside the scope (#1675)</title>
<updated>2020-10-21T10:44:29+00:00</updated>
<author>
<name>Vinayak hariharmath</name>
<email>65405035+VHariharmath-rh@users.noreply.github.com</email>
</author>
<published>2020-10-21T10:44:29+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=bf2a76da976f90ba9e7ac049575b8620505b62a7'/>
<id>bf2a76da976f90ba9e7ac049575b8620505b62a7</id>
<content type='text'>
issue: gf_store_read_and_tokenize() returns the address
of the locally referred string.

fix: pass the buf to gf_store_read_and_tokenize() and
use it for tokenize.

CID: 1430143

Updates: #1060

Change-Id: Ifc346540c263f58f4014ba2ba8c1d491c20ac609
Signed-off-by: Vinayakswami Hariharmath &lt;vharihar@redhat.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
issue: gf_store_read_and_tokenize() returns the address
of the locally referred string.

fix: pass the buf to gf_store_read_and_tokenize() and
use it for tokenize.

CID: 1430143

Updates: #1060

Change-Id: Ifc346540c263f58f4014ba2ba8c1d491c20ac609
Signed-off-by: Vinayakswami Hariharmath &lt;vharihar@redhat.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>core: configure optimum inode table hash_size for shd (#1576)</title>
<updated>2020-10-11T05:26:57+00:00</updated>
<author>
<name>mohit84</name>
<email>moagrawa@redhat.com</email>
</author>
<published>2020-10-11T05:26:57+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=ecdc77ceb9a5864be1fd0b3d7f919fa9ce60132e'/>
<id>ecdc77ceb9a5864be1fd0b3d7f919fa9ce60132e</id>
<content type='text'>
In brick_mux environment a shd process consume high memory.
After print the statedump i have found it allocates 1M per afr xlator
for all bricks.In case of configure 4k volumes it consumes almost total
6G RSS size in which 4G consumes by inode_tables

[cluster/replicate.test1-replicate-0 - usage-type gf_common_mt_list_head memusage]
size=1273488
num_allocs=2
max_size=1273488
max_num_allocs=2
total_allocs=2

inode_new_table function allocates memory(1M) for a list of inode and dentry hash.
For shd lru_limit size is 1 so we don't need to create a big hash table so to reduce
RSS size for shd process pass optimum bucket count at the time of creating inode_table.

Change-Id: I039716d42321a232fdee1ee8fd50295e638715bb
Fixes: #1538
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In brick_mux environment a shd process consume high memory.
After print the statedump i have found it allocates 1M per afr xlator
for all bricks.In case of configure 4k volumes it consumes almost total
6G RSS size in which 4G consumes by inode_tables

[cluster/replicate.test1-replicate-0 - usage-type gf_common_mt_list_head memusage]
size=1273488
num_allocs=2
max_size=1273488
max_num_allocs=2
total_allocs=2

inode_new_table function allocates memory(1M) for a list of inode and dentry hash.
For shd lru_limit size is 1 so we don't need to create a big hash table so to reduce
RSS size for shd process pass optimum bucket count at the time of creating inode_table.

Change-Id: I039716d42321a232fdee1ee8fd50295e638715bb
Fixes: #1538
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>rpcsvc: Add latency tracking for rpc programs</title>
<updated>2020-09-04T05:14:17+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2020-09-04T05:14:17+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=da3835971a5fa1b29fd792faa8339be428a5116c'/>
<id>da3835971a5fa1b29fd792faa8339be428a5116c</id>
<content type='text'>
Added latency tracking of rpc-handling code. With this change we
should be able to monitor the amount of time rpc-handling code is
consuming for each of the rpc call.

fixes: #1466
Change-Id: I04fc7f3b12bfa5053c0fc36885f271cb78f581cd
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added latency tracking of rpc-handling code. With this change we
should be able to monitor the amount of time rpc-handling code is
consuming for each of the rpc call.

fixes: #1466
Change-Id: I04fc7f3b12bfa5053c0fc36885f271cb78f581cd
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>build: extend --enable-valgrind to support Memcheck and DRD</title>
<updated>2020-08-31T11:17:24+00:00</updated>
<author>
<name>Dmitry Antipov</name>
<email>dmantipov@yandex.ru</email>
</author>
<published>2020-08-31T11:17:24+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=9ed1558ed088c8c4ddc372cb50a9ef8a04679f8f'/>
<id>9ed1558ed088c8c4ddc372cb50a9ef8a04679f8f</id>
<content type='text'>
Extend '-enable-valgrind' to '--enable=valgrind[=memcheck,drd]'
to enable Memcheck or DRD Valgrind tool, respectively.

Change-Id: I80d13d72ba9756e0cbcdbeb6766b5c98e3e8c002
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Updates: #1002
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Extend '-enable-valgrind' to '--enable=valgrind[=memcheck,drd]'
to enable Memcheck or DRD Valgrind tool, respectively.

Change-Id: I80d13d72ba9756e0cbcdbeb6766b5c98e3e8c002
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Updates: #1002
</pre>
</div>
</content>
</entry>
</feed>
