<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators, branch v6.5</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>features/utime: always update ctime at setattr</title>
<updated>2019-08-07T05:09:15+00:00</updated>
<author>
<name>Kinglong Mee</name>
<email>kinglongmee@gmail.com</email>
</author>
<published>2019-08-05T03:08:02+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=cf42677ac0cc042ea4318062219908095d4027c0'/>
<id>cf42677ac0cc042ea4318062219908095d4027c0</id>
<content type='text'>
For the nfs EXCLUSIVE mode create may sets a later time
to mtime (at verifier), it should not set to ctime for
storage.ctime does not allowed set ctime to a earlier time.

 /* Earlier, mdata was updated only if the existing time is less
  * than the time to be updated. This would fail the scenarios
  * where mtime can be set to any time using the syscall. Hence
  * just updating without comparison. But the ctime is not
  * allowed to changed to older date.
  */

According to kernel's setattr, always set ctime at setattr,
and doesnot set ctime from mtime at storage.ctime.

Backport of:
 &gt; Patch: https://review.gluster.org/23154
 &gt; Change-Id: I5cfde6cb7f8939da9617506e3dc80bd840e0d749
 &gt; BUG: 1737288
 &gt; Signed-off-by: Kinglong Mee &lt;kinglongmee@gmail.com&gt;

Change-Id: I5cfde6cb7f8939da9617506e3dc80bd840e0d749
fixes: bz#1737746
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For the nfs EXCLUSIVE mode create may sets a later time
to mtime (at verifier), it should not set to ctime for
storage.ctime does not allowed set ctime to a earlier time.

 /* Earlier, mdata was updated only if the existing time is less
  * than the time to be updated. This would fail the scenarios
  * where mtime can be set to any time using the syscall. Hence
  * just updating without comparison. But the ctime is not
  * allowed to changed to older date.
  */

According to kernel's setattr, always set ctime at setattr,
and doesnot set ctime from mtime at storage.ctime.

Backport of:
 &gt; Patch: https://review.gluster.org/23154
 &gt; Change-Id: I5cfde6cb7f8939da9617506e3dc80bd840e0d749
 &gt; BUG: 1737288
 &gt; Signed-off-by: Kinglong Mee &lt;kinglongmee@gmail.com&gt;

Change-Id: I5cfde6cb7f8939da9617506e3dc80bd840e0d749
fixes: bz#1737746
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>posix/ctime: Fix race during lookup ctime xattr heal</title>
<updated>2019-08-07T05:07:56+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2019-07-29T10:52:10+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=aa45fcc1384ea6120d582cdad35b1d610e6437af'/>
<id>aa45fcc1384ea6120d582cdad35b1d610e6437af</id>
<content type='text'>
Problem:
Ctime heals the ctime xattr ("trusted.glusterfs.mdata") in lookup
if it's not present. In a multi client scenario, there is a race
which results in updating the ctime xattr to older value.

e.g. Let c1 and c2 be two clients and file1 be the file which
doesn't have the ctime xattr. Let the ctime of file1 be t1.
(from backend, ctime heals time attributes from backend when not present).

Now following operations are done on mount
c1 -&gt; ls -l /mnt/file1  |   c2 -&gt; ls -l /mnt/file1;echo "append" &gt;&gt; /mnt/file1;

The race is that the both c1 and c2 didn't fetch the ctime xattr in lookup,
so both of them tries to heal ctime to time 't1'. If c2 wins the race and
appends the file before c1 heals it, it sets the time to 't1' and updates
it to 't2' (because of append). Now c1 proceeds to heal and sets it to 't1'
which is incorrect.

Solution:
Compare the times during heal and only update the larger time. This is the
general approach used in ctime feature but got missed with healing legacy
files.

Backport of:
 &gt; Patch: https://review.gluster.org/23131
 &gt; BUG: 1734299
 &gt; Change-Id: I930bda192c64c3d49d0aed431ce23d3bc57e51b7
 &gt; Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;

fixes: bz#1737745
Change-Id: I930bda192c64c3d49d0aed431ce23d3bc57e51b7
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Ctime heals the ctime xattr ("trusted.glusterfs.mdata") in lookup
if it's not present. In a multi client scenario, there is a race
which results in updating the ctime xattr to older value.

e.g. Let c1 and c2 be two clients and file1 be the file which
doesn't have the ctime xattr. Let the ctime of file1 be t1.
(from backend, ctime heals time attributes from backend when not present).

Now following operations are done on mount
c1 -&gt; ls -l /mnt/file1  |   c2 -&gt; ls -l /mnt/file1;echo "append" &gt;&gt; /mnt/file1;

The race is that the both c1 and c2 didn't fetch the ctime xattr in lookup,
so both of them tries to heal ctime to time 't1'. If c2 wins the race and
appends the file before c1 heals it, it sets the time to 't1' and updates
it to 't2' (because of append). Now c1 proceeds to heal and sets it to 't1'
which is incorrect.

Solution:
Compare the times during heal and only update the larger time. This is the
general approach used in ctime feature but got missed with healing legacy
files.

Backport of:
 &gt; Patch: https://review.gluster.org/23131
 &gt; BUG: 1734299
 &gt; Change-Id: I930bda192c64c3d49d0aed431ce23d3bc57e51b7
 &gt; Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;

fixes: bz#1737745
Change-Id: I930bda192c64c3d49d0aed431ce23d3bc57e51b7
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/utime: Fix mem_put crash</title>
<updated>2019-08-06T07:23:43+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2019-07-22T15:25:33+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=24293229112670149226a44d4d2f87829e248718'/>
<id>24293229112670149226a44d4d2f87829e248718</id>
<content type='text'>
Problem:
When frame-&gt;local is not null FRAME_DESTROY calls mem_put on it.
Since the stub is already destroyed in call_resume(), it leads
to crash

Fix:
Set frame-&gt;local to NULL before calling call_resume()

Backport of:
 &gt; Patch: https://review.gluster.org/23091
 &gt; BUG: 1593542
 &gt; Change-Id: I0f8adf406f4cefdb89d7624ba7a9d9c2eedfb1de
 &gt; Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;

fixes: bz#1733885
Change-Id: I0f8adf406f4cefdb89d7624ba7a9d9c2eedfb1de
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
When frame-&gt;local is not null FRAME_DESTROY calls mem_put on it.
Since the stub is already destroyed in call_resume(), it leads
to crash

Fix:
Set frame-&gt;local to NULL before calling call_resume()

Backport of:
 &gt; Patch: https://review.gluster.org/23091
 &gt; BUG: 1593542
 &gt; Change-Id: I0f8adf406f4cefdb89d7624ba7a9d9c2eedfb1de
 &gt; Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;

fixes: bz#1733885
Change-Id: I0f8adf406f4cefdb89d7624ba7a9d9c2eedfb1de
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctime: Set mdata xattr on legacy files</title>
<updated>2019-08-06T07:23:43+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2019-06-24T07:36:49+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=173ec95d89244f169af778677fbc508843d83ef4'/>
<id>173ec95d89244f169af778677fbc508843d83ef4</id>
<content type='text'>
Problem:
The files which were created before ctime enabled would not
have "trusted.glusterfs.mdata"(stores time attributes) xattr.
Upon fops which modifies either ctime or mtime, the xattr
gets created with latest ctime, mtime and atime, which is
incorrect. It should update only the corresponding time
attribute and rest from backend

Solution:
Creating xattr with values from brick is not possible as
each brick of replica set would have different times.
So create the xattr upon successful lookup if the xattr
is not created

Note To Reviewers:
The time attributes used to set xattr is got from successful
lookup. Instead of sending the whole iatt over the wire via
setxattr, a structure called mdata_iatt is sent. The mdata_iatt
contains only time attributes.

Backport of:
 &gt; Patch:  https://review.gluster.org/22936
 &gt; Change-Id: I5e535631ddef04195361ae0364336410a2895dd4
 &gt; BUG: 1593542
 &gt; Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;

Change-Id: I5e535631ddef04195361ae0364336410a2895dd4
updates: bz#1733885
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
The files which were created before ctime enabled would not
have "trusted.glusterfs.mdata"(stores time attributes) xattr.
Upon fops which modifies either ctime or mtime, the xattr
gets created with latest ctime, mtime and atime, which is
incorrect. It should update only the corresponding time
attribute and rest from backend

Solution:
Creating xattr with values from brick is not possible as
each brick of replica set would have different times.
So create the xattr upon successful lookup if the xattr
is not created

Note To Reviewers:
The time attributes used to set xattr is got from successful
lookup. Instead of sending the whole iatt over the wire via
setxattr, a structure called mdata_iatt is sent. The mdata_iatt
contains only time attributes.

Backport of:
 &gt; Patch:  https://review.gluster.org/22936
 &gt; Change-Id: I5e535631ddef04195361ae0364336410a2895dd4
 &gt; BUG: 1593542
 &gt; Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;

Change-Id: I5e535631ddef04195361ae0364336410a2895dd4
updates: bz#1733885
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/snapview-server: obtain the list of snapshots inside the lock</title>
<updated>2019-08-01T10:45:16+00:00</updated>
<author>
<name>Raghavendra Bhat</name>
<email>raghavendra@redhat.com</email>
</author>
<published>2019-07-02T20:50:23+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=f51491e684f79c87ee1f7b406f8c748d7e2bf8d7'/>
<id>f51491e684f79c87ee1f7b406f8c748d7e2bf8d7</id>
<content type='text'>
The current list of snapshots from priv-&gt;dirents is obtained outside
the lock.

Change-Id: I8876ec0a38308da5db058397382fbc82cc7ac177
Fixes: bz#1731509
(cherry picked from commit 8e795617fd6f5193d0d52a336059ce1a28108c0e)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current list of snapshots from priv-&gt;dirents is obtained outside
the lock.

Change-Id: I8876ec0a38308da5db058397382fbc82cc7ac177
Fixes: bz#1731509
(cherry picked from commit 8e795617fd6f5193d0d52a336059ce1a28108c0e)
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: Fix directory perms during selfheal</title>
<updated>2019-07-29T06:41:59+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2019-06-04T09:21:44+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=481c3c71c428c31ac84e2e1acf21b0ae07e4e32d'/>
<id>481c3c71c428c31ac84e2e1acf21b0ae07e4e32d</id>
<content type='text'>
Fixed a bug in the revalidate code path that wiped out
directory permissions if no mds subvol was found.

Backport of: 
&gt; Change-Id: I8b4239ffee7001493c59d4032a2d3062586ea115
&gt; fixes: bz#1716830
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;

Change-Id: I8b4239ffee7001493c59d4032a2d3062586ea115
fixes: bz#1716848
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed a bug in the revalidate code path that wiped out
directory permissions if no mds subvol was found.

Backport of: 
&gt; Change-Id: I8b4239ffee7001493c59d4032a2d3062586ea115
&gt; fixes: bz#1716830
&gt; Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;

Change-Id: I8b4239ffee7001493c59d4032a2d3062586ea115
fixes: bz#1716848
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterd: do not mark skip_locking as true for geo-rep operations</title>
<updated>2019-07-24T14:15:03+00:00</updated>
<author>
<name>Sanju Rakonde</name>
<email>srakonde@redhat.com</email>
</author>
<published>2019-07-12T10:58:04+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=c3aab13faa451d368ef5044fea945cb2d5597434'/>
<id>c3aab13faa451d368ef5044fea945cb2d5597434</id>
<content type='text'>
We need to send the commit req to peers in case of geo-rep
operations even though it is a no volname operation. In commit
phase peers try to set the txn_opinfo which will fail because
it is a no volname operation where we don't require a commit
phase. We mark skip_locking as true for no volname operations,
but we have to give an exception to geo-rep operations, so that
they can set txn_opinfo in commit phase.

Please refer to detailed RCA at the bug: 1730545

fixes: bz#1730545

Cherrypicked from https://review.gluster.org/#/c/glusterfs/+/23034/

&gt; Change-Id: I9f2478b12a281f6e052035c0563c40543493a3fc
&gt; Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;

Change-Id: I9f2478b12a281f6e052035c0563c40543493a3fc
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need to send the commit req to peers in case of geo-rep
operations even though it is a no volname operation. In commit
phase peers try to set the txn_opinfo which will fail because
it is a no volname operation where we don't require a commit
phase. We mark skip_locking as true for no volname operations,
but we have to give an exception to geo-rep operations, so that
they can set txn_opinfo in commit phase.

Please refer to detailed RCA at the bug: 1730545

fixes: bz#1730545

Cherrypicked from https://review.gluster.org/#/c/glusterfs/+/23034/

&gt; Change-Id: I9f2478b12a281f6e052035c0563c40543493a3fc
&gt; Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;

Change-Id: I9f2478b12a281f6e052035c0563c40543493a3fc
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/snapview-server: use the same volfile server for gfapi options</title>
<updated>2019-07-16T05:00:24+00:00</updated>
<author>
<name>Raghavendra Bhat</name>
<email>raghavendra@redhat.com</email>
</author>
<published>2019-06-25T14:51:33+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=99977a7b694f6ee137e7b749f04e0cc744dd17e3'/>
<id>99977a7b694f6ee137e7b749f04e0cc744dd17e3</id>
<content type='text'>
snapview server xlator makes use of "localhost" as the volfile server while
initing the new glfs instance to talk to a snapshot. While localhost is fine,
better use the same volfile server that was used to start the snapshot
daemon containing the snapview-server xlator.

Change-Id: I4485d39b0e3d066f481adc6958ace53ea33237f7
fixes: bz#1727984
Signed-off-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
(cherry picked from commit 36f6e6df0ff15d0464b869803710adca2b65e8ba)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
snapview server xlator makes use of "localhost" as the volfile server while
initing the new glfs instance to talk to a snapshot. While localhost is fine,
better use the same volfile server that was used to start the snapshot
daemon containing the snapview-server xlator.

Change-Id: I4485d39b0e3d066f481adc6958ace53ea33237f7
fixes: bz#1727984
Signed-off-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
(cherry picked from commit 36f6e6df0ff15d0464b869803710adca2b65e8ba)
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterd: add GF_TRANSPORT_BOTH_TCP_RDMA in glusterd_get_gfproxy_client_volfile</title>
<updated>2019-07-16T04:56:14+00:00</updated>
<author>
<name>Atin Mukherjee</name>
<email>amukherj@redhat.com</email>
</author>
<published>2019-06-11T04:22:06+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=d06f676a3af0fc09074699ead25a4872d0a6020d'/>
<id>d06f676a3af0fc09074699ead25a4872d0a6020d</id>
<content type='text'>
... with out which volume creation fails with "volume create: &lt;xyz&gt;: failed:
Failed to create volume files"

&gt;Fixes: bz#1716812
&gt;Change-Id: I2f4c2c6d5290f066b54e1c1db19e25db9937bedb
&gt;Signed-off-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;

Fixes: bz#1721105
Change-Id: I2f4c2c6d5290f066b54e1c1db19e25db9937bedb
Signed-off-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... with out which volume creation fails with "volume create: &lt;xyz&gt;: failed:
Failed to create volume files"

&gt;Fixes: bz#1716812
&gt;Change-Id: I2f4c2c6d5290f066b54e1c1db19e25db9937bedb
&gt;Signed-off-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;

Fixes: bz#1721105
Change-Id: I2f4c2c6d5290f066b54e1c1db19e25db9937bedb
Signed-off-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mgmt/glusterd: Fix a memory leak when peer detach fails</title>
<updated>2019-07-16T04:55:17+00:00</updated>
<author>
<name>Vijay Bellur</name>
<email>vbellur@redhat.com</email>
</author>
<published>2019-02-27T21:38:33+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=2d36dea60d079092cb9af0e9be1eb7954a4e32ee'/>
<id>2d36dea60d079092cb9af0e9be1eb7954a4e32ee</id>
<content type='text'>
Dictionary object is not being unref'd when an error happens
in __glusterd_handle_cli_deprobe(). This patch addresses that problem.

Change-Id: I11e1f92d06dc9edd1260845256f435ea31ef1a87
fixes: bz#1683815
Signed-off-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
(cherry picked from commit 16b4936696c8b602243513fbde0b20a1e8417432)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Dictionary object is not being unref'd when an error happens
in __glusterd_handle_cli_deprobe(). This patch addresses that problem.

Change-Id: I11e1f92d06dc9edd1260845256f435ea31ef1a87
fixes: bz#1683815
Signed-off-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
(cherry picked from commit 16b4936696c8b602243513fbde0b20a1e8417432)
</pre>
</div>
</content>
</entry>
</feed>
