<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/cluster/dht, branch v7.4</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>cluster/dht: Correct fd processing loop</title>
<updated>2019-11-26T06:46:32+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2019-11-07T03:25:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=0520a943c3a5192d2cc92540ddeaf641093ff6af'/>
<id>0520a943c3a5192d2cc92540ddeaf641093ff6af</id>
<content type='text'>
The fd processing loops in the
dht_migration_complete_check_task and the
dht_rebalance_inprogress_task functions were unsafe
and could cause an open to be sent on an already freed
fd. This has been fixed.

Change-Id: I0a3c7d2fba314089e03dfd704f9dceb134749540
fixes: bz#1769315
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The fd processing loops in the
dht_migration_complete_check_task and the
dht_rebalance_inprogress_task functions were unsafe
and could cause an open to be sent on an already freed
fd. This has been fixed.

Change-Id: I0a3c7d2fba314089e03dfd704f9dceb134749540
fixes: bz#1769315
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dht: Rebalance causing IO Error - File descriptor in bad state</title>
<updated>2019-11-13T04:57:32+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawal@redhat.com</email>
</author>
<published>2019-10-14T10:12:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=7767d14699999dfb82c690b911e83b698b820e19'/>
<id>7767d14699999dfb82c690b911e83b698b820e19</id>
<content type='text'>
Problem : When a file is migrated, dht attempts to re-open all open
          fds on the new cached subvol. Earlier, if dht had not opened the fd,
          the client xlator would be unable to find the remote fd and would
          fall back to using an anon fd for the fop. That behavior changed with
          https://review.gluster.org/#/c/glusterfs/+/15804, causing fops to fail
          with EBADFD if the fd was not available on the cached subvol.
          The client xlator returns EBADFD if the remote fd is not found but
          dht only checks for EBADF before re-opening fds on the new cached subvol.

Solution: Handle EBADFD at dht code path to avoid the issue

&gt; Change-Id: I43c51995cdd48d05b12e4b2889c8dbe2bb2a72d8
&gt; Fixes: bz#1758579
&gt; (cherry picked from commit 9314a9fbf487614c736cf6c4c1b93078d37bb9df)
&gt; (Reviewed on upstream link https://review.gluster.org/23518)

Change-Id: I43c51995cdd48d05b12e4b2889c8dbe2bb2a72d8
Fixes: bz#1761910
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem : When a file is migrated, dht attempts to re-open all open
          fds on the new cached subvol. Earlier, if dht had not opened the fd,
          the client xlator would be unable to find the remote fd and would
          fall back to using an anon fd for the fop. That behavior changed with
          https://review.gluster.org/#/c/glusterfs/+/15804, causing fops to fail
          with EBADFD if the fd was not available on the cached subvol.
          The client xlator returns EBADFD if the remote fd is not found but
          dht only checks for EBADF before re-opening fds on the new cached subvol.

Solution: Handle EBADFD at dht code path to avoid the issue

&gt; Change-Id: I43c51995cdd48d05b12e4b2889c8dbe2bb2a72d8
&gt; Fixes: bz#1758579
&gt; (cherry picked from commit 9314a9fbf487614c736cf6c4c1b93078d37bb9df)
&gt; (Reviewed on upstream link https://review.gluster.org/23518)

Change-Id: I43c51995cdd48d05b12e4b2889c8dbe2bb2a72d8
Fixes: bz#1761910
</pre>
</div>
</content>
</entry>
<entry>
<title>ctime/rebalance: Heal ctime xattr on directory during rebalance</title>
<updated>2019-09-16T10:54:21+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2019-07-29T13:00:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=0a2870b33d5d0a3cded21ac1e3071e3fde81bbb6'/>
<id>0a2870b33d5d0a3cded21ac1e3071e3fde81bbb6</id>
<content type='text'>
After add-brick and rebalance, the ctime xattr is not present
on rebalanced directories on new brick. This patch fixes the
same.

Note that ctime still doesn't support consistent time across
distribute sub-volume.

This patch also fixes the in-memory inconsistency of time attributes
when metadata is self healed.

Backport of:

 &gt; Patch: https://review.gluster.org/23127/
 &gt; Change-Id: Ia20506f1839021bf61d4753191e7dc34b31bb2df
 &gt; BUG: 1734026
 &gt; Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
(cherry picked from commit 304640e55c0f3c6d15f4e230dc6376e4f5020fea)

Change-Id: Ia20506f1839021bf61d4753191e7dc34b31bb2df
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
fixes: bz#1752429
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After add-brick and rebalance, the ctime xattr is not present
on rebalanced directories on new brick. This patch fixes the
same.

Note that ctime still doesn't support consistent time across
distribute sub-volume.

This patch also fixes the in-memory inconsistency of time attributes
when metadata is self healed.

Backport of:

 &gt; Patch: https://review.gluster.org/23127/
 &gt; Change-Id: Ia20506f1839021bf61d4753191e7dc34b31bb2df
 &gt; BUG: 1734026
 &gt; Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
(cherry picked from commit 304640e55c0f3c6d15f4e230dc6376e4f5020fea)

Change-Id: Ia20506f1839021bf61d4753191e7dc34b31bb2df
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
fixes: bz#1752429
</pre>
</div>
</content>
</entry>
<entry>
<title>[RFC] change get_real_filename implementation to use ENOATTR instead of ENOENT</title>
<updated>2019-09-03T13:21:37+00:00</updated>
<author>
<name>Michael Adam</name>
<email>obnox@samba.org</email>
</author>
<published>2019-06-20T11:09:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=8e0e1a5d7c386ed900070836031ba9a84e84dd67'/>
<id>8e0e1a5d7c386ed900070836031ba9a84e84dd67</id>
<content type='text'>
get_real_filename is implemented as a virtual extended attribute to help
Samba implement the case-insensitive but case preserving SMB protocol
more efficiently. It is implemented as a getxattr call on the parent directory
with the virtual key of "get_real_filename:&lt;entryname&gt;" by looking for a
spelling with different case for the provided file/dir name (&lt;entryname&gt;)
and returning this correct spelling as a result if the entry is found.
Originally (05aaec645a6262d431486eb5ac7cd702646cfcfb), the
implementation used the ENOENT errno to return the authoritative answer
that &lt;entryname&gt; does not exist in any case folding.

Now this implementation is actually a violation or misuse of the defined
API for the getxattr call which returns ENOENT for the case that the dir
that the call is made against does not exist and ENOATTR (or the synonym
ENODATA) for the case that the xattr does not exist.

This was not a problem until the gluster fuse-bridge was changed
to do map ENOENT to ESTALE in 59629f1da9dca670d5dcc6425f7f89b3e96b46bf,
after which we the getxattr call for get_real_filename returned an
ESTALE instead of ENOENT breaking the expectation in Samba.

It is an independent problem that ESTALE should not leak out to user
space but is intended to trigger retries between fuse and gluster.
But nevertheless, the semantics seem to be incorrect here and should
be changed.

This patch changes the implementation of the get_real_filename virtual
xattr to correctly return ENOATTR instead of ENOENT if the file/directory
being looked up is not found.

The Samba glusterfs_fuse vfs module which takes advantage of the
get_real_filename over a fuse mount will receive a corresponding change
to map ENOATTR to ENOENT. Without this change, it will still work
correctly, but the performance optimization for nonexisting files is
lost. On the other hand side, this change removes the distinction
between the old not-implemented case and the implemented case.
So Samba changed to treat ENOATTR like ENOENT will not work correctly
any more against old servers that don't implement get_real_filename.
I.e. existing files will be reported as non-existing

Change-Id: I971b427ab8410636d5d201157d9af70e0d075b67
fixes: bz#1745914
Signed-off-by: Michael Adam &lt;obnox@samba.org&gt;
(cherry picked from commit dc1b87fcfef08c9497b0c02b2410c9d18bbc2dba)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
get_real_filename is implemented as a virtual extended attribute to help
Samba implement the case-insensitive but case preserving SMB protocol
more efficiently. It is implemented as a getxattr call on the parent directory
with the virtual key of "get_real_filename:&lt;entryname&gt;" by looking for a
spelling with different case for the provided file/dir name (&lt;entryname&gt;)
and returning this correct spelling as a result if the entry is found.
Originally (05aaec645a6262d431486eb5ac7cd702646cfcfb), the
implementation used the ENOENT errno to return the authoritative answer
that &lt;entryname&gt; does not exist in any case folding.

Now this implementation is actually a violation or misuse of the defined
API for the getxattr call which returns ENOENT for the case that the dir
that the call is made against does not exist and ENOATTR (or the synonym
ENODATA) for the case that the xattr does not exist.

This was not a problem until the gluster fuse-bridge was changed
to do map ENOENT to ESTALE in 59629f1da9dca670d5dcc6425f7f89b3e96b46bf,
after which we the getxattr call for get_real_filename returned an
ESTALE instead of ENOENT breaking the expectation in Samba.

It is an independent problem that ESTALE should not leak out to user
space but is intended to trigger retries between fuse and gluster.
But nevertheless, the semantics seem to be incorrect here and should
be changed.

This patch changes the implementation of the get_real_filename virtual
xattr to correctly return ENOATTR instead of ENOENT if the file/directory
being looked up is not found.

The Samba glusterfs_fuse vfs module which takes advantage of the
get_real_filename over a fuse mount will receive a corresponding change
to map ENOATTR to ENOENT. Without this change, it will still work
correctly, but the performance optimization for nonexisting files is
lost. On the other hand side, this change removes the distinction
between the old not-implemented case and the implemented case.
So Samba changed to treat ENOATTR like ENOENT will not work correctly
any more against old servers that don't implement get_real_filename.
I.e. existing files will be reported as non-existing

Change-Id: I971b427ab8410636d5d201157d9af70e0d075b67
fixes: bz#1745914
Signed-off-by: Michael Adam &lt;obnox@samba.org&gt;
(cherry picked from commit dc1b87fcfef08c9497b0c02b2410c9d18bbc2dba)
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht:  Fixed a memleak in dht_rename_cbk</title>
<updated>2019-08-09T11:40:56+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2019-06-21T03:34:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=2c876346ecc09cbc06beb8eed637a4042b0883f8'/>
<id>2c876346ecc09cbc06beb8eed637a4042b0883f8</id>
<content type='text'>
Fixed a memleak in dht_rename_cbk when creating
a linkto file.

Change-Id: I705adef3cb79e33806520fc2b15558e90e2c211c
fixes: bz#1739337
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 memleak in dht_rename_cbk when creating
a linkto file.

Change-Id: I705adef3cb79e33806520fc2b15558e90e2c211c
fixes: bz#1739337
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: Strip out dht xattrs</title>
<updated>2019-06-19T06:27:32+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2019-06-18T10:03:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=c9097077922647b61570f087d16103f1c7aced99'/>
<id>c9097077922647b61570f087d16103f1c7aced99</id>
<content type='text'>
Some internal DHT xattrs were not being
removed when calling getxattr in pass-through mode.
This has been fixed.

Change-Id: If7e3dbc7b495db88a566bd560888e3e9c167defa
fixes: bz#1721435
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some internal DHT xattrs were not being
removed when calling getxattr in pass-through mode.
This has been fixed.

Change-Id: If7e3dbc7b495db88a566bd560888e3e9c167defa
fixes: bz#1721435
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clang-scan: resolve warning</title>
<updated>2019-06-15T03:55:54+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amarts@redhat.com</email>
</author>
<published>2019-06-14T07:23:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=06ee9e13db03a02b343a5d44cae3c4a5da48bf8a'/>
<id>06ee9e13db03a02b343a5d44cae3c4a5da48bf8a</id>
<content type='text'>
dht-common.c: because there was a 'goto err' before assigning
              the 'local' variable, there is possibility of NULL
              dereference. As the check which was done wouldn't
              ever be true, removed the check.

glusterd-geo-rep.c: a possible path where 'slave_host' could be
             NULL when it gets passed to strcmp() is found.
             strcmp() expects a valid string. Add a NULL check.

Updates: bz#1622665
Change-Id: I64c280bc1beac9a2b109e8fa88f2a5ce8b823c3a
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
dht-common.c: because there was a 'goto err' before assigning
              the 'local' variable, there is possibility of NULL
              dereference. As the check which was done wouldn't
              ever be true, removed the check.

glusterd-geo-rep.c: a possible path where 'slave_host' could be
             NULL when it gets passed to strcmp() is found.
             strcmp() expects a valid string. Add a NULL check.

Updates: bz#1622665
Change-Id: I64c280bc1beac9a2b109e8fa88f2a5ce8b823c3a
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>multiple files: another attempt to remove includes</title>
<updated>2019-06-14T16:50:32+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2019-06-09T10:31:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=0a6fe8551ac9807a8b6ad62241ec8048cf9f9025'/>
<id>0a6fe8551ac9807a8b6ad62241ec8048cf9f9025</id>
<content type='text'>
There are many include statements that are not needed.
A previous more ambitious attempt failed because of *BSD plafrom
(see https://review.gluster.org/#/c/glusterfs/+/21929/ )

Now trying a more conservative reduction.
It does not solve all circular deps that we have, but it
does reduce some of them. There is just too much to handle
reasonably (dht-common.h includes dht-lock.h which includes
dht-common.h ...), but it does reduce the overall number of lines
of include we need to look at in the future to understand and fix
the mess later one.

Change-Id: I550cd001bdefb8be0fe67632f783c0ef6bee3f9f
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are many include statements that are not needed.
A previous more ambitious attempt failed because of *BSD plafrom
(see https://review.gluster.org/#/c/glusterfs/+/21929/ )

Now trying a more conservative reduction.
It does not solve all circular deps that we have, but it
does reduce some of them. There is just too much to handle
reasonably (dht-common.h includes dht-lock.h which includes
dht-common.h ...), but it does reduce the overall number of lines
of include we need to look at in the future to understand and fix
the mess later one.

Change-Id: I550cd001bdefb8be0fe67632f783c0ef6bee3f9f
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: Fix directory perms during selfheal</title>
<updated>2019-06-05T07:20:15+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://git.gluster.org/cgit/glusterfs.git/commit/?id=3949d241e8504b1c5226d0e6f6e06a2a12d8357c'/>
<id>3949d241e8504b1c5226d0e6f6e06a2a12d8357c</id>
<content type='text'>
Fixed a bug in the revalidate code path that wiped out
directory permissions if no mds subvol was found.

Change-Id: I8b4239ffee7001493c59d4032a2d3062586ea115
fixes: bz#1716830
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.

Change-Id: I8b4239ffee7001493c59d4032a2d3062586ea115
fixes: bz#1716830
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix some "Null pointer dereference" coverity issues</title>
<updated>2019-05-26T13:59:13+00:00</updated>
<author>
<name>Xavi Hernandez</name>
<email>xhernandez@redhat.com</email>
</author>
<published>2019-05-22T15:46:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=5d88111a142b3c37e92bdd36699a04fd054d27f4'/>
<id>5d88111a142b3c37e92bdd36699a04fd054d27f4</id>
<content type='text'>
This patch fixes the following CID's:

  * 1124829
  * 1274075
  * 1274083
  * 1274128
  * 1274135
  * 1274141
  * 1274143
  * 1274197
  * 1274205
  * 1274210
  * 1274211
  * 1288801
  * 1398629

Change-Id: Ia7c86cfab3245b20777ffa296e1a59748040f558
Updates: bz#789278
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes the following CID's:

  * 1124829
  * 1274075
  * 1274083
  * 1274128
  * 1274135
  * 1274141
  * 1274143
  * 1274197
  * 1274205
  * 1274210
  * 1274211
  * 1288801
  * 1398629

Change-Id: Ia7c86cfab3245b20777ffa296e1a59748040f558
Updates: bz#789278
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
