<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/features, branch v7.0rc0</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>features/shard: Send correct size when reads are sent beyond file size</title>
<updated>2019-08-21T11:41:58+00:00</updated>
<author>
<name>Krutika Dhananjay</name>
<email>kdhananj@redhat.com</email>
</author>
<published>2019-08-07T06:42:43+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=175b796d08ade751ed4929661f246f33d9bf420f'/>
<id>175b796d08ade751ed4929661f246f33d9bf420f</id>
<content type='text'>
Change-Id: I0cebaaf55c09eb1fb77a274268ff564e871b743b
fixes bz#1740316
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
(cherry picked from commit 51237eda7c4b3846d08c5d24d1e3fe9b7ffba1d4)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I0cebaaf55c09eb1fb77a274268ff564e871b743b
fixes bz#1740316
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
(cherry picked from commit 51237eda7c4b3846d08c5d24d1e3fe9b7ffba1d4)
</pre>
</div>
</content>
</entry>
<entry>
<title>event: rename event_XXX with gf_ prefixed</title>
<updated>2019-08-21T06:13:38+00:00</updated>
<author>
<name>Xiubo Li</name>
<email>xiubli@redhat.com</email>
</author>
<published>2019-07-26T04:34:52+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=acbabe3d916d763a0bb13e7df876cac61ca5b160'/>
<id>acbabe3d916d763a0bb13e7df876cac61ca5b160</id>
<content type='text'>
I hit one crash issue when using the libgfapi.

In the libgfapi it will call glfs_poller() --&gt; event_dispatch()
in file api/src/glfs.c:721, and the event_dispatch() is defined
by libgluster locally, the problem is the name of event_dispatch()
is the extremly the same with the one from libevent package form
the OS.

For example, if a executable program Foo, which will also use and
link the libevent and the libgfapi at the same time, I can hit the
crash, like:

kernel: glfs_glfspoll[68486]: segfault at 1c0 ip 00007fef006fd2b8 sp
00007feeeaffce30 error 4 in libevent-2.0.so.5.1.9[7fef006ed000+46000]

The link for Foo is:
lib_foo_LADD = -levent $(GFAPI_LIBS)
It will crash.

This is because the glfs_poller() is calling the event_dispatch() from
the libevent, not the libglsuter.

The gfapi link info :
GFAPI_LIBS = -lacl -lgfapi -lglusterfs -lgfrpc -lgfxdr -luuid

If I link Foo like:
lib_foo_LADD = $(GFAPI_LIBS) -levent
It will works well without any problem.

And if Foo call one private lib, such as handler_glfs.so, and the
handler_glfs.so will link the GFAPI_LIBS directly, while the Foo won't
and it will dlopen(handler_glfs.so), then the crash will be hit everytime.

The link info will be:
foo_LADD = -levent
libhandler_glfs_LIBADD = $(GFAPI_LIBS)

I can avoid the crash temporarily by linking the GFAPI_LIBS in Foo too like:
foo_LADD = $(GFAPI_LIBS) -levent
libhandler_glfs_LIBADD = $(GFAPI_LIBS)

But this is ugly since the Foo won't use any APIs from the GFAPI_LIBS.

And in some cases when the --as-needed link option is added(on many dists
it is added as default), then the crash is back again, the above workaround
won't work.

Backport of:
&gt; https://review.gluster.org/#/c/glusterfs/+/23110/
&gt; Change-Id: I38f0200b941bd1cff4bf3066fca2fc1f9a5263aa
&gt; Fixes: #699
&gt; Signed-off-by: Xiubo Li &lt;xiubli@redhat.com&gt;

Change-Id: I38f0200b941bd1cff4bf3066fca2fc1f9a5263aa
updates: bz#1740519
Signed-off-by: Xiubo Li &lt;xiubli@redhat.com&gt;
(cherry picked from commit 799edc73c3d4f694c365c6a7c27c9ab8eed5f260)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I hit one crash issue when using the libgfapi.

In the libgfapi it will call glfs_poller() --&gt; event_dispatch()
in file api/src/glfs.c:721, and the event_dispatch() is defined
by libgluster locally, the problem is the name of event_dispatch()
is the extremly the same with the one from libevent package form
the OS.

For example, if a executable program Foo, which will also use and
link the libevent and the libgfapi at the same time, I can hit the
crash, like:

kernel: glfs_glfspoll[68486]: segfault at 1c0 ip 00007fef006fd2b8 sp
00007feeeaffce30 error 4 in libevent-2.0.so.5.1.9[7fef006ed000+46000]

The link for Foo is:
lib_foo_LADD = -levent $(GFAPI_LIBS)
It will crash.

This is because the glfs_poller() is calling the event_dispatch() from
the libevent, not the libglsuter.

The gfapi link info :
GFAPI_LIBS = -lacl -lgfapi -lglusterfs -lgfrpc -lgfxdr -luuid

If I link Foo like:
lib_foo_LADD = $(GFAPI_LIBS) -levent
It will works well without any problem.

And if Foo call one private lib, such as handler_glfs.so, and the
handler_glfs.so will link the GFAPI_LIBS directly, while the Foo won't
and it will dlopen(handler_glfs.so), then the crash will be hit everytime.

The link info will be:
foo_LADD = -levent
libhandler_glfs_LIBADD = $(GFAPI_LIBS)

I can avoid the crash temporarily by linking the GFAPI_LIBS in Foo too like:
foo_LADD = $(GFAPI_LIBS) -levent
libhandler_glfs_LIBADD = $(GFAPI_LIBS)

But this is ugly since the Foo won't use any APIs from the GFAPI_LIBS.

And in some cases when the --as-needed link option is added(on many dists
it is added as default), then the crash is back again, the above workaround
won't work.

Backport of:
&gt; https://review.gluster.org/#/c/glusterfs/+/23110/
&gt; Change-Id: I38f0200b941bd1cff4bf3066fca2fc1f9a5263aa
&gt; Fixes: #699
&gt; Signed-off-by: Xiubo Li &lt;xiubli@redhat.com&gt;

Change-Id: I38f0200b941bd1cff4bf3066fca2fc1f9a5263aa
updates: bz#1740519
Signed-off-by: Xiubo Li &lt;xiubli@redhat.com&gt;
(cherry picked from commit 799edc73c3d4f694c365c6a7c27c9ab8eed5f260)
</pre>
</div>
</content>
</entry>
<entry>
<title>locks/fencing: Address hang while lock preemption</title>
<updated>2019-08-21T06:13:23+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://dev.gluster.org/cgit/glusterfs.git/commit/?id=d89199919265480e43172dd3883c20ee24d46bde'/>
<id>d89199919265480e43172dd3883c20ee24d46bde</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.

&gt; updates: bz#1717824
&gt; Change-Id: Icd04b42bc16cd3d50eaa581ee57233910194f480
&gt; signed-off-by: Susant Palai &lt;spalai@redhat.com&gt;
(backport of https://review.gluster.org/#/c/glusterfs/+/23088/)

fixes: bz#1740077
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.

&gt; updates: bz#1717824
&gt; Change-Id: Icd04b42bc16cd3d50eaa581ee57233910194f480
&gt; signed-off-by: Susant Palai &lt;spalai@redhat.com&gt;
(backport of https://review.gluster.org/#/c/glusterfs/+/23088/)

fixes: bz#1740077
Change-Id: Icd04b42bc16cd3d50eaa581ee57233910194f480
Signed-off-by: Susant Palai &lt;spalai@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/utime: always update ctime at setattr</title>
<updated>2019-08-19T11:27:14+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=87745b612ae3a5a12fbac8162920d12b0dce0a66'/>
<id>87745b612ae3a5a12fbac8162920d12b0dce0a66</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#1739437
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#1739437
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-19T11:27:14+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=df2ccb281c2475150d934a2410f998e88a88d1c6'/>
<id>df2ccb281c2475150d934a2410f998e88a88d1c6</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#1739430
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#1739430
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-19T11:27:14+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=8d2aebf93baed6f8555cd02545d6f95da59cc7f3'/>
<id>8d2aebf93baed6f8555cd02545d6f95da59cc7f3</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#1739430
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#1739430
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-07-24T11:03:57+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=c52ceffa1a1df187d02c38ecbe3fe28267d58cf3'/>
<id>c52ceffa1a1df187d02c38ecbe3fe28267d58cf3</id>
<content type='text'>
The current list of snapshots from priv-&gt;dirents is obtained outside
the lock.

Change-Id: I8876ec0a38308da5db058397382fbc82cc7ac177
Fixes: bz#1731512
(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#1731512
(cherry picked from commit 8e795617fd6f5193d0d52a336059ce1a28108c0e)
</pre>
</div>
</content>
</entry>
<entry>
<title>graph/shd: Use top down approach while cleaning xlator</title>
<updated>2019-07-24T10:26:34+00:00</updated>
<author>
<name>Mohammed Rafi KC</name>
<email>rkavunga@redhat.com</email>
</author>
<published>2019-06-27T13:47:29+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=3c3b6377d6bdea9bffec31da88dd629347617b6d'/>
<id>3c3b6377d6bdea9bffec31da88dd629347617b6d</id>
<content type='text'>
We were cleaning xlator from botton to top, which might
lead to problems when upper xlators trying to access
the xlator object loaded below.

One such scenario is when fd_unref happens as part of the
fini call which might lead to calling the releasedir to
lower xlator. This will lead to invalid mem access

Backport of:https://review.gluster.org/#/c/glusterfs/+/22968/
&gt;Change-Id: I8a6cb619256fab0b0c01a2d564fc88287c4415a0
&gt;Updates: bz#1716695
&gt;Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;

Change-Id: I8a6cb619256fab0b0c01a2d564fc88287c4415a0
Updates: bz#1730229
Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We were cleaning xlator from botton to top, which might
lead to problems when upper xlators trying to access
the xlator object loaded below.

One such scenario is when fd_unref happens as part of the
fini call which might lead to calling the releasedir to
lower xlator. This will lead to invalid mem access

Backport of:https://review.gluster.org/#/c/glusterfs/+/22968/
&gt;Change-Id: I8a6cb619256fab0b0c01a2d564fc88287c4415a0
&gt;Updates: bz#1716695
&gt;Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;

Change-Id: I8a6cb619256fab0b0c01a2d564fc88287c4415a0
Updates: bz#1730229
Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>graph/shd: Use glusterfs_graph_deactivate to free the xl rec</title>
<updated>2019-07-24T10:23:18+00:00</updated>
<author>
<name>Mohammed Rafi KC</name>
<email>rkavunga@redhat.com</email>
</author>
<published>2019-06-24T10:19:04+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=b2531751a186e31d8c0ca3f7e3e44475294931b6'/>
<id>b2531751a186e31d8c0ca3f7e3e44475294931b6</id>
<content type='text'>
We were using glusterfs_graph_fini to free the xl rec from
glusterfs_process_volfp as well as glusterfs_graph_cleanup.

Instead we can use glusterfs_graph_deactivate, which is does
fini as well as other common rec free.

Backportof : https://review.gluster.org/22904
&gt;Change-Id: Ie4a5f2771e5254aa5ed9f00c3672a6d2cc8e4bc1
&gt;Updates: bz#1716695
&gt;Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;

Change-Id: Ie4a5f2771e5254aa5ed9f00c3672a6d2cc8e4bc1
Updates: bz#1730229
Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We were using glusterfs_graph_fini to free the xl rec from
glusterfs_process_volfp as well as glusterfs_graph_cleanup.

Instead we can use glusterfs_graph_deactivate, which is does
fini as well as other common rec free.

Backportof : https://review.gluster.org/22904
&gt;Change-Id: Ie4a5f2771e5254aa5ed9f00c3672a6d2cc8e4bc1
&gt;Updates: bz#1716695
&gt;Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;

Change-Id: Ie4a5f2771e5254aa5ed9f00c3672a6d2cc8e4bc1
Updates: bz#1730229
Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/snapview-server: use the same volfile server for gfapi options</title>
<updated>2019-07-18T13:11:04+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=e5e9a9817cecbd8f2c823e79179d9523b1a04ee3'/>
<id>e5e9a9817cecbd8f2c823e79179d9523b1a04ee3</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#1728391
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#1728391
Signed-off-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
(cherry picked from commit 36f6e6df0ff15d0464b869803710adca2b65e8ba)
</pre>
</div>
</content>
</entry>
</feed>
