<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/performance, branch release-5</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>open-behind: fix missing fd reference</title>
<updated>2020-04-06T09:42:32+00:00</updated>
<author>
<name>Xavi Hernandez</name>
<email>xhernandez@redhat.com</email>
</author>
<published>2020-03-08T17:36:45+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=111c5f382f2ba6ac36b9ff702878214eb4d7381a'/>
<id>111c5f382f2ba6ac36b9ff702878214eb4d7381a</id>
<content type='text'>
Open behind was not keeping any reference on fd's pending to be
opened. This makes it possible that a concurrent close and en entry
fop (unlink, rename, ...) caused destruction of the fd while it
was still being used.

Change-Id: Ie9e992902cf2cd7be4af1f8b4e57af9bd6afd8e9
Fixes: #1028
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Open behind was not keeping any reference on fd's pending to be
opened. This makes it possible that a concurrent close and en entry
fop (unlink, rename, ...) caused destruction of the fd while it
was still being used.

Change-Id: Ie9e992902cf2cd7be4af1f8b4e57af9bd6afd8e9
Fixes: #1028
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Detach iot_worker to release its resources</title>
<updated>2019-11-05T08:25:48+00:00</updated>
<author>
<name>Liguang Li</name>
<email>liguang.lee6@gmail.com</email>
</author>
<published>2019-11-05T08:25:39+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=aa60bea1753bb744c892b669a3e693803b0db385'/>
<id>aa60bea1753bb744c892b669a3e693803b0db385</id>
<content type='text'>
When iot_worker terminates, its resources have not been reaped, which
will consumes lots of memory.

Detach iot_worker to automically release its resources back to the
system.

Change-Id: I71fabb2940e76ad54dc56b4c41aeeead2644b8bb
fixes: bz#1718734
Signed-off-by: Liguang Li &lt;liguang.lee6@gmail.com&gt;
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When iot_worker terminates, its resources have not been reaped, which
will consumes lots of memory.

Detach iot_worker to automically release its resources back to the
system.

Change-Id: I71fabb2940e76ad54dc56b4c41aeeead2644b8bb
fixes: bz#1718734
Signed-off-by: Liguang Li &lt;liguang.lee6@gmail.com&gt;
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>performance/write-behind: remove request from wip list in wb_writev_cbk</title>
<updated>2019-05-08T14:07:56+00:00</updated>
<author>
<name>Raghavendra G</name>
<email>rgowdapp@redhat.com</email>
</author>
<published>2019-05-03T04:44:48+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=09cb7406c28052c4643b2cb6e0ab986331b9576b'/>
<id>09cb7406c28052c4643b2cb6e0ab986331b9576b</id>
<content type='text'>
There is a race in the way O_DIRECT writes are handled. Assume two
overlapping write requests w1 and w2.

* w1 is issued and is in wb_inode-&gt;wip queue as the response is still
  pending from bricks. Also wb_request_unref in wb_do_winds is not yet
  invoked.

       list_for_each_entry_safe (req, tmp, tasks, winds) {
		list_del_init (&amp;req-&gt;winds);

                if (req-&gt;op_ret == -1) {
			call_unwind_error_keep_stub (req-&gt;stub, req-&gt;op_ret,
		                                     req-&gt;op_errno);
                } else {
                        call_resume_keep_stub (req-&gt;stub);
		}

                wb_request_unref (req);
        }

* w2 is issued and wb_process_queue is invoked. w2 is not picked up
  for winding as w1 is still in wb_inode-&gt;wip. w1 is added to todo
  list and wb_writev for w2 returns.

* response to w1 is received and invokes wb_request_unref. Assume
  wb_request_unref in wb_do_winds (see point 1) is not invoked
  yet. Since there is one more refcount, wb_request_unref in
  wb_writev_cbk of w1 doesn't remove w1 from wip.

* wb_process_queue is invoked as part of wb_writev_cbk of w1. But, it
  fails to wind w2 as w1 is still in wip.

* wb_requet_unref is invoked on w1 as part of wb_do_winds. w1 is
  removed from all queues including w1.

* After this point there is no invocation of wb_process_queue unless
  new request is issued from application causing w2 to be hung till
  the next request.

This bug is similar to bz 1626780 and bz 1379655.

Change-Id: Iaa47437613591699d4c8ad18bc0b32de6affcc31
Signed-off-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Fixes: bz#1707198
(cherry picked from commit 6454132342c0b549365d92bcf3572ecd914f7fa8)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is a race in the way O_DIRECT writes are handled. Assume two
overlapping write requests w1 and w2.

* w1 is issued and is in wb_inode-&gt;wip queue as the response is still
  pending from bricks. Also wb_request_unref in wb_do_winds is not yet
  invoked.

       list_for_each_entry_safe (req, tmp, tasks, winds) {
		list_del_init (&amp;req-&gt;winds);

                if (req-&gt;op_ret == -1) {
			call_unwind_error_keep_stub (req-&gt;stub, req-&gt;op_ret,
		                                     req-&gt;op_errno);
                } else {
                        call_resume_keep_stub (req-&gt;stub);
		}

                wb_request_unref (req);
        }

* w2 is issued and wb_process_queue is invoked. w2 is not picked up
  for winding as w1 is still in wb_inode-&gt;wip. w1 is added to todo
  list and wb_writev for w2 returns.

* response to w1 is received and invokes wb_request_unref. Assume
  wb_request_unref in wb_do_winds (see point 1) is not invoked
  yet. Since there is one more refcount, wb_request_unref in
  wb_writev_cbk of w1 doesn't remove w1 from wip.

* wb_process_queue is invoked as part of wb_writev_cbk of w1. But, it
  fails to wind w2 as w1 is still in wip.

* wb_requet_unref is invoked on w1 as part of wb_do_winds. w1 is
  removed from all queues including w1.

* After this point there is no invocation of wb_process_queue unless
  new request is issued from application causing w2 to be hung till
  the next request.

This bug is similar to bz 1626780 and bz 1379655.

Change-Id: Iaa47437613591699d4c8ad18bc0b32de6affcc31
Signed-off-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Fixes: bz#1707198
(cherry picked from commit 6454132342c0b549365d92bcf3572ecd914f7fa8)
</pre>
</div>
</content>
</entry>
<entry>
<title>performance/write-behind: fix use-after-free in readdirp</title>
<updated>2019-02-22T14:50:00+00:00</updated>
<author>
<name>Raghavendra Gowdappa</name>
<email>rgowdapp@redhat.com</email>
</author>
<published>2019-02-13T11:38:14+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=3c1368fda17b71a95edf1f4fe102e15f64820e3e'/>
<id>3c1368fda17b71a95edf1f4fe102e15f64820e3e</id>
<content type='text'>
Two issues were found:
1. in wb_readdirp_cbk, inode should unrefed after wb_inode is
unlocked. Otherwise, inode and hence the context wb_inode can be freed
by the type we try to unlock wb_inode
2. wb_readdirp_mark_end iterates over a list of wb_inodes of children
of a directory. But inodes could've been freed and hence the list
might be corrupted. To fix take a reference on inode before adding it
to invalidate_list of parent.

Change-Id: I911b0e0b2060f7f41ded0b05db11af6f9b7c09c5
Signed-off-by: Raghavendra Gowdappa &lt;rgowdapp@redhat.com&gt;
Updates: bz#1671556
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Two issues were found:
1. in wb_readdirp_cbk, inode should unrefed after wb_inode is
unlocked. Otherwise, inode and hence the context wb_inode can be freed
by the type we try to unlock wb_inode
2. wb_readdirp_mark_end iterates over a list of wb_inodes of children
of a directory. But inodes could've been freed and hence the list
might be corrupted. To fix take a reference on inode before adding it
to invalidate_list of parent.

Change-Id: I911b0e0b2060f7f41ded0b05db11af6f9b7c09c5
Signed-off-by: Raghavendra Gowdappa &lt;rgowdapp@redhat.com&gt;
Updates: bz#1671556
</pre>
</div>
</content>
</entry>
<entry>
<title>performance/write-behind: handle call-stub leaks</title>
<updated>2019-02-22T14:49:13+00:00</updated>
<author>
<name>Raghavendra Gowdappa</name>
<email>rgowdapp@redhat.com</email>
</author>
<published>2019-02-19T02:34:52+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=ceee95dbc3c80d52134ceaee22e17c9f1c861300'/>
<id>ceee95dbc3c80d52134ceaee22e17c9f1c861300</id>
<content type='text'>
Change-Id: I7be9a5f48dcad1b136c479c58b1dca1e0488166d
Signed-off-by: Raghavendra Gowdappa &lt;rgowdapp@redhat.com&gt;
Fixes: bz#1671556
(cherry picked from commit 6175cb10cd5f59f3c7ae4100bc78f359b68ca3e9)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I7be9a5f48dcad1b136c479c58b1dca1e0488166d
Signed-off-by: Raghavendra Gowdappa &lt;rgowdapp@redhat.com&gt;
Fixes: bz#1671556
(cherry picked from commit 6175cb10cd5f59f3c7ae4100bc78f359b68ca3e9)
</pre>
</div>
</content>
</entry>
<entry>
<title>md-cache: Adapt integer data types to avoid integer overflow</title>
<updated>2019-02-20T14:00:05+00:00</updated>
<author>
<name>David Spisla</name>
<email>david.spisla@iternity.com</email>
</author>
<published>2019-02-19T13:56:11+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=f6c8b1771f71bec287437dbec2e3b2e4f5692ef6'/>
<id>f6c8b1771f71bec287437dbec2e3b2e4f5692ef6</id>
<content type='text'>
The "struct iatt" in iatt.h is using int64_t types for storing
the atime, mtime and ctime. Therefore the struct 'struct md_cache' in
md-cache.c should also use this types to avoid an integer overflow.

This can happen e.g. if someone uses a very high default-retention-period
in the WORM-Xlator.

Change-Id: I605268d300ab622b9c8ab30e459dc00d9340aad1
fixes: bz#1678726
Signed-off-by: David Spisla &lt;david.spisla@iternity.com&gt;
(cherry picked from commit 15423e14f16dd1a15ee5e5cbbdbdd370e57ed59f)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "struct iatt" in iatt.h is using int64_t types for storing
the atime, mtime and ctime. Therefore the struct 'struct md_cache' in
md-cache.c should also use this types to avoid an integer overflow.

This can happen e.g. if someone uses a very high default-retention-period
in the WORM-Xlator.

Change-Id: I605268d300ab622b9c8ab30e459dc00d9340aad1
fixes: bz#1678726
Signed-off-by: David Spisla &lt;david.spisla@iternity.com&gt;
(cherry picked from commit 15423e14f16dd1a15ee5e5cbbdbdd370e57ed59f)
</pre>
</div>
</content>
</entry>
<entry>
<title>readdir-ahead: do not zero-out iatt in fop cbk</title>
<updated>2019-02-04T14:52:59+00:00</updated>
<author>
<name>Ravishankar N</name>
<email>ravishankar@redhat.com</email>
</author>
<published>2019-01-29T06:21:16+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=3f05fb00a090686bbdb0b467cec1f3647903b851'/>
<id>3f05fb00a090686bbdb0b467cec1f3647903b851</id>
<content type='text'>
...when ctime is zero. ia_type and ia_gfid always need to be non-zero
for things to work correctly.

Problem:
Commit c9bde3021202f1d5c5a2d19ac05a510fc1f788ac zeroed out the iatt
buffer in the cbks of modification fops before unwinding if the ctime in
the buffer was zero. This was causing the fops to fail: noticeable when
AFR's 'consistent-metadata' option was enabled. (AFR zeros out the ctime
when the option is set. See commit
4c4624c9bad2edf27128cb122c64f15d7d63bbc8).

Fixes:
-Do not zero out the ia_type and ia_gfid of the iatt buff under any
circumstance.
-Also, fixed _rda_inode_ctx_update_iatts() to always update these values from
the incoming buf when ctime is zero. Otherwise we end up with zero
ia_type and ia_gfid the first time the function is called *and* the
incoming buf has ctime set to zero.

fixes: bz#1665145
Reported-By:Michael Hanselmann &lt;public@hansmi.ch&gt;
Change-Id: Ib72228892d42c3513c19fc6dfb543f2aa3489eca
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
(cherry picked from commit 09db11b0c020bc79d493c6d7e7ea4f3beb000c68)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
...when ctime is zero. ia_type and ia_gfid always need to be non-zero
for things to work correctly.

Problem:
Commit c9bde3021202f1d5c5a2d19ac05a510fc1f788ac zeroed out the iatt
buffer in the cbks of modification fops before unwinding if the ctime in
the buffer was zero. This was causing the fops to fail: noticeable when
AFR's 'consistent-metadata' option was enabled. (AFR zeros out the ctime
when the option is set. See commit
4c4624c9bad2edf27128cb122c64f15d7d63bbc8).

Fixes:
-Do not zero out the ia_type and ia_gfid of the iatt buff under any
circumstance.
-Also, fixed _rda_inode_ctx_update_iatts() to always update these values from
the incoming buf when ctime is zero. Otherwise we end up with zero
ia_type and ia_gfid the first time the function is called *and* the
incoming buf has ctime set to zero.

fixes: bz#1665145
Reported-By:Michael Hanselmann &lt;public@hansmi.ch&gt;
Change-Id: Ib72228892d42c3513c19fc6dfb543f2aa3489eca
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
(cherry picked from commit 09db11b0c020bc79d493c6d7e7ea4f3beb000c68)
</pre>
</div>
</content>
</entry>
<entry>
<title>core: Fixed typos in nl-cache and logging-guidelines.md</title>
<updated>2019-01-09T15:17:18+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2018-12-26T06:10:26+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=0ec7da927915512c62c99b418a297c6132234c8b'/>
<id>0ec7da927915512c62c99b418a297c6132234c8b</id>
<content type='text'>
Replaced "recieve" with "receive".

Change-Id: I58a3d3d4a0093df4743de9fae4d8ff152d4b216c
fixes: bz#1662200
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
(cherry picked from commit a11c5c66321dd8411373a68cc163c981c7d083df)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replaced "recieve" with "receive".

Change-Id: I58a3d3d4a0093df4743de9fae4d8ff152d4b216c
fixes: bz#1662200
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
(cherry picked from commit a11c5c66321dd8411373a68cc163c981c7d083df)
</pre>
</div>
</content>
</entry>
<entry>
<title>io-cache: xdata needs to be passed for readv operations</title>
<updated>2018-12-30T13:32:00+00:00</updated>
<author>
<name>Soumya Koduri</name>
<email>skoduri@redhat.com</email>
</author>
<published>2018-11-28T08:44:00+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=cee5f93ac00f628539f0367bc4958d59b98af011'/>
<id>cee5f93ac00f628539f0367bc4958d59b98af011</id>
<content type='text'>
io-cache xlator has been skipping xdata references when the
date needs to be read into page cache. This patch fixes the same.

Note: similar changes may be needed for other fops as well
which are handled by io-cache.

Change-Id: I28d73d4ba471d13eb55d0fd0b5197d222df77a2a
updates: bz#1651323
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
(cherry picked from commit b3d88a0904131f6851f4185e43f815ecc3353ab5)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
io-cache xlator has been skipping xdata references when the
date needs to be read into page cache. This patch fixes the same.

Note: similar changes may be needed for other fops as well
which are handled by io-cache.

Change-Id: I28d73d4ba471d13eb55d0fd0b5197d222df77a2a
updates: bz#1651323
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
(cherry picked from commit b3d88a0904131f6851f4185e43f815ecc3353ab5)
</pre>
</div>
</content>
</entry>
<entry>
<title>performance/rda:  Fixed dict_t memory leak</title>
<updated>2018-12-26T16:38:37+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2018-12-14T11:12:26+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=0beca839679d437d49c7481cb7370e1350f16ba9'/>
<id>0beca839679d437d49c7481cb7370e1350f16ba9</id>
<content type='text'>
Removed all references to dict_t xdata_from_req which is
allocated but not used anywhere. It is also not cleaned up
and hence causes a memory leak.

fixes: bz#1659676

Change-Id: I2edb857696191e872ad12a12efc36999626bacc7
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removed all references to dict_t xdata_from_req which is
allocated but not used anywhere. It is also not cleaned up
and hence causes a memory leak.

fixes: bz#1659676

Change-Id: I2edb857696191e872ad12a12efc36999626bacc7
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
