<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/libglusterfs/src, branch v9dev</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>Posix: Optimize posix code to improve file creation</title>
<updated>2020-04-06T10:43:26+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawal@redhat.com</email>
</author>
<published>2019-12-19T03:02:19+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=f2d90013aaa4652dbcc1e6e3d62a0d31ada89d5d'/>
<id>f2d90013aaa4652dbcc1e6e3d62a0d31ada89d5d</id>
<content type='text'>
Problem: Before executing a fop in POSIX xlator it builds an internal
         path based on GFID.To validate the path it call's (l)stat
         system call and while .glusterfs is heavily loaded kernel takes
         time to lookup inode and due to that performance drops

Solution: In this patch we followed two ways to improve the performance.
          1) Keep open fd specific to first level directory(gfid[0])
             in .glusterfs, it would force to kernel keep the inodes
             from all those files in cache. In case of memory pressure
             kernel won't uncache first level inodes. We need to open
             256 fd's per brick to access the entry faster.
          2) Use at based call's to access relative path to reduce
             path based lookup time.

Note: To verify the patch we have executed kernel untar 100 times on 6
      different clients after enabling metadata group-cache and some
      other option.We were getting more than 20 percent improvement in
      kenel untar after applying the patch.

Credits: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
Change-Id: I1643e6b01ed669b2bb148d02f4e6a8e08da45343
updates: #891
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: Before executing a fop in POSIX xlator it builds an internal
         path based on GFID.To validate the path it call's (l)stat
         system call and while .glusterfs is heavily loaded kernel takes
         time to lookup inode and due to that performance drops

Solution: In this patch we followed two ways to improve the performance.
          1) Keep open fd specific to first level directory(gfid[0])
             in .glusterfs, it would force to kernel keep the inodes
             from all those files in cache. In case of memory pressure
             kernel won't uncache first level inodes. We need to open
             256 fd's per brick to access the entry faster.
          2) Use at based call's to access relative path to reduce
             path based lookup time.

Note: To verify the patch we have executed kernel untar 100 times on 6
      different clients after enabling metadata group-cache and some
      other option.We were getting more than 20 percent improvement in
      kenel untar after applying the patch.

Credits: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
Change-Id: I1643e6b01ed669b2bb148d02f4e6a8e08da45343
updates: #891
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>core[brick_mux]: brick crashed when creating and deleting volumes over time</title>
<updated>2020-03-27T15:19:20+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawal@redhat.com</email>
</author>
<published>2020-03-04T03:47:26+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=e589d8de66d3325da8fbbbe44d1a5bd6335e08ab'/>
<id>e589d8de66d3325da8fbbbe44d1a5bd6335e08ab</id>
<content type='text'>
Problem: In brick_mux environment, while volumes are created/stopped in a loop
         after running a long time the main brick is crashed.The brick is crashed
         because the main brick process was not cleaned up memory for all objects
         at the time of detaching a volume.
         Below are the objects that are missed at the time of detaching a volume
         1) xlator object for a brick graph
         2) local_pool for posix_lock xlator
         3) rpc object cleanup at quota xlator
         4) inode leak at brick xlator

Solution: To avoid the crash resolve all leak at the time of detaching a brick
Change-Id: Ibb6e46c5fba22b9441a88cbaf6b3278823235913
updates: #977
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: In brick_mux environment, while volumes are created/stopped in a loop
         after running a long time the main brick is crashed.The brick is crashed
         because the main brick process was not cleaned up memory for all objects
         at the time of detaching a volume.
         Below are the objects that are missed at the time of detaching a volume
         1) xlator object for a brick graph
         2) local_pool for posix_lock xlator
         3) rpc object cleanup at quota xlator
         4) inode leak at brick xlator

Solution: To avoid the crash resolve all leak at the time of detaching a brick
Change-Id: Ibb6e46c5fba22b9441a88cbaf6b3278823235913
updates: #977
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Posix: Use simple approach to close fd</title>
<updated>2020-03-20T04:08:42+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawal@redhat.com</email>
</author>
<published>2020-03-12T15:42:13+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=fb20713b380e1df8d7f9e9df96563be2f9144fd6'/>
<id>fb20713b380e1df8d7f9e9df96563be2f9144fd6</id>
<content type='text'>
Problem: posix_release(dir) functions add the fd's into a ctx-&gt;janitor_fds
         and janitor thread closes the fd's.In brick_mux environment it is
         difficult to handle race condition in janitor threads because brick
         spawns a single janitor thread for all bricks.

Solution: Use synctask to execute posix_release(dir) functions instead of 
          using background a thread to close fds.

Credits: Pranith Karampuri &lt;pkarampu@redhat.com&gt;
Change-Id: Iffb031f0695a7da83d5a2f6bac8863dad225317e
Fixes: bz#1811631
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: posix_release(dir) functions add the fd's into a ctx-&gt;janitor_fds
         and janitor thread closes the fd's.In brick_mux environment it is
         difficult to handle race condition in janitor threads because brick
         spawns a single janitor thread for all bricks.

Solution: Use synctask to execute posix_release(dir) functions instead of 
          using background a thread to close fds.

Credits: Pranith Karampuri &lt;pkarampu@redhat.com&gt;
Change-Id: Iffb031f0695a7da83d5a2f6bac8863dad225317e
Fixes: bz#1811631
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>utime: resolve an issue of permission denied logs</title>
<updated>2020-03-13T12:15:21+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amar@kadalu.io</email>
</author>
<published>2020-03-03T19:16:08+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=eb916c057036db8289b41265797e5dce066d1512'/>
<id>eb916c057036db8289b41265797e5dce066d1512</id>
<content type='text'>
In case where uid is not set to be 0, there are possible errors
from acl xlator. So, set `uid = 0;` with pid indicating this is
set from UTIME activity.

The message "E [MSGID: 148002] [utime.c:146:gf_utime_set_mdata_setxattr_cbk] 0-dev_SNIP_data-utime: dict set of key for set-ctime-mdata failed [Permission denied]" repeated 2 times between [2019-12-19 21:27:55.042634] and [2019-12-19 21:27:55.047887]

Change-Id: Ieadf329835a40a13ac0bf908dac776e66954466c
Fixes: #832
Signed-off-by: Amar Tumballi &lt;amar@kadalu.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In case where uid is not set to be 0, there are possible errors
from acl xlator. So, set `uid = 0;` with pid indicating this is
set from UTIME activity.

The message "E [MSGID: 148002] [utime.c:146:gf_utime_set_mdata_setxattr_cbk] 0-dev_SNIP_data-utime: dict set of key for set-ctime-mdata failed [Permission denied]" repeated 2 times between [2019-12-19 21:27:55.042634] and [2019-12-19 21:27:55.047887]

Change-Id: Ieadf329835a40a13ac0bf908dac776e66954466c
Fixes: #832
Signed-off-by: Amar Tumballi &lt;amar@kadalu.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Segmentation fault occurs during truncate</title>
<updated>2020-02-24T18:31:04+00:00</updated>
<author>
<name>kinsu</name>
<email>vpolakis@gmail.com</email>
</author>
<published>2019-09-19T08:34:32+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=3ba0885b5be42efec01ebd42cc5fbd33dc1b2756'/>
<id>3ba0885b5be42efec01ebd42cc5fbd33dc1b2756</id>
<content type='text'>
Problem:
Segmentation fault occurs when bricks are nearly full 100% and in
parallel truncate of a file is attempted (No space left on device).
Prerequicite is that performance xlators are activated
(read-ahead, write-behind etc)
while stack unwind of the frames following an error responce
from brick (No space left on device) frame-&gt;local includes a memory
location that is not allocated via mem_get but via calloc.
The destroyed frame is always ra_truncate_cbk winded from ra_ftruncate
and the inode ptr is copied to the frame local in the wb_ftruncate.

Fix:
extra check is added for the pool ptr

Change-Id: Ic5d3bd0ab7011e40b2811c6dece063b256e4d9d1
Fixes: bz#1797882
Signed-off-by: kinsu &lt;vpolakis@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Segmentation fault occurs when bricks are nearly full 100% and in
parallel truncate of a file is attempted (No space left on device).
Prerequicite is that performance xlators are activated
(read-ahead, write-behind etc)
while stack unwind of the frames following an error responce
from brick (No space left on device) frame-&gt;local includes a memory
location that is not allocated via mem_get but via calloc.
The destroyed frame is always ra_truncate_cbk winded from ra_ftruncate
and the inode ptr is copied to the frame local in the wb_ftruncate.

Fix:
extra check is added for the pool ptr

Change-Id: Ic5d3bd0ab7011e40b2811c6dece063b256e4d9d1
Fixes: bz#1797882
Signed-off-by: kinsu &lt;vpolakis@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>core: Prevent crash on process termination</title>
<updated>2020-02-19T11:30:43+00:00</updated>
<author>
<name>Xavi Hernandez</name>
<email>xhernandez@redhat.com</email>
</author>
<published>2020-02-19T11:24:15+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=672a53d3d30d6932e25d81f64c7fecbdb97d15c4'/>
<id>672a53d3d30d6932e25d81f64c7fecbdb97d15c4</id>
<content type='text'>
A previous patch (ce61da816a) has fixed a use-after-free issue,
but it doesn't work well when the final cleanup is done at process
termination because gluster doesn't stop other threads before
calling exit().

For this reason, the final cleanup is removed to avoid the crash,
at least until the termination sequence properly stops all gluster
threads before exiting the program.

Change-Id: Id7cfb4407fcf208e28f03a7c3cdc3ef9c1f3bf9b
Fixes: bz#1801684
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A previous patch (ce61da816a) has fixed a use-after-free issue,
but it doesn't work well when the final cleanup is done at process
termination because gluster doesn't stop other threads before
calling exit().

For this reason, the final cleanup is removed to avoid the crash,
at least until the termination sequence properly stops all gluster
threads before exiting the program.

Change-Id: Id7cfb4407fcf208e28f03a7c3cdc3ef9c1f3bf9b
Fixes: bz#1801684
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>core: fix memory pool management races</title>
<updated>2020-02-18T17:29:51+00:00</updated>
<author>
<name>Xavi Hernandez</name>
<email>xhernandez@redhat.com</email>
</author>
<published>2020-02-07T09:19:57+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=ee415f38f71bad62368333184fab3b70be524b78'/>
<id>ee415f38f71bad62368333184fab3b70be524b78</id>
<content type='text'>
Objects allocated from a per-thread memory pool keep a reference to it
to be able to return the object to the pool when not used anymore. The
object holding this reference can have a long life cycle that could
survive a glfs_fini() call.

This means that it's unsafe to destroy memory pools from glfs_fini().

Another side effect of destroying memory pools from glfs_fini() is that
the TLS variable that points to one of those pools cannot be reset for
all alive threads.  This means that any attempt to allocate memory from
those threads will access already free'd memory, which is very
dangerous.

To fix these issues, mem_pools_fini() doesn't destroy pool lists
anymore. Only at process termination the pools are destroyed.

Change-Id: Ib189a5510ab6bdac78983c6c65a022e9634b0965
Fixes: bz#1801684
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Objects allocated from a per-thread memory pool keep a reference to it
to be able to return the object to the pool when not used anymore. The
object holding this reference can have a long life cycle that could
survive a glfs_fini() call.

This means that it's unsafe to destroy memory pools from glfs_fini().

Another side effect of destroying memory pools from glfs_fini() is that
the TLS variable that points to one of those pools cannot be reset for
all alive threads.  This means that any attempt to allocate memory from
those threads will access already free'd memory, which is very
dangerous.

To fix these issues, mem_pools_fini() doesn't destroy pool lists
anymore. Only at process termination the pools are destroyed.

Change-Id: Ib189a5510ab6bdac78983c6c65a022e9634b0965
Fixes: bz#1801684
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfs-xlator: structure logging</title>
<updated>2020-02-14T07:16:48+00:00</updated>
<author>
<name>yatipadia</name>
<email>ypadia@redhat.com</email>
</author>
<published>2019-11-19T13:29:28+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=acbba8e1121205f9512833d1b0fad81b0930f881'/>
<id>acbba8e1121205f9512833d1b0fad81b0930f881</id>
<content type='text'>
convert all gf_msg() to gf_smsg()

Change-Id: Id542e05faadb8041b472a2298c71fe62730e65fc
Updates: #657
Signed-off-by: yatipadia &lt;ypadia@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
convert all gf_msg() to gf_smsg()

Change-Id: Id542e05faadb8041b472a2298c71fe62730e65fc
Updates: #657
Signed-off-by: yatipadia &lt;ypadia@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>volgen: make thin-arbiter name unique in 'pending-xattr' option</title>
<updated>2020-02-12T16:16:46+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amar@kadalu.io</email>
</author>
<published>2020-02-04T17:32:51+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=8db8202f716fd24c8c52f8ee5f66e169310dc9b1'/>
<id>8db8202f716fd24c8c52f8ee5f66e169310dc9b1</id>
<content type='text'>
Thin-arbiter module makes use of 'pending-xattr' name for the translator
as the filename which gets created in thin-arbiter node. By making this
unique, we can host single thin-arbiter node for multiple clusters.

Updates: #763
Change-Id: Ib3c732e7e04e6dba229e71ae3e64f1f3cb6d794d
Signed-off-by: Amar Tumballi &lt;amar@kadalu.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Thin-arbiter module makes use of 'pending-xattr' name for the translator
as the filename which gets created in thin-arbiter node. By making this
unique, we can host single thin-arbiter node for multiple clusters.

Updates: #763
Change-Id: Ib3c732e7e04e6dba229e71ae3e64f1f3cb6d794d
Signed-off-by: Amar Tumballi &lt;amar@kadalu.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfs-options: structure logging</title>
<updated>2020-02-09T02:53:40+00:00</updated>
<author>
<name>yatipadia</name>
<email>ypadia@redhat.com</email>
</author>
<published>2019-11-23T08:33:41+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=f1e62e1578ee07802827121722d90c1ec4b811a6'/>
<id>f1e62e1578ee07802827121722d90c1ec4b811a6</id>
<content type='text'>
convert all gf_msg() to gf_smsg()

Change-Id: I8f1ff462b9c8012ed676c51450930a65ac403bf3
Updates: #657
Signed-off-by: yatipadia &lt;ypadia@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
convert all gf_msg() to gf_smsg()

Change-Id: I8f1ff462b9c8012ed676c51450930a65ac403bf3
Updates: #657
Signed-off-by: yatipadia &lt;ypadia@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
