<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/storage, branch v6.4</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>[RFC] change get_real_filename implementation to use ENOATTR instead of ENOENT</title>
<updated>2019-07-04T05:53:23+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=fb93da37914458996987665d8e10f7ef87772133'/>
<id>fb93da37914458996987665d8e10f7ef87772133</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

Backport of:
&gt; Change-Id: I971b427ab8410636d5d201157d9af70e0d075b67
&gt; fixes: bz#1722977
&gt; Signed-off-by: Michael Adam &lt;obnox@samba.org&gt;

Change-Id: I971b427ab8410636d5d201157d9af70e0d075b67
fixes: bz#1723659
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

Backport of:
&gt; Change-Id: I971b427ab8410636d5d201157d9af70e0d075b67
&gt; fixes: bz#1722977
&gt; Signed-off-by: Michael Adam &lt;obnox@samba.org&gt;

Change-Id: I971b427ab8410636d5d201157d9af70e0d075b67
fixes: bz#1723659
Signed-off-by: Michael Adam &lt;obnox@samba.org&gt;
(cherry picked from commit dc1b87fcfef08c9497b0c02b2410c9d18bbc2dba)
</pre>
</div>
</content>
</entry>
<entry>
<title>features/shard: Fix block-count accounting upon truncate to lower size</title>
<updated>2019-07-03T11:16:10+00:00</updated>
<author>
<name>Krutika Dhananjay</name>
<email>kdhananj@redhat.com</email>
</author>
<published>2019-05-08T07:30:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=25e4a1249f3904a2a918194541566e3cda512c6b'/>
<id>25e4a1249f3904a2a918194541566e3cda512c6b</id>
<content type='text'>
Backport of:
&gt; BUG: bz#1705884
&gt; Change-Id: I9128a192e9bf8c3c3a959e96b7400879d03d7c53
&gt; Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;

The way delta_blocks is computed in shard is incorrect, when a file
is truncated to a lower size. The accounting only considers change
in size of the last of the truncated shards.

FIX:

Get the block-count of each shard just before an unlink at posix in
xdata.  Their summation plus the change in size of last shard
(from an actual truncate) is used to compute delta_blocks which is
used in the xattrop for size update.

Change-Id: I9128a192e9bf8c3c3a959e96b7400879d03d7c53
fixes: bz#1716871
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
(cherry picked from commit 400b66d568ad18fefcb59949d1f8368d487b9a80)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Backport of:
&gt; BUG: bz#1705884
&gt; Change-Id: I9128a192e9bf8c3c3a959e96b7400879d03d7c53
&gt; Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;

The way delta_blocks is computed in shard is incorrect, when a file
is truncated to a lower size. The accounting only considers change
in size of the last of the truncated shards.

FIX:

Get the block-count of each shard just before an unlink at posix in
xdata.  Their summation plus the change in size of last shard
(from an actual truncate) is used to compute delta_blocks which is
used in the xattrop for size update.

Change-Id: I9128a192e9bf8c3c3a959e96b7400879d03d7c53
fixes: bz#1716871
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
(cherry picked from commit 400b66d568ad18fefcb59949d1f8368d487b9a80)
</pre>
</div>
</content>
</entry>
<entry>
<title>posix : add posix_set_ctime() in posix_ftruncate()</title>
<updated>2019-07-03T06:39:17+00:00</updated>
<author>
<name>Jiffin Tony Thottan</name>
<email>jthottan@redhat.com</email>
</author>
<published>2019-06-26T10:28:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=1c32880f7af41dcd7dc4fcc38f5e8f1619de6ce1'/>
<id>1c32880f7af41dcd7dc4fcc38f5e8f1619de6ce1</id>
<content type='text'>
&gt;Backport of https://review.gluster.org/#/c/glusterfs/+/22948/
&gt;Change-Id: I0cb5320fea71306e0283509ae47024f23874b53b
&gt;fixes: bz#1723761

Change-Id: I0cb5320fea71306e0283509ae47024f23874b53b
fixes: bz#1724558
Signed-off-by: Jiffin Tony Thottan &lt;jthottan@redhat.com&gt;
(cherry picked from commit 7d8be567f2f904fc74d0990ebce2e8afbedab918)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
&gt;Backport of https://review.gluster.org/#/c/glusterfs/+/22948/
&gt;Change-Id: I0cb5320fea71306e0283509ae47024f23874b53b
&gt;fixes: bz#1723761

Change-Id: I0cb5320fea71306e0283509ae47024f23874b53b
fixes: bz#1724558
Signed-off-by: Jiffin Tony Thottan &lt;jthottan@redhat.com&gt;
(cherry picked from commit 7d8be567f2f904fc74d0990ebce2e8afbedab918)
</pre>
</div>
</content>
</entry>
<entry>
<title>posix/ctime: Fix ctime upgrade issue</title>
<updated>2019-07-02T07:40:33+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2019-06-13T10:53:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=b7b76714691d464b09a6363ccc2783080cb17ea2'/>
<id>b7b76714691d464b09a6363ccc2783080cb17ea2</id>
<content type='text'>
Problem:
On a EC volume, during upgrade from the older version where
ctime feature is not enabled(or not present) to the newer
version where the ctime feature is available (enabled default),
the self heal hangs and doesn't complete.

Cause:
The ctime feature has both client side code (utime) and
server side code (posix). The feature is driven from client.
Only if the client side sets the time in the frame, should
the server side sets the time attributes in xattr. But posix
setattr/fseattr was not doing that. When one of the server
nodes is updated, since ctime is enabled by default, it
starts setting xattr on setattr/fseattr on the updated node/brick.

On a EC volume the first two updated nodes(bricks) are not a
problem because there are 4 other bricks with consistent data.
However once the third brick is updated, the new attribute(mdata xattr)
will cause an inconsistency on metadata on 3 bricks, which
prevents the file to be repaired.

Fix:
Don't create mdata xattr with utimes/utimensat system call.
Only update if already present.

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

Change-Id: Ieacedecb8a738bb437283ef3e0f042fd49dc4c8c
fixes: bz#1722805
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
On a EC volume, during upgrade from the older version where
ctime feature is not enabled(or not present) to the newer
version where the ctime feature is available (enabled default),
the self heal hangs and doesn't complete.

Cause:
The ctime feature has both client side code (utime) and
server side code (posix). The feature is driven from client.
Only if the client side sets the time in the frame, should
the server side sets the time attributes in xattr. But posix
setattr/fseattr was not doing that. When one of the server
nodes is updated, since ctime is enabled by default, it
starts setting xattr on setattr/fseattr on the updated node/brick.

On a EC volume the first two updated nodes(bricks) are not a
problem because there are 4 other bricks with consistent data.
However once the third brick is updated, the new attribute(mdata xattr)
will cause an inconsistency on metadata on 3 bricks, which
prevents the file to be repaired.

Fix:
Don't create mdata xattr with utimes/utimensat system call.
Only update if already present.

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

Change-Id: Ieacedecb8a738bb437283ef3e0f042fd49dc4c8c
fixes: bz#1722805
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctime: Fix log repeated logging during open</title>
<updated>2019-05-08T13:57:14+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2019-04-19T06:04:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=b2c6983d0c9eb980024743d8f9825bb4dcd44b6a'/>
<id>b2c6983d0c9eb980024743d8f9825bb4dcd44b6a</id>
<content type='text'>
The log "posix set mdata failed, No ctime" logged repeatedly
after the fix [1]. Those could be internal fops. This patch
fixes the same.

[1] https://review.gluster.org/22540

Backport of:
 &gt; Patch: https://review.gluster.org/#/c/glusterfs/+/22591/
 &gt; BUG:1701457
 &gt; Change-Id: I42799a90b976982cedb0ca11fa224d555eb05650
 &gt; Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
(cherry picked from commit 2d39572821306496c96797f4d122f8200aae4585)

fixes: bz#1702734
Change-Id: I42799a90b976982cedb0ca11fa224d555eb05650
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The log "posix set mdata failed, No ctime" logged repeatedly
after the fix [1]. Those could be internal fops. This patch
fixes the same.

[1] https://review.gluster.org/22540

Backport of:
 &gt; Patch: https://review.gluster.org/#/c/glusterfs/+/22591/
 &gt; BUG:1701457
 &gt; Change-Id: I42799a90b976982cedb0ca11fa224d555eb05650
 &gt; Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
(cherry picked from commit 2d39572821306496c96797f4d122f8200aae4585)

fixes: bz#1702734
Change-Id: I42799a90b976982cedb0ca11fa224d555eb05650
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>posix/ctime: Fix stat(time attributes) inconsistency during readdirp</title>
<updated>2019-04-16T10:57:12+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2019-04-09T12:53:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=80d2dae631369d2e4b5e5f4aa0a102b541c22ad5'/>
<id>80d2dae631369d2e4b5e5f4aa0a102b541c22ad5</id>
<content type='text'>
Problem:
   Creation of tar file on gluster volume throws warning
'file changed as we read it'

Cause:
   During readdirp, for few of the files whose inode is not
present, time attributes were served from backend. This caused
the ctime of few files to be different between before readdir
and after readdir by tar.

Solution:
  If ctime feature is enabled and inode is not present, don't
serve the time attributes from backend file, serve it from xattr.

Backport of:
&gt; Patch: https://review.gluster.org/22540
&gt; BUG: 1698078
&gt; Change-Id: I427ef865f97399475faf5aa6ca495f7e317603ae
&gt; Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
(cherry picked from commit c56f102da21c5b69e656a055aaf736281596284d)

fixes: bz#1699703
Change-Id: I427ef865f97399475faf5aa6ca495f7e317603ae
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
   Creation of tar file on gluster volume throws warning
'file changed as we read it'

Cause:
   During readdirp, for few of the files whose inode is not
present, time attributes were served from backend. This caused
the ctime of few files to be different between before readdir
and after readdir by tar.

Solution:
  If ctime feature is enabled and inode is not present, don't
serve the time attributes from backend file, serve it from xattr.

Backport of:
&gt; Patch: https://review.gluster.org/22540
&gt; BUG: 1698078
&gt; Change-Id: I427ef865f97399475faf5aa6ca495f7e317603ae
&gt; Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
(cherry picked from commit c56f102da21c5b69e656a055aaf736281596284d)

fixes: bz#1699703
Change-Id: I427ef865f97399475faf5aa6ca495f7e317603ae
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>afr/self-heal:Fix wrong type checking</title>
<updated>2019-01-24T12:16:50+00:00</updated>
<author>
<name>Ravishankar N</name>
<email>ravishankar@redhat.com</email>
</author>
<published>2019-01-24T06:44:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=06061aaa447f03e2522483d02525619ebc9854db'/>
<id>06061aaa447f03e2522483d02525619ebc9854db</id>
<content type='text'>
gf_dirent struct has d_type variable which should check
with DT_DIR istead of IA_IFDIR or IA_IFDIR has to compare
with entry-&gt;d_stat.ia_type

Change-Id: Idf1059ce2a590734bc5b6adaad73604d9a708804
updates: bz#1653359
Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gf_dirent struct has d_type variable which should check
with DT_DIR istead of IA_IFDIR or IA_IFDIR has to compare
with entry-&gt;d_stat.ia_type

Change-Id: Idf1059ce2a590734bc5b6adaad73604d9a708804
updates: bz#1653359
Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>posix: Change data type to dump nr_files to statedump</title>
<updated>2019-01-23T03:16:08+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawal@redhat.com</email>
</author>
<published>2019-01-22T12:31:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=86d4eac6c6f2d774a579ef134f6526f75504c46e'/>
<id>86d4eac6c6f2d774a579ef134f6526f75504c46e</id>
<content type='text'>
Problem: In commit 2261e444a47ffffb5d64305efceee1d5a734cd75
         wrong data type of nr_files was changed to dump
         nr_files to statedump so build is failing on 32bit
         environment

Solution: Change data type to avoid errors

Change-Id: Ifb4b19feda6e0e56d110b23351e7a0efd5bfa29b
fixes: bz#1657607
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: In commit 2261e444a47ffffb5d64305efceee1d5a734cd75
         wrong data type of nr_files was changed to dump
         nr_files to statedump so build is failing on 32bit
         environment

Solution: Change data type to avoid errors

Change-Id: Ifb4b19feda6e0e56d110b23351e7a0efd5bfa29b
fixes: bz#1657607
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>posix: fix coverity issue</title>
<updated>2019-01-21T04:26:37+00:00</updated>
<author>
<name>Iraj Jamali</name>
<email>ijamali@redhat.com</email>
</author>
<published>2019-01-07T09:49:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=11aaecccad03d5803dc7be63c3e36af75da8126d'/>
<id>11aaecccad03d5803dc7be63c3e36af75da8126d</id>
<content type='text'>
Logically dead code

CID: 1398468
Updates: bz#789278

Change-Id: I8713a0c51777eb64e617d00ab72fd1db4994b6ab
Signed-off-by: Iraj Jamali &lt;ijamali@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Logically dead code

CID: 1398468
Updates: bz#789278

Change-Id: I8713a0c51777eb64e617d00ab72fd1db4994b6ab
Signed-off-by: Iraj Jamali &lt;ijamali@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>posix: Convert several posix_private members to gf_atomic</title>
<updated>2019-01-15T11:52:22+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawal@redhat.com</email>
</author>
<published>2018-12-10T05:44:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=2261e444a47ffffb5d64305efceee1d5a734cd75'/>
<id>2261e444a47ffffb5d64305efceee1d5a734cd75</id>
<content type='text'>
Change-Id: I629698d8ddf6f15428880bdc1501d36bc37b8ebb
fixes: bz#1657607
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I629698d8ddf6f15428880bdc1501d36bc37b8ebb
fixes: bz#1657607
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
