<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/api/src, branch v4.1.9</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>gfapi: Unblock epoll thread for upcall processing</title>
<updated>2019-04-08T14:00:56+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://dev.gluster.org/cgit/glusterfs.git/commit/?id=3f9f00b2e5ec4ad845f3c8edef56fec0b4e4bbc1'/>
<id>3f9f00b2e5ec4ad845f3c8edef56fec0b4e4bbc1</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#1694563
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
</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#1694563
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>api: bad GFAPI_4.1.6 block</title>
<updated>2019-01-30T15:08:14+00:00</updated>
<author>
<name>Kaleb S. KEITHLEY</name>
<email>kkeithle@redhat.com</email>
</author>
<published>2019-01-29T08:25:59+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=a10c8d75eb5ff7836b20a9f26bf9c0e99fd4f6bb'/>
<id>a10c8d75eb5ff7836b20a9f26bf9c0e99fd4f6bb</id>
<content type='text'>
missing global: line, tabs not spaces

Change-Id: Icdbc23b4e4cd608da1d764e81757201c4b1269a6
fixes: bz#1670303
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
fixes: bz#1670303
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gfapi: Offload callback notifications to synctask</title>
<updated>2019-01-03T09:38:16+00:00</updated>
<author>
<name>Soumya Koduri</name>
<email>skoduri@redhat.com</email>
</author>
<published>2018-11-18T18:08:08+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=ad1de8c31348f6864bd9b40292df8dfd1376c0a3'/>
<id>ad1de8c31348f6864bd9b40292df8dfd1376c0a3</id>
<content type='text'>
Upcall notifications are received from server via epoll
and same thread is used to forward these notifications
to the application. This may lead to deadlock and hang
in the following scenario.

Consider if as part of handling these callbacks,
application has to do some operations which involve
sending I/Os to gfapi stack which inturn have to wait for
epoll threads to receive repsonse. Thus this may lead to
deadlock if all the epoll threads are waiting to complete
these callback notifications.

To address it, instead of using epoll thread itself,
make use of synctask to send those notificaitons to the
application.

Change-Id: If614e0d09246e4279b9d1f40d883a32a39c8fd90
updates: bz#1655532
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Upcall notifications are received from server via epoll
and same thread is used to forward these notifications
to the application. This may lead to deadlock and hang
in the following scenario.

Consider if as part of handling these callbacks,
application has to do some operations which involve
sending I/Os to gfapi stack which inturn have to wait for
epoll threads to receive repsonse. Thus this may lead to
deadlock if all the epoll threads are waiting to complete
these callback notifications.

To address it, instead of using epoll thread itself,
make use of synctask to send those notificaitons to the
application.

Change-Id: If614e0d09246e4279b9d1f40d883a32a39c8fd90
updates: bz#1655532
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gfapi: Access fs-&gt;oldvolfile under mutex lock</title>
<updated>2019-01-03T09:38:16+00:00</updated>
<author>
<name>Soumya Koduri</name>
<email>skoduri@redhat.com</email>
</author>
<published>2018-12-18T16:37:55+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=b0bcb4b093984d9f0189061e27ddeefa4b0afe6c'/>
<id>b0bcb4b093984d9f0189061e27ddeefa4b0afe6c</id>
<content type='text'>
In some cases (for eg., when there are multiple
RPC_CLNT_CONNECT notifications), multiple threads may fetch
volfile and try to update it in 'fs' object simultaneously.
Hence protect those variables' access under fs-&gt;mutex lock.

This is backport of below two mainline patches -
 - https://review.gluster.org/#/c/glusterfs/+/21882/
 - https://review.gluster.org/#/c/glusterfs/+/21927/

Change-Id: Idaee9548560db32d83f4c04ebb1f375fee7864a9
fixes: bz#1663132
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
(cherry picked from commit 8fe3c6107a2b431d7cc0b8cfaeeb7941cf9590f9)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some cases (for eg., when there are multiple
RPC_CLNT_CONNECT notifications), multiple threads may fetch
volfile and try to update it in 'fs' object simultaneously.
Hence protect those variables' access under fs-&gt;mutex lock.

This is backport of below two mainline patches -
 - https://review.gluster.org/#/c/glusterfs/+/21882/
 - https://review.gluster.org/#/c/glusterfs/+/21927/

Change-Id: Idaee9548560db32d83f4c04ebb1f375fee7864a9
fixes: bz#1663132
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
(cherry picked from commit 8fe3c6107a2b431d7cc0b8cfaeeb7941cf9590f9)
</pre>
</div>
</content>
</entry>
<entry>
<title>gfapi: Send fop_attr dict as part of syncop_open</title>
<updated>2018-12-26T16:59:17+00:00</updated>
<author>
<name>Soumya Koduri</name>
<email>skoduri@redhat.com</email>
</author>
<published>2018-11-10T10:55:29+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=6df227148c5651bc321b86c147ea20f90944d1be'/>
<id>6df227148c5651bc321b86c147ea20f90944d1be</id>
<content type='text'>
Leaseid (stored in thread locals) is sent to server via xdata.
This dict variable is set but not passed as argument in glfs_h_open().
Fixed the same.

Change-Id: Idd2f8a0ec184b4b6b1ad1e6e5d75df551c36a96d
updates: bz#1655532
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Leaseid (stored in thread locals) is sent to server via xdata.
This dict variable is set but not passed as argument in glfs_h_open().
Fixed the same.

Change-Id: Idd2f8a0ec184b4b6b1ad1e6e5d75df551c36a96d
updates: bz#1655532
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gfapi: fix bad dict setting of lease-id</title>
<updated>2018-11-13T20:45:15+00:00</updated>
<author>
<name>Kinglong Mee</name>
<email>kinglongmee@gmail.com</email>
</author>
<published>2018-11-12T13:52:24+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=435c8a92b8bafe2e15e130a31dfdfc14ff40b40a'/>
<id>435c8a92b8bafe2e15e130a31dfdfc14ff40b40a</id>
<content type='text'>
lease_id is a 16 bits opaque data, copying it by gf_strdup is wrong.

Invalid read of size 2
   at 0x483FA2F: memmove (vg_replace_strmem.c:1270)
   by 0xE2EF6FB: ??? (in /usr/lib64/libtirpc.so.3.0.0)
   by 0xE2EE047: xdr_opaque (in /usr/lib64/libtirpc.so.3.0.0)
   by 0x107A97DC: xdr_gfx_value (glusterfs4-xdr.c:207)
   by 0x107A98C0: xdr_gfx_dict_pair (glusterfs4-xdr.c:321)
   by 0xE2EF35E: xdr_array (in /usr/lib64/libtirpc.so.3.0.0)
   by 0x107A9A89: xdr_gfx_dict (glusterfs4-xdr.c:335)
   by 0x107AA97B: xdr_gfx_write_req (glusterfs4-xdr.c:897)
   by 0x107A181E: xdr_serialize_generic (xdr-generic.c:25)
   by 0x231044A2: client_submit_request (client.c:205)
   by 0x2314D3C1: client4_0_writev (client-rpc-fops_v2.c:3863)
   by 0x230FD5FA: client_writev (client.c:956)
 Address 0xad659e18 is 72 bytes inside a block of size 73 alloc'd
   at 0x483880B: malloc (vg_replace_malloc.c:299)
   by 0x106BA7EC: __gf_malloc (mem-pool.c:136)
   by 0x1064521E: gf_strndup (mem-pool.h:166)
   by 0x1064521E: gf_strdup (mem-pool.h:183)
   by 0x1064521E: get_fop_attr_thrd_key (glfs.c:627)
   by 0x1064D8E9: glfs_pwritev@@GFAPI_3.4.0 (glfs-fops.c:1154)
   by 0x10610C0C: glusterfs_write2 (handle.c:2092)
   by 0x54D30C: mdcache_write2 (mdcache_file.c:647)
   by 0x48A3FC: nfs4_write (nfs4_op_write.c:459)
   by 0x48A44D: nfs4_op_write (nfs4_op_write.c:487)
   by 0x4634F5: nfs4_Compound (nfs4_Compound.c:947)
   by 0x460155: nfs_rpc_process_request (nfs_worker_thread.c:1329)
   by 0x4608A3: nfs_rpc_valid_NFS (nfs_worker_thread.c:1539)
   by 0x488F12F: svc_vc_decode (svc_vc.c:825)

Backport of:

 &gt; Patch: https://review.gluster.org/21586/
 &gt; BUG: bz#1647651
 &gt; Change-Id: Ib9fff55c897bc43c15036a869888e763df133757
 &gt; Signed-off-by: Kinglong Mee &lt;mijinlong@open-fs.com&gt;
(cherry picked from commit 6d4cd8ce6c0d88d331ffed97c51d3061a3900561)

Updates bz#1648938
Change-Id: I881d1e9aeb343d456cbf80d16bc46fd4a81a8e43
Signed-off-by: Kinglong Mee &lt;mijinlong@open-fs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
lease_id is a 16 bits opaque data, copying it by gf_strdup is wrong.

Invalid read of size 2
   at 0x483FA2F: memmove (vg_replace_strmem.c:1270)
   by 0xE2EF6FB: ??? (in /usr/lib64/libtirpc.so.3.0.0)
   by 0xE2EE047: xdr_opaque (in /usr/lib64/libtirpc.so.3.0.0)
   by 0x107A97DC: xdr_gfx_value (glusterfs4-xdr.c:207)
   by 0x107A98C0: xdr_gfx_dict_pair (glusterfs4-xdr.c:321)
   by 0xE2EF35E: xdr_array (in /usr/lib64/libtirpc.so.3.0.0)
   by 0x107A9A89: xdr_gfx_dict (glusterfs4-xdr.c:335)
   by 0x107AA97B: xdr_gfx_write_req (glusterfs4-xdr.c:897)
   by 0x107A181E: xdr_serialize_generic (xdr-generic.c:25)
   by 0x231044A2: client_submit_request (client.c:205)
   by 0x2314D3C1: client4_0_writev (client-rpc-fops_v2.c:3863)
   by 0x230FD5FA: client_writev (client.c:956)
 Address 0xad659e18 is 72 bytes inside a block of size 73 alloc'd
   at 0x483880B: malloc (vg_replace_malloc.c:299)
   by 0x106BA7EC: __gf_malloc (mem-pool.c:136)
   by 0x1064521E: gf_strndup (mem-pool.h:166)
   by 0x1064521E: gf_strdup (mem-pool.h:183)
   by 0x1064521E: get_fop_attr_thrd_key (glfs.c:627)
   by 0x1064D8E9: glfs_pwritev@@GFAPI_3.4.0 (glfs-fops.c:1154)
   by 0x10610C0C: glusterfs_write2 (handle.c:2092)
   by 0x54D30C: mdcache_write2 (mdcache_file.c:647)
   by 0x48A3FC: nfs4_write (nfs4_op_write.c:459)
   by 0x48A44D: nfs4_op_write (nfs4_op_write.c:487)
   by 0x4634F5: nfs4_Compound (nfs4_Compound.c:947)
   by 0x460155: nfs_rpc_process_request (nfs_worker_thread.c:1329)
   by 0x4608A3: nfs_rpc_valid_NFS (nfs_worker_thread.c:1539)
   by 0x488F12F: svc_vc_decode (svc_vc.c:825)

Backport of:

 &gt; Patch: https://review.gluster.org/21586/
 &gt; BUG: bz#1647651
 &gt; Change-Id: Ib9fff55c897bc43c15036a869888e763df133757
 &gt; Signed-off-by: Kinglong Mee &lt;mijinlong@open-fs.com&gt;
(cherry picked from commit 6d4cd8ce6c0d88d331ffed97c51d3061a3900561)

Updates bz#1648938
Change-Id: I881d1e9aeb343d456cbf80d16bc46fd4a81a8e43
Signed-off-by: Kinglong Mee &lt;mijinlong@open-fs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gfapi: Bug fixes in leases processing code-path</title>
<updated>2018-10-22T16:36:03+00:00</updated>
<author>
<name>Soumya Koduri</name>
<email>skoduri@redhat.com</email>
</author>
<published>2018-10-10T16:07:07+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=fa4710bb8fbc852971d763d8727e3755436ea9c8'/>
<id>fa4710bb8fbc852971d763d8727e3755436ea9c8</id>
<content type='text'>
This patch fixes below issues in gfapi lease code-path
* 'glfs_setfsleasid' should allow NULL input to be
   able to reset leaseid
* Applications should be allowed to (un)register for
  upcall notifications of type GLFS_EVENT_LEASE_RECALL
* APIs added to read contents of GLFS_EVENT_LEASE_RECALL
  argument which is of type "struct glfs_upcall_lease"

This is backport of below mainline path -
https://review.gluster.org/#/c/glusterfs/+/21391

Change-Id: I3320ddf235cc82fad561e13b9457ebd64db6c76b
updates: #350
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes below issues in gfapi lease code-path
* 'glfs_setfsleasid' should allow NULL input to be
   able to reset leaseid
* Applications should be allowed to (un)register for
  upcall notifications of type GLFS_EVENT_LEASE_RECALL
* APIs added to read contents of GLFS_EVENT_LEASE_RECALL
  argument which is of type "struct glfs_upcall_lease"

This is backport of below mainline path -
https://review.gluster.org/#/c/glusterfs/+/21391

Change-Id: I3320ddf235cc82fad561e13b9457ebd64db6c76b
updates: #350
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gfapi : Handle the path == "" glfs_resolve_at</title>
<updated>2018-08-22T01:05:53+00:00</updated>
<author>
<name>Jiffin Tony Thottan</name>
<email>jthottan@redhat.com</email>
</author>
<published>2018-07-31T09:22:51+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=95608a9d454fbc83f92aedac400b9580b95dbecc'/>
<id>95608a9d454fbc83f92aedac400b9580b95dbecc</id>
<content type='text'>
Currently there is no check for path = "" in glfs_resolve_at.
So if application sends an empty path, then the function resolves
into the parent inode which is incorrect. Plus modified possible
of "path" with "origpath" in the same function.

Change-Id: Ie5ff9ce4b771607b7dbb3fe00704fe670421792a
fixes: bz#1618347
Signed-off-by: Jiffin Tony Thottan &lt;jthottan@redhat.com&gt;
(cherry picked from commit febee007bb1a99d65300630c2a98cbb642b1c8dc)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently there is no check for path = "" in glfs_resolve_at.
So if application sends an empty path, then the function resolves
into the parent inode which is incorrect. Plus modified possible
of "path" with "origpath" in the same function.

Change-Id: Ie5ff9ce4b771607b7dbb3fe00704fe670421792a
fixes: bz#1618347
Signed-off-by: Jiffin Tony Thottan &lt;jthottan@redhat.com&gt;
(cherry picked from commit febee007bb1a99d65300630c2a98cbb642b1c8dc)
</pre>
</div>
</content>
</entry>
<entry>
<title>api: missing __THROW on pub function decls</title>
<updated>2018-05-29T14:38:51+00:00</updated>
<author>
<name>Kaleb S. KEITHLEY</name>
<email>kkeithle@redhat.com</email>
</author>
<published>2018-05-23T15:25:26+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=040619ef9946fb6cd151a07239613b6d88417935'/>
<id>040619ef9946fb6cd151a07239613b6d88417935</id>
<content type='text'>
missing __THROW on pub function decls needed for C++

Change-Id: Ia0ff09d311741e4cdc8ef171e07bbd56c24b9260
fixes: bz#1582549
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 __THROW on pub function decls needed for C++

Change-Id: Ia0ff09d311741e4cdc8ef171e07bbd56c24b9260
fixes: bz#1582549
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libgfapi: Fix lookup on root</title>
<updated>2018-05-29T14:38:25+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2018-05-25T12:55:11+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=49095af5b431b8fdd90c7a578cdeba329bda4a3e'/>
<id>49095af5b431b8fdd90c7a578cdeba329bda4a3e</id>
<content type='text'>
Lookup on root was sending "/" as the path.
This will break the basename calculation in
loc_copy and hence lookup on root was failing
if the loc_copy was involved in the stack.

With ctime, a first lookup on root initiates
a metadata self heal because of ctime xattr
not being same on all afr subvolumes. This
results in loc_copy and hence the failure
of lookup.

Fix would be to send path with "." for the root.

Backport of:
  &gt; Patch: https://review.gluster.org/#/c/20086/
  &gt; BUG: 1582516
  &gt; Change-Id: Iafe4b99f249a4f5034ad34c1d30590de0e35aa0d
(cherry picked from commit 3d38e4e47f129bdb36c3fbbd481dabe4ba4413d6)


fixes: bz#1583016
Change-Id: Iafe4b99f249a4f5034ad34c1d30590de0e35aa0d
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Lookup on root was sending "/" as the path.
This will break the basename calculation in
loc_copy and hence lookup on root was failing
if the loc_copy was involved in the stack.

With ctime, a first lookup on root initiates
a metadata self heal because of ctime xattr
not being same on all afr subvolumes. This
results in loc_copy and hence the failure
of lookup.

Fix would be to send path with "." for the root.

Backport of:
  &gt; Patch: https://review.gluster.org/#/c/20086/
  &gt; BUG: 1582516
  &gt; Change-Id: Iafe4b99f249a4f5034ad34c1d30590de0e35aa0d
(cherry picked from commit 3d38e4e47f129bdb36c3fbbd481dabe4ba4413d6)


fixes: bz#1583016
Change-Id: Iafe4b99f249a4f5034ad34c1d30590de0e35aa0d
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
