<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/rpc/rpc-transport/socket, branch v6.0</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>socket: socket event handlers now return void</title>
<updated>2019-03-02T11:54:24+00:00</updated>
<author>
<name>Milind Changire</name>
<email>mchangir@redhat.com</email>
</author>
<published>2019-02-15T08:50:07+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=4cb1d6d94ac85c5e79171f8989b545ca098b61d9'/>
<id>4cb1d6d94ac85c5e79171f8989b545ca098b61d9</id>
<content type='text'>
Problem:
Returning any value from socket event handlers to the event sub-system
doesn't make sense since event sub-system cannot handle socket
sub-system errors.

Solution:
Change return type of all socket event handlers to 'void'

mainline:
&gt; Change-Id: I70dc2c57f12b7ea2fae41120f71aa0d7fe0b2b6f
&gt; Fixes: bz#1651246
&gt; Signed-off-by: Milind Changire &lt;mchangir@redhat.com&gt;
&gt; Reviewed-on: https://review.gluster.org/c/glusterfs/+/22221

Change-Id: I70dc2c57f12b7ea2fae41120f71aa0d7fe0b2b6f
Fixes: bz#1683900
Signed-off-by: Milind Changire &lt;mchangir@redhat.com&gt;
(cherry picked from commit 776ba851c6ee6c265253d44cf1d6e4e3d4a21772)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Returning any value from socket event handlers to the event sub-system
doesn't make sense since event sub-system cannot handle socket
sub-system errors.

Solution:
Change return type of all socket event handlers to 'void'

mainline:
&gt; Change-Id: I70dc2c57f12b7ea2fae41120f71aa0d7fe0b2b6f
&gt; Fixes: bz#1651246
&gt; Signed-off-by: Milind Changire &lt;mchangir@redhat.com&gt;
&gt; Reviewed-on: https://review.gluster.org/c/glusterfs/+/22221

Change-Id: I70dc2c57f12b7ea2fae41120f71aa0d7fe0b2b6f
Fixes: bz#1683900
Signed-off-by: Milind Changire &lt;mchangir@redhat.com&gt;
(cherry picked from commit 776ba851c6ee6c265253d44cf1d6e4e3d4a21772)
</pre>
</div>
</content>
</entry>
<entry>
<title>socket: don't pass return value from protocol handler to event handler</title>
<updated>2019-01-22T06:59:37+00:00</updated>
<author>
<name>Zhang Huan</name>
<email>zhanghuan@open-fs.com</email>
</author>
<published>2019-01-03T09:57:38+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=cd5714554627fe90ee2c77685cb410a8fb25eceb'/>
<id>cd5714554627fe90ee2c77685cb410a8fb25eceb</id>
<content type='text'>
Event handler handles socket level error only, while protocol handler
handles in protocol level error. If protocol handler decides to
disconnect on error in any case, it should call disconnect instead of
return an error back to event handler.

Change-Id: I9375be98cc52cb969085333f3c7229a91207d1bd
updates: bz#1666143
Signed-off-by: Zhang Huan &lt;zhanghuan@open-fs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Event handler handles socket level error only, while protocol handler
handles in protocol level error. If protocol handler decides to
disconnect on error in any case, it should call disconnect instead of
return an error back to event handler.

Change-Id: I9375be98cc52cb969085333f3c7229a91207d1bd
updates: bz#1666143
Signed-off-by: Zhang Huan &lt;zhanghuan@open-fs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>socket: fix issue when socket read return with EAGAIN</title>
<updated>2019-01-22T06:52:30+00:00</updated>
<author>
<name>Zhang Huan</name>
<email>zhanghuan@open-fs.com</email>
</author>
<published>2018-12-29T08:26:58+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=4d9935a4db67be0237db5fc6a2b51086635571f6'/>
<id>4d9935a4db67be0237db5fc6a2b51086635571f6</id>
<content type='text'>
In the case socket read returns EAGAIN, positive value about remaining
vector to send is returned. This return value will be passed all the way
back to event handler, making it complains.

[2018-12-29 08:02:25.603199] T [socket.c:1640:__socket_read_simple_payload] 0-test-client-0-extra.0: partial read on non-blocking socket.
[2018-12-29 08:02:25.603201] T [rpc-clnt.c:654:rpc_clnt_reply_init] 0-test-client-2-extra.1: received rpc message (RPC XID: 0xfa6 Program: GlusterFS 4.x v1, ProgVers: 400, Proc: 12) from rpc-transport (test-client-2-extra.1)
[2018-12-29 08:02:25.603207] T [socket.c:3129:socket_event_handler] 0-test-client-0-extra.0: (sock:32) socket_event_poll_in returned 1

Formerly, in socket_proto_state_machine, return value of socket_readv is
used to check if message is all read-in. In this commit, it is checked
whether size of bytes indicated in header are all read in. In this way,
only 0 and -1 will be returned from socket_proto_state_machine(),
indicating whether there is error in the underlying socket.

Change-Id: I8be0d178b049f0720d738a03aec41c4b375d2972
updates: bz#1666143
Signed-off-by: Zhang Huan &lt;zhanghuan@open-fs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the case socket read returns EAGAIN, positive value about remaining
vector to send is returned. This return value will be passed all the way
back to event handler, making it complains.

[2018-12-29 08:02:25.603199] T [socket.c:1640:__socket_read_simple_payload] 0-test-client-0-extra.0: partial read on non-blocking socket.
[2018-12-29 08:02:25.603201] T [rpc-clnt.c:654:rpc_clnt_reply_init] 0-test-client-2-extra.1: received rpc message (RPC XID: 0xfa6 Program: GlusterFS 4.x v1, ProgVers: 400, Proc: 12) from rpc-transport (test-client-2-extra.1)
[2018-12-29 08:02:25.603207] T [socket.c:3129:socket_event_handler] 0-test-client-0-extra.0: (sock:32) socket_event_poll_in returned 1

Formerly, in socket_proto_state_machine, return value of socket_readv is
used to check if message is all read-in. In this commit, it is checked
whether size of bytes indicated in header are all read in. In this way,
only 0 and -1 will be returned from socket_proto_state_machine(),
indicating whether there is error in the underlying socket.

Change-Id: I8be0d178b049f0720d738a03aec41c4b375d2972
updates: bz#1666143
Signed-off-by: Zhang Huan &lt;zhanghuan@open-fs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>socket: fix issue when socket write return with EAGAIN</title>
<updated>2019-01-17T08:29:48+00:00</updated>
<author>
<name>Zhang Huan</name>
<email>zhanghuan@open-fs.com</email>
</author>
<published>2018-12-29T07:51:13+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=0301a66bda44582e3a48519f2a5d365b0c38090d'/>
<id>0301a66bda44582e3a48519f2a5d365b0c38090d</id>
<content type='text'>
In the case socket write return with EAGAIN, the remaining vector count
is return all way back to event handler, making followup pollin event to
skip handling and dispatch loop complains about failure. Even thought
temporary write failure is not an error.

[2018-12-29 07:31:41.772310] E [MSGID: 101191] [event-epoll.c:674:event_dispatch_epoll_worker] 0-epoll: Failed to dispatch handler

Change-Id: Idf03d120b5f7619eda19720a583cbcc3e7da2504
updates: bz#1666143
Signed-off-by: Zhang Huan &lt;zhanghuan@open-fs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the case socket write return with EAGAIN, the remaining vector count
is return all way back to event handler, making followup pollin event to
skip handling and dispatch loop complains about failure. Even thought
temporary write failure is not an error.

[2018-12-29 07:31:41.772310] E [MSGID: 101191] [event-epoll.c:674:event_dispatch_epoll_worker] 0-epoll: Failed to dispatch handler

Change-Id: Idf03d120b5f7619eda19720a583cbcc3e7da2504
updates: bz#1666143
Signed-off-by: Zhang Huan &lt;zhanghuan@open-fs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>socket: fix counting of socket total_bytes_read and total_bytes_write</title>
<updated>2019-01-17T08:29:32+00:00</updated>
<author>
<name>Zhang Huan</name>
<email>zhanghuan@open-fs.com</email>
</author>
<published>2018-12-27T06:13:48+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=22778ca88977fa061c468ca257aec74d4e7d09f4'/>
<id>22778ca88977fa061c468ca257aec74d4e7d09f4</id>
<content type='text'>
Change-Id: If35d0dbae963facf00ab6bcf07c6e4d1706ed982
updates: bz#1666143
Signed-off-by: Zhang Huan &lt;zhanghuan@open-fs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: If35d0dbae963facf00ab6bcf07c6e4d1706ed982
updates: bz#1666143
Signed-off-by: Zhang Huan &lt;zhanghuan@open-fs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>socket: Remove redundant in_lock in incoming message handling</title>
<updated>2018-12-26T05:15:08+00:00</updated>
<author>
<name>Krutika Dhananjay</name>
<email>kdhananj@redhat.com</email>
</author>
<published>2018-12-21T04:28:16+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=a1e7acc93a416fec6b87cc5601a9922759156771'/>
<id>a1e7acc93a416fec6b87cc5601a9922759156771</id>
<content type='text'>
A given epoll thread can handle only one incoming (POLLIN) request.
And until the socket is rearmed for listening, it is guaranteed that
there won't be any new incoming requests. As a result, the priv-&gt;in_lock
which guards the socket proto state machine seems redundant.

This patch removes priv-&gt;in_lock.

Change-Id: I26b6ddd852aba8c10385833b85ffd2e53e46cb8c
updates: bz#1467614
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A given epoll thread can handle only one incoming (POLLIN) request.
And until the socket is rearmed for listening, it is guaranteed that
there won't be any new incoming requests. As a result, the priv-&gt;in_lock
which guards the socket proto state machine seems redundant.

This patch removes priv-&gt;in_lock.

Change-Id: I26b6ddd852aba8c10385833b85ffd2e53e46cb8c
updates: bz#1467614
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[geo-rep]: Worker still ACTIVE after killing bricks</title>
<updated>2018-12-13T04:46:50+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawal@redhat.com</email>
</author>
<published>2018-11-23T04:09:43+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=fb917bf10b4783d5c669e81a5be1f902ca48cb84'/>
<id>fb917bf10b4783d5c669e81a5be1f902ca48cb84</id>
<content type='text'>
Problem: In changelog xlator after destroying listener it call's
         unlink to delete changelog socket file but socket file
         reference is not cleaned up from process memory

Solution: 1) To cleanup reference completely from process memory
             serialize transport cleanup for changelog and then
             unlink socket file
          2) Brick xlator will notify GF_EVENT_PARENT_DOWN to next
             xlator only after cleanup all xprts

Test: To test the same run below steps
      1) Setup some volume and enable brick mux
      2) kill anyone brick with gf_attach
      3) check changelog socket for specific to killed brick
         in lsof, it should cleanup completely

fixes: bz#1600145

Change-Id: Iba06cbf77d8a87b34a60fce50f6d8c0d427fa491
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: In changelog xlator after destroying listener it call's
         unlink to delete changelog socket file but socket file
         reference is not cleaned up from process memory

Solution: 1) To cleanup reference completely from process memory
             serialize transport cleanup for changelog and then
             unlink socket file
          2) Brick xlator will notify GF_EVENT_PARENT_DOWN to next
             xlator only after cleanup all xprts

Test: To test the same run below steps
      1) Setup some volume and enable brick mux
      2) kill anyone brick with gf_attach
      3) check changelog socket for specific to killed brick
         in lsof, it should cleanup completely

fixes: bz#1600145

Change-Id: Iba06cbf77d8a87b34a60fce50f6d8c0d427fa491
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfs: Move devel headers under glusterfs directory</title>
<updated>2018-12-05T21:47:04+00:00</updated>
<author>
<name>ShyamsundarR</name>
<email>srangana@redhat.com</email>
</author>
<published>2018-11-29T19:08:06+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=20ef211cfa5b5fcc437484a879fdc5d4c66bbaf5'/>
<id>20ef211cfa5b5fcc437484a879fdc5d4c66bbaf5</id>
<content type='text'>
libglusterfs devel package headers are referenced in code using
include semantics for a program, this while it works can be better
especially when dealing with out of tree xlator builds or in
general out of tree devel package usage.

Towards this, the following changes are done,
- moved all devel headers under a glusterfs directory
- Included these headers using system header notation &lt;&gt; in all
code outside of libglusterfs
- Included these headers using own program notation "" within
libglusterfs

This change although big, is just moving around the headers and
making it correct when including these headers from other sources.

This helps us correctly include libglusterfs includes without
namespace conflicts.

Change-Id: Id2a98854e671a7ee5d73be44da5ba1a74252423b
Updates: bz#1193929
Signed-off-by: ShyamsundarR &lt;srangana@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libglusterfs devel package headers are referenced in code using
include semantics for a program, this while it works can be better
especially when dealing with out of tree xlator builds or in
general out of tree devel package usage.

Towards this, the following changes are done,
- moved all devel headers under a glusterfs directory
- Included these headers using system header notation &lt;&gt; in all
code outside of libglusterfs
- Included these headers using own program notation "" within
libglusterfs

This change although big, is just moving around the headers and
making it correct when including these headers from other sources.

This helps us correctly include libglusterfs includes without
namespace conflicts.

Change-Id: Id2a98854e671a7ee5d73be44da5ba1a74252423b
Updates: bz#1193929
Signed-off-by: ShyamsundarR &lt;srangana@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc-transport/socket: NULL pointer dereferencing clang fix</title>
<updated>2018-12-05T09:14:27+00:00</updated>
<author>
<name>Sheetal Pamecha</name>
<email>sheetal.pamecha08@gmail.com</email>
</author>
<published>2018-11-30T16:31:53+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=65dc176e7c3e3d598605b75f06b796fd0ade2c7e'/>
<id>65dc176e7c3e3d598605b75f06b796fd0ade2c7e</id>
<content type='text'>
Problem: res-&gt;ai_addr could be NULL

Added a check to address this issue

Change-Id: Iac88a8d6dc1f009836554448afbc228df93decd6
Updates: bz#1622665
Signed-off-by: Sheetal Pamecha &lt;sheetal.pamecha08@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: res-&gt;ai_addr could be NULL

Added a check to address this issue

Change-Id: Iac88a8d6dc1f009836554448afbc228df93decd6
Updates: bz#1622665
Signed-off-by: Sheetal Pamecha &lt;sheetal.pamecha08@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc *.h fles: align structs</title>
<updated>2018-12-03T05:53:34+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2018-11-23T10:14:59+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=b56bf714c1f22212700db50c057e4e47b99be739'/>
<id>b56bf714c1f22212700db50c057e4e47b99be739</id>
<content type='text'>
Make an effort to slightly better align the structures.

Change-Id: I6f80a451f2ffbf15adfb986cedc24c2799787b49
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>
Make an effort to slightly better align the structures.

Change-Id: I6f80a451f2ffbf15adfb986cedc24c2799787b49
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
