<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/fs/dlm/lowcomms.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-02-03T19:17:31Z</updated>
<entry>
<title>socket: Rename SO_RCVTIMEO/ SO_SNDTIMEO with _OLD suffixes</title>
<updated>2019-02-03T19:17:31Z</updated>
<author>
<name>Deepa Dinamani</name>
<email>deepa.kernel@gmail.com</email>
</author>
<published>2019-02-02T15:34:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=45bdc66159d49bfc7f75fe02d25bc74f5d2660cf'/>
<id>urn:sha1:45bdc66159d49bfc7f75fe02d25bc74f5d2660cf</id>
<content type='text'>
SO_RCVTIMEO and SO_SNDTIMEO socket options use struct timeval
as the time format. struct timeval is not y2038 safe.
The subsequent patches in the series add support for new socket
timeout options with _NEW suffix that will use y2038 safe
data structures. Although the existing struct timeval layout
is sufficiently wide to represent timeouts, because of the way
libc will interpret time_t based on user defined flag, these
new flags provide a way of having a structure that is the same
for all architectures consistently.
Rename the existing options with _OLD suffix forms so that the
right option is enabled for userspace applications according
to the architecture and time_t definition of libc.

Signed-off-by: Deepa Dinamani &lt;deepa.kernel@gmail.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Cc: ccaulfie@redhat.com
Cc: deller@gmx.de
Cc: paulus@samba.org
Cc: ralf@linux-mips.org
Cc: rth@twiddle.net
Cc: cluster-devel@redhat.com
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-alpha@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: linux-mips@vger.kernel.org
Cc: linux-parisc@vger.kernel.org
Cc: sparclinux@vger.kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>iov_iter: Separate type from direction and use accessor functions</title>
<updated>2018-10-23T23:41:07Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2018-10-19T23:57:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=aa563d7bca6e882ec2bdae24603c8f016401a144'/>
<id>urn:sha1:aa563d7bca6e882ec2bdae24603c8f016401a144</id>
<content type='text'>
In the iov_iter struct, separate the iterator type from the iterator
direction and use accessor functions to access them in most places.

Convert a bunch of places to use switch-statements to access them rather
then chains of bitwise-AND statements.  This makes it easier to add further
iterator types.  Also, this can be more efficient as to implement a switch
of small contiguous integers, the compiler can use ~50% fewer compare
instructions than it has to use bitwise-and instructions.

Further, cease passing the iterator type into the iterator setup function.
The iterator function can set that itself.  Only the direction is required.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>dlm: remove O_NONBLOCK flag in sctp_connect_to_sock</title>
<updated>2018-05-29T15:48:35Z</updated>
<author>
<name>Gang He</name>
<email>ghe@suse.com</email>
</author>
<published>2018-05-29T03:09:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=da3627c30d229fea1e070e984366f80a1c4d9166'/>
<id>urn:sha1:da3627c30d229fea1e070e984366f80a1c4d9166</id>
<content type='text'>
We should remove O_NONBLOCK flag when calling sock-&gt;ops-&gt;connect()
in sctp_connect_to_sock() function.
Why?
1. up to now, sctp socket connect() function ignores the flag argument,
that means O_NONBLOCK flag does not take effect, then we should remove
it to avoid the confusion (but is not urgent).
2. for the future, there will be a patch to fix this problem, then the flag
argument will take effect, the patch has been queued at https://git.kernel.o
rg/pub/scm/linux/kernel/git/davem/net.git/commit/net/sctp?id=644fbdeacf1d3ed
d366e44b8ba214de9d1dd66a9.
But, the O_NONBLOCK flag will make sock-&gt;ops-&gt;connect() directly return
without any wait time, then the connection will not be established, DLM kernel
module will call sock-&gt;ops-&gt;connect() again and again, the bad results are,
CPU usage is almost 100%, even trigger soft_lockup problem if the related
configurations are enabled,
DLM kernel module also prints lots of messages like,
[Fri Apr 27 11:23:43 2018] dlm: connecting to 172167592
[Fri Apr 27 11:23:43 2018] dlm: connecting to 172167592
[Fri Apr 27 11:23:43 2018] dlm: connecting to 172167592
[Fri Apr 27 11:23:43 2018] dlm: connecting to 172167592
The upper application (e.g. ocfs2 mount command) is hanged at new_lockspace(),
the whole backtrace is as below,
tb0307-nd2:~ # cat /proc/2935/stack
[&lt;0&gt;] new_lockspace+0x957/0xac0 [dlm]
[&lt;0&gt;] dlm_new_lockspace+0xae/0x140 [dlm]
[&lt;0&gt;] user_cluster_connect+0xc3/0x3a0 [ocfs2_stack_user]
[&lt;0&gt;] ocfs2_cluster_connect+0x144/0x220 [ocfs2_stackglue]
[&lt;0&gt;] ocfs2_dlm_init+0x215/0x440 [ocfs2]
[&lt;0&gt;] ocfs2_fill_super+0xcb0/0x1290 [ocfs2]
[&lt;0&gt;] mount_bdev+0x173/0x1b0
[&lt;0&gt;] mount_fs+0x35/0x150
[&lt;0&gt;] vfs_kern_mount.part.23+0x54/0x100
[&lt;0&gt;] do_mount+0x59a/0xc40
[&lt;0&gt;] SyS_mount+0x80/0xd0
[&lt;0&gt;] do_syscall_64+0x76/0x140
[&lt;0&gt;] entry_SYSCALL_64_after_hwframe+0x42/0xb7
[&lt;0&gt;] 0xffffffffffffffff

So, I think we should remove O_NONBLOCK flag here, since DLM kernel module can
not handle non-block sockect in connect() properly.

Signed-off-by: Gang He &lt;ghe@suse.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>dlm: make sctp_connect_to_sock() return in specified time</title>
<updated>2018-05-02T15:28:35Z</updated>
<author>
<name>Gang He</name>
<email>ghe@suse.com</email>
</author>
<published>2018-05-02T15:28:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f706d830154b6c8405c6b77595a60d135182c97e'/>
<id>urn:sha1:f706d830154b6c8405c6b77595a60d135182c97e</id>
<content type='text'>
When the user setup a two-ring cluster, DLM kernel module
will automatically selects to use SCTP protocol to communicate
between each node. There will be about 5 minute hang in DLM
kernel module, in case one ring is broken before switching to
another ring, this will potentially affect the dependent upper
applications, e.g. ocfs2, gfs2, clvm and clustered-MD, etc.
Unfortunately, if the user setup a two-ring cluster, we can not
specify DLM communication protocol with TCP explicitly, since
DLM kernel module only supports SCTP protocol for multiple
ring cluster.
Base on my investigation, the time is spent in sock-&gt;ops-&gt;connect()
function before returns ETIMEDOUT(-110) error, since O_NONBLOCK
argument in connect() function does not work here, then we should
make sock-&gt;ops-&gt;connect() function return in specified time via
setting socket SO_SNDTIMEO atrribute.

Signed-off-by: Gang He &lt;ghe@suse.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>dlm: fix a clerical error when set SCTP_NODELAY</title>
<updated>2018-05-02T15:22:25Z</updated>
<author>
<name>Gang He</name>
<email>ghe@suse.com</email>
</author>
<published>2018-05-02T02:37:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b09c603ca40fc6980188f9c7f419c0918a3f461e'/>
<id>urn:sha1:b09c603ca40fc6980188f9c7f419c0918a3f461e</id>
<content type='text'>
There is a clerical error when turn off Nagle's algorithm in
sctp_connect_to_sock() function, this results in turn off
Nagle's algorithm failure.
After this correction, DLM performance will be improved obviously
when using SCTP procotol.

Signed-off-by: Gang He &lt;ghe@suse.com&gt;
Signed-off-by: Michal Kubecek &lt;mkubecek@suse.cz&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: make getname() functions return length rather than use int* parameter</title>
<updated>2018-02-12T19:15:04Z</updated>
<author>
<name>Denys Vlasenko</name>
<email>dvlasenk@redhat.com</email>
</author>
<published>2018-02-12T19:00:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9b2c45d479d0fb8647c9e83359df69162b5fbe5f'/>
<id>urn:sha1:9b2c45d479d0fb8647c9e83359df69162b5fbe5f</id>
<content type='text'>
Changes since v1:
Added changes in these files:
    drivers/infiniband/hw/usnic/usnic_transport.c
    drivers/staging/lustre/lnet/lnet/lib-socket.c
    drivers/target/iscsi/iscsi_target_login.c
    drivers/vhost/net.c
    fs/dlm/lowcomms.c
    fs/ocfs2/cluster/tcp.c
    security/tomoyo/network.c

Before:
All these functions either return a negative error indicator,
or store length of sockaddr into "int *socklen" parameter
and return zero on success.

"int *socklen" parameter is awkward. For example, if caller does not
care, it still needs to provide on-stack storage for the value
it does not need.

None of the many FOO_getname() functions of various protocols
ever used old value of *socklen. They always just overwrite it.

This change drops this parameter, and makes all these functions, on success,
return length of sockaddr. It's always &gt;= 0 and can be differentiated
from an error.

Tests in callers are changed from "if (err)" to "if (err &lt; 0)", where needed.

rpc_sockname() lost "int buflen" parameter, since its only use was
to be passed to kernel_getsockname() as &amp;buflen and subsequently
not used in any way.

Userspace API is not changed.

    text    data     bss      dec     hex filename
30108430 2633624  873672 33615726 200ef6e vmlinux.before.o
30108109 2633612  873672 33615393 200ee21 vmlinux.o

Signed-off-by: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
CC: David S. Miller &lt;davem@davemloft.net&gt;
CC: linux-kernel@vger.kernel.org
CC: netdev@vger.kernel.org
CC: linux-bluetooth@vger.kernel.org
CC: linux-decnet-user@lists.sourceforge.net
CC: linux-wireless@vger.kernel.org
CC: linux-rdma@vger.kernel.org
CC: linux-sctp@vger.kernel.org
CC: linux-nfs@vger.kernel.org
CC: linux-x25@vger.kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>dlm: switch to sock_recvmsg()</title>
<updated>2017-12-03T01:37:47Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2017-09-20T23:52:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c8c7840ea9459d602d6cb76ddcb166840fc4ba1f'/>
<id>urn:sha1:c8c7840ea9459d602d6cb76ddcb166840fc4ba1f</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>DLM: fix NULL pointer dereference in send_to_sock()</title>
<updated>2017-09-25T17:45:21Z</updated>
<author>
<name>tsutomu.owa@toshiba.co.jp</name>
<email>tsutomu.owa@toshiba.co.jp</email>
</author>
<published>2017-09-12T09:02:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=26b41099e7e97d6d44769fd159e822a98c98afa2'/>
<id>urn:sha1:26b41099e7e97d6d44769fd159e822a98c98afa2</id>
<content type='text'>
The writequeue and writequeue_lock member of othercon was not initialized.
If lowcomms_state_change() is called from network layer, othercon-&gt;swork
may be scheduled. In this case, send_to_sock() will generate a NULL pointer
reference. We avoid this problem by correctly initializing writequeue and
writequeue_lock member of othercon.

Signed-off-by: Tadashi Miyauchi &lt;miyauchi@toshiba-tops.co.jp&gt;
Signed-off-by: Tsutomu Owa &lt;tsutomu.owa@toshiba.co.jp&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>DLM: fix to reschedule rwork</title>
<updated>2017-09-25T17:45:21Z</updated>
<author>
<name>tsutomu.owa@toshiba.co.jp</name>
<email>tsutomu.owa@toshiba.co.jp</email>
</author>
<published>2017-09-12T09:02:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0aa18464c812e0154e8bafc9f60ca8002b3a8e7c'/>
<id>urn:sha1:0aa18464c812e0154e8bafc9f60ca8002b3a8e7c</id>
<content type='text'>
When an error occurs in kernel_recvmsg or kernel_sendpage and
close_connection is called and receive work is already scheduled,
receive work is canceled. In that case, the receive work will not
be scheduled forever after reconnection, because CF_READ_PENDING
flag is established.

Signed-off-by: Tadashi Miyauchi &lt;miyauchi@toshiba-tops.co.jp&gt;
Signed-off-by: Tsutomu Owa &lt;tsutomu.owa@toshiba.co.jp&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>DLM: fix to use sk_callback_lock correctly</title>
<updated>2017-09-25T17:45:21Z</updated>
<author>
<name>tsutomu.owa@toshiba.co.jp</name>
<email>tsutomu.owa@toshiba.co.jp</email>
</author>
<published>2017-09-12T09:01:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=93eaadebe9e1c28528f01204cefccc7ba050c913'/>
<id>urn:sha1:93eaadebe9e1c28528f01204cefccc7ba050c913</id>
<content type='text'>
In the current implementation, we think that exclusion control between
processing to set the callback function to the connection structure and
processing to refer to the connection structure from the callback function
was not enough. We fix them.

Signed-off-by: Tadashi Miyauchi &lt;miyauchi@toshiba-tops.co.jp&gt;
Signed-off-by: Tsutomu Owa &lt;tsutomu.owa@toshiba.co.jp&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
</feed>
