<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/api/src, branch v6.7</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>gfapi: 'glfs_h_creat_open' - new API to create handle and open fd</title>
<updated>2019-09-27T11:30:47+00:00</updated>
<author>
<name>Soumya Koduri</name>
<email>skoduri@redhat.com</email>
</author>
<published>2019-09-18T11:02:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=5a2af2fd06356f6fc79d591c352caffd4c511c9e'/>
<id>5a2af2fd06356f6fc79d591c352caffd4c511c9e</id>
<content type='text'>
Right now we have two separate APIs, one
- 'glfs_h_creat_handle' to create handle &amp; another
- 'glfs_h_open' to create a glfd to return to application

Having two separate routines can result in access errors
while trying to create and write into a read-only file.

Since a fd is opened even during file/directory creation,
introducing a new API to make these two operations atomic i.e,
which can create both handle &amp; fd and pass them to application

This is backport of below mainline patch -
- https://review.gluster.org/#/c/glusterfs/+/23448/
- bz#1753569

Change-Id: Ibf513fcfcdad175f4d7eb6fa7a61b8feec6d33b5
fixes: bz#1755785
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Right now we have two separate APIs, one
- 'glfs_h_creat_handle' to create handle &amp; another
- 'glfs_h_open' to create a glfd to return to application

Having two separate routines can result in access errors
while trying to create and write into a read-only file.

Since a fd is opened even during file/directory creation,
introducing a new API to make these two operations atomic i.e,
which can create both handle &amp; fd and pass them to application

This is backport of below mainline patch -
- https://review.gluster.org/#/c/glusterfs/+/23448/
- bz#1753569

Change-Id: Ibf513fcfcdad175f4d7eb6fa7a61b8feec6d33b5
fixes: bz#1755785
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>event: rename event_XXX with gf_ prefixed</title>
<updated>2019-08-28T08:34:45+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://git.gluster.org/cgit/glusterfs.git/commit/?id=f7d1fa51cf7308a6d68ed9fa1e8cc4a7c66ad121'/>
<id>f7d1fa51cf7308a6d68ed9fa1e8cc4a7c66ad121</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#1740525
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#1740525
Signed-off-by: Xiubo Li &lt;xiubli@redhat.com&gt;
(cherry picked from commit 799edc73c3d4f694c365c6a7c27c9ab8eed5f260)
</pre>
</div>
</content>
</entry>
<entry>
<title>gfapi: Fix deadlock while processing upcall</title>
<updated>2019-08-02T10:07:43+00:00</updated>
<author>
<name>Soumya Koduri</name>
<email>skoduri@redhat.com</email>
</author>
<published>2019-07-25T07:26:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=589d0118bd29388f53996ac14c4e11a3f3ff0783'/>
<id>589d0118bd29388f53996ac14c4e11a3f3ff0783</id>
<content type='text'>
As mentioned in bug1733166, there could be potential deadlock
while processing upcalls depending on how each xlator choose
to act on it. The right way of fixing such issues
is to change rpc callback communication process.
- https://github.com/gluster/glusterfs/issues/697

Till then, making changes in gfapi layer to avoid any I/O
processing.

This is backport of below mainline patch
&gt; https://review.gluster.org/#/c/glusterfs/+/23108/
&gt; bz#1733166

Change-Id: I2079e95339e5d761d5060707f4555cfacab95c83
fixes: bz#1736341
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As mentioned in bug1733166, there could be potential deadlock
while processing upcalls depending on how each xlator choose
to act on it. The right way of fixing such issues
is to change rpc callback communication process.
- https://github.com/gluster/glusterfs/issues/697

Till then, making changes in gfapi layer to avoid any I/O
processing.

This is backport of below mainline patch
&gt; https://review.gluster.org/#/c/glusterfs/+/23108/
&gt; bz#1733166

Change-Id: I2079e95339e5d761d5060707f4555cfacab95c83
fixes: bz#1736341
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gfapi: fix incorrect initialization of upcall syncop arguments</title>
<updated>2019-07-05T09:18:40+00:00</updated>
<author>
<name>Soumya Koduri</name>
<email>skoduri@redhat.com</email>
</author>
<published>2019-06-07T11:50:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=fdbb808e6dda80044ff9cc868eca265ca9614485'/>
<id>fdbb808e6dda80044ff9cc868eca265ca9614485</id>
<content type='text'>
While sending upcall notifications via synctasks, the argument used to
carry relevant data for these tasks is not initialized properly. This patch
is to fix the same.

This is backport of below mainline fix -
&gt; fixes: bz#1718316
&gt; patch url: https://review.gluster.org/#/c/glusterfs/+/22839/
&gt; Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;

Change-Id: I9fa8f841e71d3c37d3819fbd430382928c07176c
fixes: bz#1720635
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
(cherry picked from commit bc6fd4cfa6ed34de3ffc02e2279fcc713f80f530)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While sending upcall notifications via synctasks, the argument used to
carry relevant data for these tasks is not initialized properly. This patch
is to fix the same.

This is backport of below mainline fix -
&gt; fixes: bz#1718316
&gt; patch url: https://review.gluster.org/#/c/glusterfs/+/22839/
&gt; Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;

Change-Id: I9fa8f841e71d3c37d3819fbd430382928c07176c
fixes: bz#1720635
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
(cherry picked from commit bc6fd4cfa6ed34de3ffc02e2279fcc713f80f530)
</pre>
</div>
</content>
</entry>
<entry>
<title>core: avoid dynamic TLS allocation when possible</title>
<updated>2019-07-03T06:25:48+00:00</updated>
<author>
<name>Xavi Hernandez</name>
<email>xhernandez@redhat.com</email>
</author>
<published>2019-03-05T17:58:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=6697af343dfbe135735a035cbf592b94750bd589'/>
<id>6697af343dfbe135735a035cbf592b94750bd589</id>
<content type='text'>
Some interdependencies between logging and memory management functions
make it impossible to use the logging framework before initializing
memory subsystem because they both depend on Thread Local Storage
allocated through pthread_key_create() during initialization.

This causes a crash when we try to log something very early in the
initialization phase.

To prevent this, several dynamically allocated TLS structures have
been replaced by static TLS reserved at compile time using '__thread'
keyword. This also reduces the number of error sources, making
initialization simpler.

Backport of:
&gt; BUG: 1193929
&gt; Change-Id: I8ea2e072411e30790d50084b6b7e909c7bb01d50
&gt; Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;

Updates: bz#1724210
Change-Id: I8ea2e072411e30790d50084b6b7e909c7bb01d50
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some interdependencies between logging and memory management functions
make it impossible to use the logging framework before initializing
memory subsystem because they both depend on Thread Local Storage
allocated through pthread_key_create() during initialization.

This causes a crash when we try to log something very early in the
initialization phase.

To prevent this, several dynamically allocated TLS structures have
been replaced by static TLS reserved at compile time using '__thread'
keyword. This also reduces the number of error sources, making
initialization simpler.

Backport of:
&gt; BUG: 1193929
&gt; Change-Id: I8ea2e072411e30790d50084b6b7e909c7bb01d50
&gt; Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;

Updates: bz#1724210
Change-Id: I8ea2e072411e30790d50084b6b7e909c7bb01d50
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gfapi: Unblock epoll thread for upcall processing</title>
<updated>2019-04-03T04:30:53+00:00</updated>
<author>
<name>Soumya Koduri</name>
<email>skoduri@redhat.com</email>
</author>
<published>2019-03-28T09:29:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=491ff40a7a9ffb186ab1c7772eb8d4e75ad2c2b0'/>
<id>491ff40a7a9ffb186ab1c7772eb8d4e75ad2c2b0</id>
<content type='text'>
With commit#ad35193,we have made changes to offload
processing upcall notifications to synctask so as not
to block epoll threads. However seems like the issue wasnt
fully addressed.

In "glfs_cbk_upcall_data" -&gt; "synctask_new1" after creating synctask
if there is no callback defined, the thread waits on synctask_join
till the syncfn is finished. So that way even with those changes,
epoll threads are blocked till the upcalls are processed.

Hence the right fix now is to define a callback function for that
synctask "glfs_cbk_upcall_syncop" so as to unblock epoll/notify threads
completely and the upcall processing can happen in parallel by synctask
threads.

Change-Id: I4d8645e3588fab2c3ca534e0112773aaab68a5dd
fixes: bz#1694561
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
(cherry picked from commit 4a03a71c6171f6e8382664d9d29857d06ef37741)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With commit#ad35193,we have made changes to offload
processing upcall notifications to synctask so as not
to block epoll threads. However seems like the issue wasnt
fully addressed.

In "glfs_cbk_upcall_data" -&gt; "synctask_new1" after creating synctask
if there is no callback defined, the thread waits on synctask_join
till the syncfn is finished. So that way even with those changes,
epoll threads are blocked till the upcalls are processed.

Hence the right fix now is to define a callback function for that
synctask "glfs_cbk_upcall_syncop" so as to unblock epoll/notify threads
completely and the upcall processing can happen in parallel by synctask
threads.

Change-Id: I4d8645e3588fab2c3ca534e0112773aaab68a5dd
fixes: bz#1694561
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
(cherry picked from commit 4a03a71c6171f6e8382664d9d29857d06ef37741)
</pre>
</div>
</content>
</entry>
<entry>
<title>gfapi: add function to set client-pid</title>
<updated>2019-03-29T11:08:32+00:00</updated>
<author>
<name>Ravishankar N</name>
<email>ravishankar@redhat.com</email>
</author>
<published>2019-03-14T13:11:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=4e7afab231e22fc740e2d8a39fd7eaefd1fa9f2f'/>
<id>4e7afab231e22fc740e2d8a39fd7eaefd1fa9f2f</id>
<content type='text'>
This api offers the ability to set the pid of a client to a particular
value, identical to how gluster fuse clients provide the --client-pid
option. This is an internal API to be used by gluster processes only. See
https://lists.gluster.org/pipermail/gluster-devel/2019-March/055925.html
for more details. Currently glfsheal is the only proposed consumer.

updates: bz#1693155
Change-Id: I0620be2127d79d69cdd57cffb29bba44e6e5da1f
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
(cherry picked from commit 08d502c3b05c6f7831bb4cc764bd458b405a99b1)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This api offers the ability to set the pid of a client to a particular
value, identical to how gluster fuse clients provide the --client-pid
option. This is an internal API to be used by gluster processes only. See
https://lists.gluster.org/pipermail/gluster-devel/2019-March/055925.html
for more details. Currently glfsheal is the only proposed consumer.

updates: bz#1693155
Change-Id: I0620be2127d79d69cdd57cffb29bba44e6e5da1f
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
(cherry picked from commit 08d502c3b05c6f7831bb4cc764bd458b405a99b1)
</pre>
</div>
</content>
</entry>
<entry>
<title>Updating the glfs_setattr and glfs_fsetattr public APIs to use glfs_stat</title>
<updated>2019-02-28T06:30:30+00:00</updated>
<author>
<name>Arjun Sharma</name>
<email>arjsharm@redhat.com</email>
</author>
<published>2019-02-21T12:39:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=cd6795c5e8ebdf23c6fd350d8df49e5b22b09056'/>
<id>cd6795c5e8ebdf23c6fd350d8df49e5b22b09056</id>
<content type='text'>
Change-Id: I0e86c8222c88b4c71087ec287ba81f8353d70822
updates: #389
Signed-off-by: Arjun &lt;arjsharm@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I0e86c8222c88b4c71087ec287ba81f8353d70822
updates: #389
Signed-off-by: Arjun &lt;arjsharm@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>api: Update all future API versions to rel-6</title>
<updated>2019-02-08T15:47:36+00:00</updated>
<author>
<name>ShyamsundarR</name>
<email>srangana@redhat.com</email>
</author>
<published>2019-02-06T01:44:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=352e203266e9ae845aeea139fba670e702c634ed'/>
<id>352e203266e9ae845aeea139fba670e702c634ed</id>
<content type='text'>
As release 6 is branched, all future APIs now become 6.0

This change implements the same.

Change-Id: I6db368b4dc8585278ec11d4a411adcd04635de53
Updates: bz#1672818
Signed-off-by: ShyamsundarR &lt;srangana@redhat.com&gt;
(cherry picked from commit ddcb3c7438472072daa6fbe3f3b87067b6d7bc54)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As release 6 is branched, all future APIs now become 6.0

This change implements the same.

Change-Id: I6db368b4dc8585278ec11d4a411adcd04635de53
Updates: bz#1672818
Signed-off-by: ShyamsundarR &lt;srangana@redhat.com&gt;
(cherry picked from commit ddcb3c7438472072daa6fbe3f3b87067b6d7bc54)
</pre>
</div>
</content>
</entry>
<entry>
<title>api: bad GFAPI_4.1.6 block</title>
<updated>2019-01-30T07:01:09+00:00</updated>
<author>
<name>Kaleb S. KEITHLEY</name>
<email>kkeithle@redhat.com</email>
</author>
<published>2019-01-29T08:16:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=4aee035cd2a32750326b83b5fe08af7c8abab284'/>
<id>4aee035cd2a32750326b83b5fe08af7c8abab284</id>
<content type='text'>
missing global: line, tabs not spaces

Change-Id: Icdbc23b4e4cd608da1d764e81757201c4b1269a6
updates: bz#1193929
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
missing global: line, tabs not spaces

Change-Id: Icdbc23b4e4cd608da1d764e81757201c4b1269a6
updates: bz#1193929
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
