<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/nfs, branch master</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>nfs: test case bugs_nfs_bug-1116503.t is crashed</title>
<updated>2020-09-23T08:10:51+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawa@redhat.com</email>
</author>
<published>2020-09-22T11:51:26+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=168142748d4f676071d9253bb536aec734a4a0da'/>
<id>168142748d4f676071d9253bb536aec734a4a0da</id>
<content type='text'>
test case is crashed because GF_ASSERT is failing
in gf_mem_set_acct_info function due to access global
xlator instead of accessing nfs xlator.To avoid the
crash pass nfsx at the time of calling nsm_thread
to set the THIS.

Fixes: #1506
Change-Id: Ifd8afcdf39578aa44332d1b79744a4e9910fe7c6
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
test case is crashed because GF_ASSERT is failing
in gf_mem_set_acct_info function due to access global
xlator instead of accessing nfs xlator.To avoid the
crash pass nfsx at the time of calling nsm_thread
to set the THIS.

Fixes: #1506
Change-Id: Ifd8afcdf39578aa44332d1b79744a4e9910fe7c6
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nfs: Use static api to set static data in dict</title>
<updated>2020-09-14T14:22:51+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2020-09-10T10:06:38+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=a699974a698fdc15a5015dfe53b92055dc74dadd'/>
<id>a699974a698fdc15a5015dfe53b92055dc74dadd</id>
<content type='text'>
fixes: #1477
Change-Id: I8b9f76887f4617f82d09291205e28e3fb5ddc8e0
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fixes: #1477
Change-Id: I8b9f76887f4617f82d09291205e28e3fb5ddc8e0
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfs: add library wrapper for time()</title>
<updated>2020-08-17T11:27:09+00:00</updated>
<author>
<name>Dmitry Antipov</name>
<email>dmantipov@yandex.ru</email>
</author>
<published>2020-08-10T08:45:58+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=9978ceb26327de9545c6e0a4f9230b401e629793'/>
<id>9978ceb26327de9545c6e0a4f9230b401e629793</id>
<content type='text'>
Add thin convenient library wrapper gf_time(),
adjust related users and comments as well.

Change-Id: If8969af2f45ee69c30c3406bce5baa8305fb7f80
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Updates: #1002
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add thin convenient library wrapper gf_time(),
adjust related users and comments as well.

Change-Id: If8969af2f45ee69c30c3406bce5baa8305fb7f80
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Updates: #1002
</pre>
</div>
</content>
</entry>
<entry>
<title>multiple xlators: wording - replace blacklist, whitelist</title>
<updated>2020-07-23T04:19:43+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2020-07-16T09:58:55+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=4f89ec27fadea2ee1ab0f49c29f967e1602fafb9'/>
<id>4f89ec27fadea2ee1ab0f49c29f967e1602fafb9</id>
<content type='text'>
Replace the use of blacklist and whitelist within the code.

No functional changes.

Fixes: #1378
Change-Id: Iaa10e31c3d460f52bfd12da906789fccca5ba4d4
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace the use of blacklist and whitelist within the code.

No functional changes.

Fixes: #1378
Change-Id: Iaa10e31c3d460f52bfd12da906789fccca5ba4d4
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nfs - fixing coverity issues</title>
<updated>2020-07-09T04:25:26+00:00</updated>
<author>
<name>Barak Sason Rofman</name>
<email>bsasonro@redhat.com</email>
</author>
<published>2020-07-05T08:15:16+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=79b1992a7ee220d87b0e53ee8b3f83a436366304'/>
<id>79b1992a7ee220d87b0e53ee8b3f83a436366304</id>
<content type='text'>
Fixing use-after-free issues

Change-Id: I33e599da6b8159695e2c9e989421b5877d7200b5
CID: 1430117, 1430138, 1430116
updates: #1202
Signed-off-by: Barak Sason Rofman &lt;bsasonro@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixing use-after-free issues

Change-Id: I33e599da6b8159695e2c9e989421b5877d7200b5
CID: 1430117, 1430138, 1430116
updates: #1202
Signed-off-by: Barak Sason Rofman &lt;bsasonro@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc: align structs</title>
<updated>2019-10-17T06:34:27+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2019-09-13T18:27:44+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=f737a745b54c2dffe5e3e3203cea1eecf1c7ecf1'/>
<id>f737a745b54c2dffe5e3e3203cea1eecf1c7ecf1</id>
<content type='text'>
squash tens of warnings on padding of structs in afr structures.
The warnings were found by manually added '-Wpadded' to the GCC
command line.

Also made relevant structs and definitions static, where it
was applicable.

Change-Id: Ib71a7e9c6179378f072d796d11172d086c343e53
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>
squash tens of warnings on padding of structs in afr structures.
The warnings were found by manually added '-Wpadded' to the GCC
command line.

Also made relevant structs and definitions static, where it
was applicable.

Change-Id: Ib71a7e9c6179378f072d796d11172d086c343e53
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Multiple files: make root gfid a static variable</title>
<updated>2019-10-14T08:21:52+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2019-10-04T08:17:44+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=704961a39ffd019487e36ac6dbd425399cb85cf2'/>
<id>704961a39ffd019487e36ac6dbd425399cb85cf2</id>
<content type='text'>
In many places we use it, compare to it, etc. It could be a static variable,
as it really doesn't change. I think it's better than initializing to 0
and then doing gfid[15] = 1 or other tricks.

I think there are additional oppportunuties to make more variables static.
This is an attempt at an easy one.

Change-Id: I7f23a30a94056d8f043645371ab841cbd0f90d19
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>
In many places we use it, compare to it, etc. It could be a static variable,
as it really doesn't change. I think it's better than initializing to 0
and then doing gfid[15] = 1 or other tricks.

I think there are additional oppportunuties to make more variables static.
This is an attempt at an easy one.

Change-Id: I7f23a30a94056d8f043645371ab841cbd0f90d19
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nlm: check if nlm4 is initialized in nlm_priv</title>
<updated>2019-08-22T04:54:11+00:00</updated>
<author>
<name>Xie Changlong</name>
<email>xiechanglong@cmss.chinamobile.com</email>
</author>
<published>2019-08-09T06:19:07+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=8b9b8abd4878d3116dda1c7d7b9736cda09691b6'/>
<id>8b9b8abd4878d3116dda1c7d7b9736cda09691b6</id>
<content type='text'>
Otherwise, gnfs will crash in following steps.
1) gluster v set &lt;VOL&gt; nfs.disable off
2) gluster v set &lt;VOL&gt; nfs.nlm off
3) kill -SIGUSR1 &lt;GNFS_PID&gt;
4) gnfs crash with SIGSEGV as follows:
nlm_priv (this=this@entry=0x7f1ad00173b0) at nlm4.c:2742
0x00007f1acf89d29d in nfs_priv (this=0x7f1ad00173b0) at nfs.c:1662
0x00007f1ae2941085 in gf_proc_dump_single_xlator_info (trav=trav@entry=0x7f1ad00173b0) at statedump.c:502
0x00007f1ae29410b8 in gf_proc_dump_per_xlator_info (top=top@entry=0x7f1ad00173b0) at statedump.c:519

fixes: bz#1739360
Change-Id: Ib9b207a4ccb3226dbc2c449b77de348cbc9a3d3c
Signed-off-by: Xie Changlong &lt;xiechanglong@cmss.chinamobile.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise, gnfs will crash in following steps.
1) gluster v set &lt;VOL&gt; nfs.disable off
2) gluster v set &lt;VOL&gt; nfs.nlm off
3) kill -SIGUSR1 &lt;GNFS_PID&gt;
4) gnfs crash with SIGSEGV as follows:
nlm_priv (this=this@entry=0x7f1ad00173b0) at nlm4.c:2742
0x00007f1acf89d29d in nfs_priv (this=0x7f1ad00173b0) at nfs.c:1662
0x00007f1ae2941085 in gf_proc_dump_single_xlator_info (trav=trav@entry=0x7f1ad00173b0) at statedump.c:502
0x00007f1ae29410b8 in gf_proc_dump_per_xlator_info (top=top@entry=0x7f1ad00173b0) at statedump.c:519

fixes: bz#1739360
Change-Id: Ib9b207a4ccb3226dbc2c449b77de348cbc9a3d3c
Signed-off-by: Xie Changlong &lt;xiechanglong@cmss.chinamobile.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>event: rename event_XXX with gf_ prefixed</title>
<updated>2019-07-29T04:43:56+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=799edc73c3d4f694c365c6a7c27c9ab8eed5f260'/>
<id>799edc73c3d4f694c365c6a7c27c9ab8eed5f260</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.

Fixes: #699

Change-Id: I38f0200b941bd1cff4bf3066fca2fc1f9a5263aa
Signed-off-by: Xiubo Li &lt;xiubli@redhat.com&gt;
</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.

Fixes: #699

Change-Id: I38f0200b941bd1cff4bf3066fca2fc1f9a5263aa
Signed-off-by: Xiubo Li &lt;xiubli@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gnfs: use strcpy to prevent memory overflow</title>
<updated>2019-07-08T04:54:39+00:00</updated>
<author>
<name>Xie Changlong</name>
<email>xiechanglong@cmss.chinamobile.com</email>
</author>
<published>2019-07-05T07:16:23+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=99d210a704d2e85c95fac5edcf435bd059aad368'/>
<id>99d210a704d2e85c95fac5edcf435bd059aad368</id>
<content type='text'>
fixes: bz#1727248
Change-Id: Iea289032a8feecf2945668d3fb44a6a53089fdea
Signed-off-by: Xie Changlong &lt;xiechanglong@cmss.chinamobile.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fixes: bz#1727248
Change-Id: Iea289032a8feecf2945668d3fb44a6a53089fdea
Signed-off-by: Xie Changlong &lt;xiechanglong@cmss.chinamobile.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
