<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/cluster/afr/src, branch master</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>fixed AFR_READ_POLICY_GFID_PID_HASH policy bug</title>
<updated>2020-10-01T13:52:12+00:00</updated>
<author>
<name>perrynzhou</name>
<email>perrynzhou@gmail.com</email>
</author>
<published>2020-09-29T09:22:42+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=268faabed00995537394c04ac168c018167fbe27'/>
<id>268faabed00995537394c04ac168c018167fbe27</id>
<content type='text'>
Change-Id: Ib927a770a486c95e4b157e76ba96e9904d1a9716
Fixes: #1499
Signed-off-by: perrynzhou &lt;perrynzhou@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ib927a770a486c95e4b157e76ba96e9904d1a9716
Fixes: #1499
Signed-off-by: perrynzhou &lt;perrynzhou@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/afr: Heal directory rename without rmdir/mkdir</title>
<updated>2020-10-01T12:03:25+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2020-04-13T14:01:51+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=9ecbd69127d373ac000e9e1be00c1829e49e64a4'/>
<id>9ecbd69127d373ac000e9e1be00c1829e49e64a4</id>
<content type='text'>
Problem1:
When a directory is renamed while a brick
is down entry-heal always did an rm -rf on that directory on
the sink on old location and did mkdir and created the directory
hierarchy again in the new location. This is inefficient.

Problem2:
Renamedir heal order may lead to a scenario where directory in
the new location could be created before deleting it from old
location leading to 2 directories with same gfid in posix.

Fix:
As part of heal, if oldlocation is healed first and is not present in
source-brick always rename it into a hidden directory inside the
sink-brick so that when heal is triggered in new-location shd can
rename it from this hidden directory to the new-location.

If new-location heal is triggered first and it detects that the
directory already exists in the brick, then it should skip healing the
directory until it appears in the hidden directory.

Credits: Ravi for rename-data-loss.t script

Fixes: #1211
Change-Id: I0cba2006f35cd03d314d18211ce0bd530e254843
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem1:
When a directory is renamed while a brick
is down entry-heal always did an rm -rf on that directory on
the sink on old location and did mkdir and created the directory
hierarchy again in the new location. This is inefficient.

Problem2:
Renamedir heal order may lead to a scenario where directory in
the new location could be created before deleting it from old
location leading to 2 directories with same gfid in posix.

Fix:
As part of heal, if oldlocation is healed first and is not present in
source-brick always rename it into a hidden directory inside the
sink-brick so that when heal is triggered in new-location shd can
rename it from this hidden directory to the new-location.

If new-location heal is triggered first and it detects that the
directory already exists in the brick, then it should skip healing the
directory until it appears in the hidden directory.

Credits: Ravi for rename-data-loss.t script

Fixes: #1211
Change-Id: I0cba2006f35cd03d314d18211ce0bd530e254843
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xlators: prefer libglusterfs time API</title>
<updated>2020-09-07T12:56:45+00:00</updated>
<author>
<name>Dmitry Antipov</name>
<email>dmantipov@yandex.ru</email>
</author>
<published>2020-09-03T08:17:07+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=c696144b3690f7ed8cf04a8b51ca601f45e427ad'/>
<id>c696144b3690f7ed8cf04a8b51ca601f45e427ad</id>
<content type='text'>
Prefer timespec_now_realtime() and gf_time() over clock_gettime()
and time(), use gf_tvdiff() and gf_tsdiff() where appropriate,
drop unused time_elapsed() and leftovers in 'struct posix_private'.

Change-Id: Ie1f0229df5b03d0862193ce2b7fb91d27b0981b6
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>
Prefer timespec_now_realtime() and gf_time() over clock_gettime()
and time(), use gf_tvdiff() and gf_tsdiff() where appropriate,
drop unused time_elapsed() and leftovers in 'struct posix_private'.

Change-Id: Ie1f0229df5b03d0862193ce2b7fb91d27b0981b6
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Updates: #1002
</pre>
</div>
</content>
</entry>
<entry>
<title>afr: add null check for thin-arbiter gfid.</title>
<updated>2020-08-20T07:35:04+00:00</updated>
<author>
<name>Ravishankar N</name>
<email>ravishankar@redhat.com</email>
</author>
<published>2020-08-19T05:44:25+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=f9b5074394e3d2f3b6728aab97230ba620879426'/>
<id>f9b5074394e3d2f3b6728aab97230ba620879426</id>
<content type='text'>
Problem:
Lookup/creation of thin-arbiter ID file happens in background during
mounting. On new volumes, if the  ID file creation is in progress, and a
FOP fails on data brick, a post-op (xattrop) is attemtped on TA. Since
the TA file's gfid is null at this point, the ASSERT checks in protocol/
client causes a crash.

Fix:
Given that we decided to do Lookup/creation of thin-arbiter in
background, fail the other AFR FOPS on TA if the ID file's gfid is null
instead of winding it down to protocol/client.

Also remove afr_changelog_thin_arbiter_post_op() which seems to be dead
code.

Updates: #763
Change-Id: I70dc666faf55cc5c8f7cf8e7d36085e4fa399c4d
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Lookup/creation of thin-arbiter ID file happens in background during
mounting. On new volumes, if the  ID file creation is in progress, and a
FOP fails on data brick, a post-op (xattrop) is attemtped on TA. Since
the TA file's gfid is null at this point, the ASSERT checks in protocol/
client causes a crash.

Fix:
Given that we decided to do Lookup/creation of thin-arbiter in
background, fail the other AFR FOPS on TA if the ID file's gfid is null
instead of winding it down to protocol/client.

Also remove afr_changelog_thin_arbiter_post_op() which seems to be dead
code.

Updates: #763
Change-Id: I70dc666faf55cc5c8f7cf8e7d36085e4fa399c4d
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfs: add library wrapper for time()</title>
<updated>2020-08-17T11:27:09+00:00</updated>
<author>
<name>Dmitry Antipov</name>
<email>dmantipov@yandex.ru</email>
</author>
<published>2020-08-10T08:45:58+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=9978ceb26327de9545c6e0a4f9230b401e629793'/>
<id>9978ceb26327de9545c6e0a4f9230b401e629793</id>
<content type='text'>
Add thin convenient library wrapper gf_time(),
adjust related users and comments as well.

Change-Id: If8969af2f45ee69c30c3406bce5baa8305fb7f80
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>
Add thin convenient library wrapper gf_time(),
adjust related users and comments as well.

Change-Id: If8969af2f45ee69c30c3406bce5baa8305fb7f80
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Updates: #1002
</pre>
</div>
</content>
</entry>
<entry>
<title>afr/split-brain: fix client side split-brain resolution when quorum is enabled</title>
<updated>2020-08-13T04:20:36+00:00</updated>
<author>
<name>Mohammed Rafi KC</name>
<email>rafi.kavungal@iternity.com</email>
</author>
<published>2020-07-29T08:12:53+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=320bf93d36a1c20d661cb11968825fc055fcc168'/>
<id>320bf93d36a1c20d661cb11968825fc055fcc168</id>
<content type='text'>
Problem:
If we set favourite child policy, then automatic split-brain resolution
should work in all cases. This was failing when quorum count was set to
a non-zero value. The initial lookup before the read txn was failing
with ENOTCONN. Since we don't have a readable subvol, we were failing it.
We were only looking to the split brain resolution choice set through the
cli command.

Fix:
We will now consider the favourite child policy if split-brain choice
has not been set via cli command.

Change-Id: Id2016c3a90d0763ac6f1a0131571053f595576f0
Fixes: #1404
Signed-off-by: Mohammed Rafi KC &lt;rafi.kavungal@iternity.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
If we set favourite child policy, then automatic split-brain resolution
should work in all cases. This was failing when quorum count was set to
a non-zero value. The initial lookup before the read txn was failing
with ENOTCONN. Since we don't have a readable subvol, we were failing it.
We were only looking to the split brain resolution choice set through the
cli command.

Fix:
We will now consider the favourite child policy if split-brain choice
has not been set via cli command.

Change-Id: Id2016c3a90d0763ac6f1a0131571053f595576f0
Fixes: #1404
Signed-off-by: Mohammed Rafi KC &lt;rafi.kavungal@iternity.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xlators/cluster/afr: lto-type-mismatch</title>
<updated>2020-07-19T04:38:38+00:00</updated>
<author>
<name>Kaleb S. KEITHLEY</name>
<email>kkeithle@redhat.com</email>
</author>
<published>2020-07-07T14:29:31+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=732de942ef0d0909ca16b55b1648017fe866fd78'/>
<id>732de942ef0d0909ca16b55b1648017fe866fd78</id>
<content type='text'>
  [  144s] afr-dir-read.h:15:1: warning: type of 'afr_opendir' does not match original declaration [-Wlto-type-mismatch]
  [  144s]    15 | afr_opendir(call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd, dict_t *xdata)
  [  144s]       | ^
  [  144s] afr-dir-read.c:71:1: note: type mismatch in parameter 5
  [  144s]    71 | afr_opendir(call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd)
  [  144s]       | ^
  [  144s] afr-dir-read.c:71:1: note: 'afr_opendir' was previously declared here

only a warning, more of a truth-and-beauty thing

Change-Id: I2d6ff3fa0a8c5e6ef36e090a6545eaf638752192
Updates: #1002
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  [  144s] afr-dir-read.h:15:1: warning: type of 'afr_opendir' does not match original declaration [-Wlto-type-mismatch]
  [  144s]    15 | afr_opendir(call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd, dict_t *xdata)
  [  144s]       | ^
  [  144s] afr-dir-read.c:71:1: note: type mismatch in parameter 5
  [  144s]    71 | afr_opendir(call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd)
  [  144s]       | ^
  [  144s] afr-dir-read.c:71:1: note: 'afr_opendir' was previously declared here

only a warning, more of a truth-and-beauty thing

Change-Id: I2d6ff3fa0a8c5e6ef36e090a6545eaf638752192
Updates: #1002
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/afr: Fixing coverity issues</title>
<updated>2020-07-13T11:15:02+00:00</updated>
<author>
<name>karthik-us</name>
<email>ksubrahm@redhat.com</email>
</author>
<published>2020-07-13T11:07:30+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=99bc72f41a25b00b422094f1664b7115fcd2bbd4'/>
<id>99bc72f41a25b00b422094f1664b7115fcd2bbd4</id>
<content type='text'>
Fixing the unchecked return value issues reported by coverity scan

CID: 1400734
CID: 1400750

Change-Id: I3c953df9ade4a1548e41e18018edb1b041f7e15e
Signed-off-by: karthik-us &lt;ksubrahm@redhat.com&gt;
Updates: #1060
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixing the unchecked return value issues reported by coverity scan

CID: 1400734
CID: 1400750

Change-Id: I3c953df9ade4a1548e41e18018edb1b041f7e15e
Signed-off-by: karthik-us &lt;ksubrahm@redhat.com&gt;
Updates: #1060
</pre>
</div>
</content>
</entry>
<entry>
<title>afr: null dereference &amp; nagative value</title>
<updated>2020-07-08T05:28:05+00:00</updated>
<author>
<name>nik-redhat</name>
<email>nladha@redhat.com</email>
</author>
<published>2020-07-03T11:48:33+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=24ea814fe7d5a5d27fa051d20ab85bc18c051bdc'/>
<id>24ea814fe7d5a5d27fa051d20ab85bc18c051bdc</id>
<content type='text'>
Added a check for NULL before dereferencing
the object as it may be NULL in few cases
inside the funtion. Also, added a check for
the negative value of gfid_idx.

CID: 1430140
CID: 1430145

Change-Id: Ib7d23459b48bbc471dbcccab6d20572261882d11
Updates: #1060
Signed-off-by: nik-redhat &lt;nladha@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added a check for NULL before dereferencing
the object as it may be NULL in few cases
inside the funtion. Also, added a check for
the negative value of gfid_idx.

CID: 1430140
CID: 1430145

Change-Id: Ib7d23459b48bbc471dbcccab6d20572261882d11
Updates: #1060
Signed-off-by: nik-redhat &lt;nladha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>afr: more quorum checks in lookup and new entry marking</title>
<updated>2020-06-16T04:53:03+00:00</updated>
<author>
<name>Ravishankar N</name>
<email>ravishankar@redhat.com</email>
</author>
<published>2020-05-27T15:20:46+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=c4a6748f25d2c1ab3ebcf89952278ebf94c8d371'/>
<id>c4a6748f25d2c1ab3ebcf89952278ebf94c8d371</id>
<content type='text'>
Problem: See github issue for details.

Fix:
-In lookup if the entry exists in 2 out of 3 bricks, don't fail the
lookup with ENOENT just because there is an entrylk on the parent.
Consider quorum before deciding.

-If entry FOP does not succeed on quorum no. of bricks, do not perform
new entry mark.

Fixes: #1303
Change-Id: I56df8c89ad53b29fa450c7930a7b7ccec9f4a6c5
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: See github issue for details.

Fix:
-In lookup if the entry exists in 2 out of 3 bricks, don't fail the
lookup with ENOENT just because there is an entrylk on the parent.
Consider quorum before deciding.

-If entry FOP does not succeed on quorum no. of bricks, do not perform
new entry mark.

Fixes: #1303
Change-Id: I56df8c89ad53b29fa450c7930a7b7ccec9f4a6c5
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
