<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/storage/posix/src, branch v9dev</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>posix: fix GF_VALIDATE_OR_GOTO(this-&gt;name, this, out)</title>
<updated>2020-04-16T11:05:19+00:00</updated>
<author>
<name>Sanju Rakonde</name>
<email>srakonde@redhat.com</email>
</author>
<published>2019-12-25T17:26:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=453861088dfabde2c41bec674bed2a6886b4ed37'/>
<id>453861088dfabde2c41bec674bed2a6886b4ed37</id>
<content type='text'>
Remove GF_VALIDATE_OR_GOTO(this-&gt;name, this, out) when this
is passed as an argument and is checked for NULL in the caller
itself.

GF_VALIDATE_OR_GOTO(this-&gt;name, this, out) is modified to use
xlator name instead of this-&gt;name as we are still verifying
whether this is NULL.

updates: #1000

Change-Id: Ide3180da29d0d4a35b2c5b9a7604fdf2ff4a9ffb
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove GF_VALIDATE_OR_GOTO(this-&gt;name, this, out) when this
is passed as an argument and is checked for NULL in the caller
itself.

GF_VALIDATE_OR_GOTO(this-&gt;name, this, out) is modified to use
xlator name instead of this-&gt;name as we are still verifying
whether this is NULL.

updates: #1000

Change-Id: Ide3180da29d0d4a35b2c5b9a7604fdf2ff4a9ffb
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>posix: Avoid dict_del logs in posix_is_layout_stale while key is NULL</title>
<updated>2020-04-09T04:26:28+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawal@redhat.com</email>
</author>
<published>2020-04-06T16:28:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=18f70e806bcef5a3680462a4dbb7061e5eceee1c'/>
<id>18f70e806bcef5a3680462a4dbb7061e5eceee1c</id>
<content type='text'>
Problem: The key "GF_PREOP_PARENT_KEY" has been populated by dht and
         for non-distribute volume like 1x3 key is not populated so
         posix_is_layout stale throw a message while a file is created

Solution: To avoid a log put a condition before delete a key

Change-Id: I813ee7960633e7f9f5e9ad2f42f288053d9eb71f
Fixes: #1150
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: The key "GF_PREOP_PARENT_KEY" has been populated by dht and
         for non-distribute volume like 1x3 key is not populated so
         posix_is_layout stale throw a message while a file is created

Solution: To avoid a log put a condition before delete a key

Change-Id: I813ee7960633e7f9f5e9ad2f42f288053d9eb71f
Fixes: #1150
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dht - fixing a permission update issue</title>
<updated>2020-04-08T06:57:53+00:00</updated>
<author>
<name>Barak Sason Rofman</name>
<email>bsasonro@redhat.com</email>
</author>
<published>2020-01-15T10:02:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=6917f52e6a9fd65f30f81302f3b84c734950810d'/>
<id>6917f52e6a9fd65f30f81302f3b84c734950810d</id>
<content type='text'>
When bringing back a downed brick and performing lookup from the client
side, the permission on said brick aren't updated on the first lookup,
but only on the second.

This patch modifies permission update logic so the first lookup will
trigger a permission update on the downed brick.

LIMITATIONS OF THE PATCH:
As the choice of source depends on whether the directory has layout or not.
Even the directories on the newly added brick will have layout xattr[zeroed], but the same is not true for a root directory.
Hence, in case in the entire cluster only the newly added bricks are up [and others are down], then any change in permission during this time will be overwritten by the older permissions when the cluster is restarted.

fixes: #999
Change-Id: Ieb70246d41e59f9cae9f70bc203627a433dfbd33
Signed-off-by: Barak Sason Rofman &lt;bsasonro@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When bringing back a downed brick and performing lookup from the client
side, the permission on said brick aren't updated on the first lookup,
but only on the second.

This patch modifies permission update logic so the first lookup will
trigger a permission update on the downed brick.

LIMITATIONS OF THE PATCH:
As the choice of source depends on whether the directory has layout or not.
Even the directories on the newly added brick will have layout xattr[zeroed], but the same is not true for a root directory.
Hence, in case in the entire cluster only the newly added bricks are up [and others are down], then any change in permission during this time will be overwritten by the older permissions when the cluster is restarted.

fixes: #999
Change-Id: Ieb70246d41e59f9cae9f70bc203627a433dfbd33
Signed-off-by: Barak Sason Rofman &lt;bsasonro@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Posix: Optimize posix code to improve file creation</title>
<updated>2020-04-06T10:43:26+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawal@redhat.com</email>
</author>
<published>2019-12-19T03:02:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=f2d90013aaa4652dbcc1e6e3d62a0d31ada89d5d'/>
<id>f2d90013aaa4652dbcc1e6e3d62a0d31ada89d5d</id>
<content type='text'>
Problem: Before executing a fop in POSIX xlator it builds an internal
         path based on GFID.To validate the path it call's (l)stat
         system call and while .glusterfs is heavily loaded kernel takes
         time to lookup inode and due to that performance drops

Solution: In this patch we followed two ways to improve the performance.
          1) Keep open fd specific to first level directory(gfid[0])
             in .glusterfs, it would force to kernel keep the inodes
             from all those files in cache. In case of memory pressure
             kernel won't uncache first level inodes. We need to open
             256 fd's per brick to access the entry faster.
          2) Use at based call's to access relative path to reduce
             path based lookup time.

Note: To verify the patch we have executed kernel untar 100 times on 6
      different clients after enabling metadata group-cache and some
      other option.We were getting more than 20 percent improvement in
      kenel untar after applying the patch.

Credits: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
Change-Id: I1643e6b01ed669b2bb148d02f4e6a8e08da45343
updates: #891
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: Before executing a fop in POSIX xlator it builds an internal
         path based on GFID.To validate the path it call's (l)stat
         system call and while .glusterfs is heavily loaded kernel takes
         time to lookup inode and due to that performance drops

Solution: In this patch we followed two ways to improve the performance.
          1) Keep open fd specific to first level directory(gfid[0])
             in .glusterfs, it would force to kernel keep the inodes
             from all those files in cache. In case of memory pressure
             kernel won't uncache first level inodes. We need to open
             256 fd's per brick to access the entry faster.
          2) Use at based call's to access relative path to reduce
             path based lookup time.

Note: To verify the patch we have executed kernel untar 100 times on 6
      different clients after enabling metadata group-cache and some
      other option.We were getting more than 20 percent improvement in
      kenel untar after applying the patch.

Credits: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
Change-Id: I1643e6b01ed669b2bb148d02f4e6a8e08da45343
updates: #891
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>storage/posix: log the ENOENT errors in posix_pstat</title>
<updated>2020-04-04T08:07:05+00:00</updated>
<author>
<name>Raghavendra Bhat</name>
<email>raghavendra@redhat.com</email>
</author>
<published>2020-03-31T15:25:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=208b6d7b1a4d98e62d4bfa3b342bb78ade078799'/>
<id>208b6d7b1a4d98e62d4bfa3b342bb78ade078799</id>
<content type='text'>
Change-Id: I93f11dae6e4939ab79b0481ead2a4f7bb3085b70
Fixes: #1142
Signed-off-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I93f11dae6e4939ab79b0481ead2a4f7bb3085b70
Fixes: #1142
Signed-off-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Posix: Use simple approach to close fd</title>
<updated>2020-03-20T04:08:42+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawal@redhat.com</email>
</author>
<published>2020-03-12T15:42:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=fb20713b380e1df8d7f9e9df96563be2f9144fd6'/>
<id>fb20713b380e1df8d7f9e9df96563be2f9144fd6</id>
<content type='text'>
Problem: posix_release(dir) functions add the fd's into a ctx-&gt;janitor_fds
         and janitor thread closes the fd's.In brick_mux environment it is
         difficult to handle race condition in janitor threads because brick
         spawns a single janitor thread for all bricks.

Solution: Use synctask to execute posix_release(dir) functions instead of 
          using background a thread to close fds.

Credits: Pranith Karampuri &lt;pkarampu@redhat.com&gt;
Change-Id: Iffb031f0695a7da83d5a2f6bac8863dad225317e
Fixes: bz#1811631
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: posix_release(dir) functions add the fd's into a ctx-&gt;janitor_fds
         and janitor thread closes the fd's.In brick_mux environment it is
         difficult to handle race condition in janitor threads because brick
         spawns a single janitor thread for all bricks.

Solution: Use synctask to execute posix_release(dir) functions instead of 
          using background a thread to close fds.

Credits: Pranith Karampuri &lt;pkarampu@redhat.com&gt;
Change-Id: Iffb031f0695a7da83d5a2f6bac8863dad225317e
Fixes: bz#1811631
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Posix: structs re-aligned and manual padding added</title>
<updated>2020-03-09T14:31:38+00:00</updated>
<author>
<name>Purna Pavan Chandra Aekkaladevi</name>
<email>paekkala@redhat.com</email>
</author>
<published>2019-10-30T07:12:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=c12a7d9bdc3887c4ed43f76a3c7886727a62d0bc'/>
<id>c12a7d9bdc3887c4ed43f76a3c7886727a62d0bc</id>
<content type='text'>
All the structs present inside xlators/storage/posix have been re-aligned
into memory efficient way. Manual padding has been added to remove
compile time padding. This manual padding is for development and
debugging benefits. It lets to use -Wpadded option and raise warnings
from the remaining structs where compile time padding happens.

Change-Id: Ie72c02810803eae29fca435c71aa131a1315b8a8
Updates: bz#1754448
Signed-off-by: Purna Pavan Chandra Aekkaladevi &lt;paekkala@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All the structs present inside xlators/storage/posix have been re-aligned
into memory efficient way. Manual padding has been added to remove
compile time padding. This manual padding is for development and
debugging benefits. It lets to use -Wpadded option and raise warnings
from the remaining structs where compile time padding happens.

Change-Id: Ie72c02810803eae29fca435c71aa131a1315b8a8
Updates: bz#1754448
Signed-off-by: Purna Pavan Chandra Aekkaladevi &lt;paekkala@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dht: Fix stale-layout and create issue</title>
<updated>2020-02-09T02:51:31+00:00</updated>
<author>
<name>Susant Palai</name>
<email>spalai@redhat.com</email>
</author>
<published>2019-12-27T06:36:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=c87817495b3c5c36dcca9d157e9313b7d3195eed'/>
<id>c87817495b3c5c36dcca9d157e9313b7d3195eed</id>
<content type='text'>
Problem: With lookup-optimize set to on by default, a client with
stale-layout can create a new file on a wrong subvol. This will lead to
possible duplicate files if two different clients attempt to create the
same file with two different layouts.

Solution: Send in-memory layout to be cross checked at posix before
commiting a "create". In case of a mismatch, sync the client layout with
that of the server and attempt the create fop one more time.

test: Manual, testcase(attached)

fixes: bz#1786679
Change-Id: Ife0941f105113f1c572f4363cbcee65e0dd9bd6a
Signed-off-by: Susant Palai &lt;spalai@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: With lookup-optimize set to on by default, a client with
stale-layout can create a new file on a wrong subvol. This will lead to
possible duplicate files if two different clients attempt to create the
same file with two different layouts.

Solution: Send in-memory layout to be cross checked at posix before
commiting a "create". In case of a mismatch, sync the client layout with
that of the server and attempt the create fop one more time.

test: Manual, testcase(attached)

fixes: bz#1786679
Change-Id: Ife0941f105113f1c572f4363cbcee65e0dd9bd6a
Signed-off-by: Susant Palai &lt;spalai@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>posix-entry-ops.c/posix.h: improve GFID_NULL_CHECK_AND_GOTO macro</title>
<updated>2020-01-21T13:49:06+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2019-10-21T17:56:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=d8e685a96170a433dde93a6bc6fb8c07babb01a5'/>
<id>d8e685a96170a433dde93a6bc6fb8c07babb01a5</id>
<content type='text'>
The macro already fetches from the dictionary the gfid-req variable.
Instead of throwing it away, keep it and in 2 cases,
re-use it later.

updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: Id6d42535132805ab69e7e3b802c140b90f2f8958
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The macro already fetches from the dictionary the gfid-req variable.
Instead of throwing it away, keep it and in 2 cases,
re-use it later.

updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: Id6d42535132805ab69e7e3b802c140b90f2f8958
</pre>
</div>
</content>
</entry>
<entry>
<title>xlators/storage: remove duplicated includes</title>
<updated>2020-01-13T17:23:26+00:00</updated>
<author>
<name>Dmitry Antipov</name>
<email>dmantipov@yandex.ru</email>
</author>
<published>2020-01-10T10:44:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=8bfcae18c080c856a7218b0df9e403e2cdb59355'/>
<id>8bfcae18c080c856a7218b0df9e403e2cdb59355</id>
<content type='text'>
Do not include ftw.h twice.

Change-Id: Id9e8d1813aafd890940adcd6883d90fa1b4beaf9
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Updates: bz#1193929
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Do not include ftw.h twice.

Change-Id: Id9e8d1813aafd890940adcd6883d90fa1b4beaf9
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Updates: bz#1193929
</pre>
</div>
</content>
</entry>
</feed>
