<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/features/locks/src/common.c, branch v8.0</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>locks: prevent deletion of locked entries</title>
<updated>2020-06-29T12:51:20+00:00</updated>
<author>
<name>Xavi Hernandez</name>
<email>xhernandez@redhat.com</email>
</author>
<published>2020-06-11T22:06:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=8c1008646ec7e62b33d92184358eb455f7e44350'/>
<id>8c1008646ec7e62b33d92184358eb455f7e44350</id>
<content type='text'>
To keep consistency inside transactions started by locking an entry or
an inode, this change delays the removal of entries that are currently
locked by one or more clients. Once all locks are released, the removal
is processed.

It has also been improved the detection of stale inodes in the locking
code of EC.

Fixes: #990
Change-Id: Ic8ba23d9480f80c7f74e7a310bf8a15922320fd5
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To keep consistency inside transactions started by locking an entry or
an inode, this change delays the removal of entries that are currently
locked by one or more clients. Once all locks are released, the removal
is processed.

It has also been improved the detection of stale inodes in the locking
code of EC.

Fixes: #990
Change-Id: Ic8ba23d9480f80c7f74e7a310bf8a15922320fd5
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>add clean local after grant lock</title>
<updated>2020-04-01T06:34:24+00:00</updated>
<author>
<name>l17zhou</name>
<email>cynthia.zhou@nokia-sbell.com</email>
</author>
<published>2019-12-03T05:43:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=6ef82683064a87c434bd67e2004935281e4c04cc'/>
<id>6ef82683064a87c434bd67e2004935281e4c04cc</id>
<content type='text'>
found by flock test, without correct ref number of fd,
lock will not be correctly released.

Fixes: bz#1779089
Change-Id: I3e466b17c852eb219c8778e43af8ad670a8449cc
Signed-off-by: l17zhou &lt;cynthia.zhou@nokia-sbell.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
found by flock test, without correct ref number of fd,
lock will not be correctly released.

Fixes: bz#1779089
Change-Id: I3e466b17c852eb219c8778e43af8ad670a8449cc
Signed-off-by: l17zhou &lt;cynthia.zhou@nokia-sbell.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/locks: avoid use after freed of frame for blocked lock</title>
<updated>2019-08-20T09:36:17+00:00</updated>
<author>
<name>Kinglong Mee</name>
<email>kinglongmee@gmail.com</email>
</author>
<published>2019-07-18T03:43:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=faaf22bbe899b0f64b0237398a0d8e3c082f9392'/>
<id>faaf22bbe899b0f64b0237398a0d8e3c082f9392</id>
<content type='text'>
The fop contains blocked lock may use freed frame info when other
unlock fop has unwind the blocked lock.

Because the blocked lock is added to block list in inode lock(or
other lock), after that, when out of the inode lock, the fop
contains the blocked lock should not use it.

Change-Id: Icb309a1cc78380dc982b26d50c18d67e4f2c8915
fixes: bz#1737291
Signed-off-by: Kinglong Mee &lt;mijinlong@horiscale.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The fop contains blocked lock may use freed frame info when other
unlock fop has unwind the blocked lock.

Because the blocked lock is added to block list in inode lock(or
other lock), after that, when out of the inode lock, the fop
contains the blocked lock should not use it.

Change-Id: Icb309a1cc78380dc982b26d50c18d67e4f2c8915
fixes: bz#1737291
Signed-off-by: Kinglong Mee &lt;mijinlong@horiscale.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>locks/fencing: Address hang while lock preemption</title>
<updated>2019-08-02T14:26:40+00:00</updated>
<author>
<name>Susant Palai</name>
<email>spalai@redhat.com</email>
</author>
<published>2019-07-22T09:50:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=d072dc09f5bc6431ba31244cf7e9eba1b6e85229'/>
<id>d072dc09f5bc6431ba31244cf7e9eba1b6e85229</id>
<content type='text'>
The fop_wind_count can go negative when fencing is enabled
on unwind path of the IO leading to hang.

Also changed code so that fop_wind_count needs to be maintained only
till fencing is enabled on the file.

updates: bz#1717824
Change-Id: Icd04b42bc16cd3d50eaa581ee57233910194f480
Signed-off-by: Susant Palai &lt;spalai@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The fop_wind_count can go negative when fencing is enabled
on unwind path of the IO leading to hang.

Also changed code so that fop_wind_count needs to be maintained only
till fencing is enabled on the file.

updates: bz#1717824
Change-Id: Icd04b42bc16cd3d50eaa581ee57233910194f480
Signed-off-by: Susant Palai &lt;spalai@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>across: clang-scan: fix NULL dereferencing warnings</title>
<updated>2019-06-04T10:30:29+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amarts@redhat.com</email>
</author>
<published>2019-05-20T05:41:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=e7aeab3063ac5645136303278b477d7de35266c0'/>
<id>e7aeab3063ac5645136303278b477d7de35266c0</id>
<content type='text'>
All these checks are done after analyzing clang-scan report produced
by the CI job @ https://build.gluster.org/job/clang-scan

updates: bz#1622665
Change-Id: I590305af4ceb779be952974b2a36066ffc4865ca
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All these checks are done after analyzing clang-scan report produced
by the CI job @ https://build.gluster.org/job/clang-scan

updates: bz#1622665
Change-Id: I590305af4ceb779be952974b2a36066ffc4865ca
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>across: coverity fixes</title>
<updated>2019-06-03T04:00:39+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amarts@redhat.com</email>
</author>
<published>2019-05-17T05:34:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=899b2170945c6023b0037fed70b19aa3cc680a22'/>
<id>899b2170945c6023b0037fed70b19aa3cc680a22</id>
<content type='text'>
* locks/posix.c: key was not freed in one of the cases.
* locks/common.c: lock was being free'd out of context.
* nfs/exports: handle case of missing free.
* protocol/client: handle case of entry not freed.
* storage/posix: handle possible case of double free

CID: 1398628, 1400731, 1400732, 1400756, 1124796, 1325526

updates: bz#789278
Change-Id: Ieeaca890288bc4686355f6565f853dc8911344e8
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
Signed-off-by: Sheetal Pamecha &lt;spamecha@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* locks/posix.c: key was not freed in one of the cases.
* locks/common.c: lock was being free'd out of context.
* nfs/exports: handle case of missing free.
* protocol/client: handle case of entry not freed.
* storage/posix: handle possible case of double free

CID: 1398628, 1400731, 1400732, 1400756, 1124796, 1325526

updates: bz#789278
Change-Id: Ieeaca890288bc4686355f6565f853dc8911344e8
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
Signed-off-by: Sheetal Pamecha &lt;spamecha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/locks: error-out {inode,entry}lk fops with all-zero lk-owner</title>
<updated>2019-04-26T06:51:24+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2019-04-01T05:44:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=a9143223c515b82f6382f1372dfbdc0439dba198'/>
<id>a9143223c515b82f6382f1372dfbdc0439dba198</id>
<content type='text'>
Problem:
Sometimes we find that developers forget to assign lk-owner for an
inodelk/entrylk/lk before writing code to wind these fops. locks
xlator at the moment allows this operation. This leads to multiple
threads in the same client being able to get locks on the inode
because lk-owner is same and transport is same. So isolation
with locks can't be achieved.

Fix:
Disallow locks with lk-owner zero.

fixes bz#1624701
Change-Id: I1aadcfbaaa4d49308f7c819505857e201809b3bc
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Sometimes we find that developers forget to assign lk-owner for an
inodelk/entrylk/lk before writing code to wind these fops. locks
xlator at the moment allows this operation. This leads to multiple
threads in the same client being able to get locks on the inode
because lk-owner is same and transport is same. So isolation
with locks can't be achieved.

Fix:
Disallow locks with lk-owner zero.

fixes bz#1624701
Change-Id: I1aadcfbaaa4d49308f7c819505857e201809b3bc
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/locks: fix coverity issues</title>
<updated>2019-04-19T16:08:50+00:00</updated>
<author>
<name>Xavi Hernandez</name>
<email>xhernandez@redhat.com</email>
</author>
<published>2019-04-17T06:58:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=02a7a9ef1c0703990d6333b8b800a36da04c9f3e'/>
<id>02a7a9ef1c0703990d6333b8b800a36da04c9f3e</id>
<content type='text'>
This patch fixes the following NULL dereferences identified by Coverity:

  * CID 1398619
  * CID 1398621
  * CID 1398623
  * CID 1398625
  * CID 1398626

Change-Id: Id6af0d7cba0bb3346005376bc27180e8476255a4
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 NULL dereferences identified by Coverity:

  * CID 1398619
  * CID 1398621
  * CID 1398623
  * CID 1398625
  * CID 1398626

Change-Id: Id6af0d7cba0bb3346005376bc27180e8476255a4
Updates: bz#789278
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "features/locks: error-out {inode,entry}lk fops with all-zero lk-owner"</title>
<updated>2019-04-17T08:17:29+00:00</updated>
<author>
<name>Atin Mukherjee</name>
<email>amukherj@redhat.com</email>
</author>
<published>2019-04-16T16:44:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=785f3276d2e325a991b64aed66a326ea95fffef3'/>
<id>785f3276d2e325a991b64aed66a326ea95fffef3</id>
<content type='text'>
This reverts commit 3883887427a7f2dc458a9773e05f7c8ce8e62301 as it has
broken sdfs-sanity.t.

Updates: bz#1624701
Change-Id: Icb2b0d6bfcce4d556f1cd0f11695c03ffc138736
Signed-off-by: Atin Mukherjee  &lt;amukherj@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 3883887427a7f2dc458a9773e05f7c8ce8e62301 as it has
broken sdfs-sanity.t.

Updates: bz#1624701
Change-Id: Icb2b0d6bfcce4d556f1cd0f11695c03ffc138736
Signed-off-by: Atin Mukherjee  &lt;amukherj@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
