[Cluster-devel] [PATCH 09/12] gfs2: hold i_rwsem until AIO completes

2020-01-14 Thread Christoph Hellwig
. It might also make sense to use the same scheme for the gfs2 internal cluster lock. Signed-off-by: Christoph Hellwig --- fs/gfs2/bmap.c | 2 -- fs/gfs2/file.c | 6 -- fs/gfs2/glops.c | 10 ++ 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/fs/gfs2/bmap.c b/fs/gfs2

[Cluster-devel] [PATCH 01/12] mm: fix a comment in sys_swapon

2020-01-14 Thread Christoph Hellwig
claim_swapfile now always takes i_rwsem. Signed-off-by: Christoph Hellwig --- mm/swapfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/swapfile.c b/mm/swapfile.c index bb3261d45b6a..fe6e4c1add0b 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -3157,7 +3157,7

[Cluster-devel] [PATCH 08/12] ext4: hold i_rwsem until AIO completes

2020-01-14 Thread Christoph Hellwig
Switch ext4 from the magic i_dio_count scheme to just hold i_rwsem until the actual I/O has completed to reduce the locking complexity and avoid nasty bugs due to missing inode_dio_wait calls. Signed-off-by: Christoph Hellwig --- fs/ext4/extents.c | 12 fs/ext4/file.c

[Cluster-devel] [PATCH 10/12] xfs: hold i_rwsem until AIO completes

2020-01-14 Thread Christoph Hellwig
Switch ext4 from the magic i_dio_count scheme to just hold i_rwsem until the actual I/O has completed to reduce the locking complexity and avoid nasty bugs due to missing inode_dio_wait calls. Signed-off-by: Christoph Hellwig --- fs/xfs/scrub/bmap.c| 1 - fs/xfs/xfs_bmap_util.c | 3

[Cluster-devel] [PATCH 03/12] xfs: fix IOCB_NOWAIT handling in xfs_file_dio_aio_read

2020-01-14 Thread Christoph Hellwig
Direct I/O reads can also be used with RWF_NOWAIT & co. Fix the inode locking in xfs_file_dio_aio_read to take IOCB_NOWAIT into account. Signed-off-by: Christoph Hellwig --- fs/xfs/xfs_file.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/xfs/xfs_file.c b/fs

[Cluster-devel] [PATCH 04/12] gfs2: move setting current->backing_dev_info

2020-01-14 Thread Christoph Hellwig
Only set current->backing_dev_info just around the buffered write calls to prepare for the next fix. Signed-off-by: Christoph Hellwig --- fs/gfs2/file.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 9d58295cc

[Cluster-devel] [PATCH 06/12] iomap: pass a flags value to iomap_dio_rw

2020-01-14 Thread Christoph Hellwig
Replace the wait_for_completion flag in struct iomap_dio with a new IOMAP_DIO_SYNCHRONOUS flag for dio->flags, and allow passing the initial flags to iomap_dio_rw. Also take the check for synchronous iocbs into iomap_dio_rw instead of duplicating it in all the callers. Signed-off-by: Christ

[Cluster-devel] [PATCH 05/12] gfs2: fix O_SYNC write handling

2020-01-14 Thread Christoph Hellwig
Don't ignore the return value from generic_write_sync for the direct to buffered I/O callback case when written is non-zero. Also don't bother to call generic_write_sync for the pure direct I/O case, as iomap_dio_rw already takes care of that. Signed-off-by: Christoph Hellwig --- fs/gfs2

[Cluster-devel] [PATCH 11/12] xfs: don't set IOMAP_DIO_SYNCHRONOUS for unaligned I/O

2020-01-14 Thread Christoph Hellwig
Now that i_rwsem is held until asynchronous writes complete, there is no need to force them to execute synchronously, as the i_rwsem protection is exactly the same as for synchronous writes. Signed-off-by: Christoph Hellwig --- fs/xfs/xfs_file.c | 12 +++- 1 file changed, 3 insertions

[Cluster-devel] [PATCH 12/12] iomap: remove the inode_dio_begin/end calls

2020-01-14 Thread Christoph Hellwig
Now that all iomap users hold i_rwsem over asynchronous I/O operations these calls can be removed. Signed-off-by: Christoph Hellwig --- fs/iomap/direct-io.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c index 0113ac33b0a0..c90ec82e8e08 100644

[Cluster-devel] [PATCH 02/12] locking/rwsem: Exit early when held by an anonymous owner

2020-01-14 Thread Christoph Hellwig
the task_struct ->on_cpu field of a -8 value. XXX: This might be a bit of a hack as the code otherwise doesn't use the ERR_PTR family macros, better suggestions welcome. Signed-off-by: Christoph Hellwig --- kernel/locking/rwsem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/locking/rwsem.

[Cluster-devel] RFC: hold i_rwsem until aio completes

2020-01-14 Thread Christoph Hellwig
Hi all, Asynchronous read/write operations currently use a rather magic locking scheme, were access to file data is normally protected using a rw_semaphore, but if we are doing aio where the syscall returns to userspace before the I/O has completed we also use an atomic_t to track the outstanding

[Cluster-devel] [PATCH 10/33] tcp: add tcp_sock_set_cork

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the TCP_CORK sockopt from kernel space without going through a fake uaccess. Cleanup the callers to avoid pointless wrappers now that this is a simple function call. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_int.h | 14 drivers

[Cluster-devel] [PATCH 19/33] ipv4: add ip_sock_set_freebind

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the IP_FREEBIND sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- drivers/target/iscsi/iscsi_target_login.c | 13 +++-- include/net/ip.h | 1 + net/ipv4/ip_sockglue.c

[Cluster-devel] [PATCH 02/33] net: add sock_set_linger

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the SO_LINGER sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/tcp.c | 9 + drivers/nvme/target/tcp.c | 6 +- include/net/sock.h| 1 + net/core/sock.c | 36

[Cluster-devel] [PATCH 08/33] net: add sock_set_rcvbuf

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the SO_RCVBUFFORCE sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 7 +- include/net/sock.h | 1 + net/core/sock.c| 59 +- 3 files changed

[Cluster-devel] [PATCH 11/33] tcp: tcp_sock_set_nodelay

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the TCP_NODELAY sockopt from kernel space without going through a fake uaccess. Cleanup the callers to avoid pointless wrappers now that this is a simple function call. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_int.h | 7

[Cluster-devel] [PATCH 26/33] sctp: lift copying in addrs into sctp_setsockopt

2020-05-13 Thread Christoph Hellwig
Prepare for additional kernel-space callers of sctp_setsockopt_bindx. Signed-off-by: Christoph Hellwig --- net/sctp/socket.c | 71 ++- 1 file changed, 27 insertions(+), 44 deletions(-) diff --git a/net/sctp/socket.c b/net/sctp/socket.c index

[Cluster-devel] [PATCH 33/33] net: remove kernel_getsockopt

2020-05-13 Thread Christoph Hellwig
No users left. Signed-off-by: Christoph Hellwig --- include/linux/net.h | 2 -- net/socket.c| 34 -- 2 files changed, 36 deletions(-) diff --git a/include/linux/net.h b/include/linux/net.h index ece7513326293..e10f378194a59 100644 --- a/include/linux

[Cluster-devel] [PATCH 27/33] sctp: export sctp_setsockopt_bindx

2020-05-13 Thread Christoph Hellwig
And call it directly from dlm instead of going through kernel_setsockopt. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 13 - include/net/sctp/sctp.h | 3 +++ net/sctp/socket.c | 5 +++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/fs/dlm

[Cluster-devel] [PATCH 24/33] ipv6: add ip6_sock_set_addr_preferences

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the IPV6_ADD_PREFERENCES sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/ipv6.h | 1 + net/ipv6/ipv6_sockglue.c | 127 +-- net/sunrpc/xprtsock.c| 8

[Cluster-devel] [PATCH 32/33] sctp: add sctp_sock_get_primary_addr

2020-05-13 Thread Christoph Hellwig
Add a helper to directly get the SCTP_PRIMARY_ADDR sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 11 +++- include/net/sctp/sctp.h | 1 + net/sctp/socket.c | 57

[Cluster-devel] [PATCH 25/33] ipv6: add ip6_sock_set_recvpktinfo

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the IPV6_RECVPKTINFO sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/ipv6.h | 1 + net/ipv6/ipv6_sockglue.c | 8 net/sunrpc/svcsock.c | 11 +++ 3 files changed, 12

[Cluster-devel] [PATCH 18/33] ipv4: add ip_sock_set_tos

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the IP_TOS sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/tcp.c | 14 +++--- drivers/nvme/target/tcp.c | 10 ++ include/net/ip.h | 2 ++ net/ipv4/ip_sockglue.c

[Cluster-devel] [PATCH 09/33] net: add sock_set_reuseport

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the SO_REUSEPORT sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/sock.h| 1 + net/core/sock.c | 8 net/sunrpc/xprtsock.c | 17 + 3 files changed, 10 insertions

[Cluster-devel] [PATCH 30/33] tipc: call tsk_set_importance from tipc_topsrv_create_listener

2020-05-13 Thread Christoph Hellwig
Avoid using kernel_setsockopt for the TIPC_IMPORTANCE option when we can just use the internal helper. The only change needed is to pass a struct sock instead of tipc_sock, which is private to socket.c Signed-off-by: Christoph Hellwig --- net/tipc/socket.c | 18 +- net/tipc

[Cluster-devel] [PATCH 28/33] sctp: add sctp_sock_set_nodelay

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the SCTP_NODELAY sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 10 ++ include/net/sctp/sctp.h | 1 + net/sctp/socket.c | 8 3 files changed, 11 insertions(+), 8

[Cluster-devel] [PATCH 23/33] ipv6: add ip6_sock_set_recverr

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the IPV6_RECVERR sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/ipv6.h | 1 + net/ipv6/ipv6_sockglue.c | 10 ++ net/rxrpc/local_object.c | 10 ++ 3 files changed, 13 insertions

[Cluster-devel] [PATCH 29/33] rxrpc_sock_set_min_security_level

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the RXRPC_MIN_SECURITY_LEVEL sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/afs/rxrpc.c | 6 ++ include/net/af_rxrpc.h | 2 ++ net/rxrpc/af_rxrpc.c | 13 + 3 files changed, 17

[Cluster-devel] [PATCH 20/33] ipv4: add ip_sock_set_recverr

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the IP_RECVERR sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/ip.h | 1 + net/ipv4/ip_sockglue.c | 10 ++ net/rxrpc/local_object.c | 8 +--- 3 files changed, 12 insertions

[Cluster-devel] [PATCH 31/33] net: remove kernel_setsockopt

2020-05-13 Thread Christoph Hellwig
No users left. Signed-off-by: Christoph Hellwig --- include/linux/net.h | 2 -- net/socket.c| 31 --- 2 files changed, 33 deletions(-) diff --git a/include/linux/net.h b/include/linux/net.h index 6451425e828f5..ece7513326293 100644 --- a/include/linux/net.h

[Cluster-devel] [PATCH 14/33] tcp: add tcp_sock_set_user_timeout

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the TCP_USER_TIMEOUT sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/ocfs2/cluster/tcp.c | 22 ++ include/linux/tcp.h| 1 + net/ipv4/tcp.c | 8 net/sunrpc/xprtsock.c

[Cluster-devel] [PATCH 15/33] tcp: add tcp_sock_set_keepidle

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the TCP_KEEP_IDLE sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/linux/tcp.h | 1 + net/ipv4/tcp.c| 49 ++- net/rds/tcp_listen.c | 5 + net/sunrpc

[Cluster-devel] [PATCH 12/33] tcp: add tcp_sock_set_quickack

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the TCP_QUICKACK sockopt from kernel space without going through a fake uaccess. Cleanup the callers to avoid pointless wrappers now that this is a simple function call. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_int.h | 7 -- drivers

[Cluster-devel] [PATCH 05/33] net: add sock_bindtoindex

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the SO_BINDTOIFINDEX sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/sock.h| 1 + net/core/sock.c | 21 +++-- net/ipv4/udp_tunnel.c | 4 +--- net/ipv6

[Cluster-devel] [PATCH 06/33] net: add sock_set_timestamps

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the SO_TIMESTAMP* sockopts from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/sock.h | 1 + net/core/sock.c | 47 +--- net/rxrpc/local_object.c | 8 +-- 3

[Cluster-devel] [PATCH 07/33] net: add sock_set_keepalive

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the SO_KEEPALIVE sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 6 +- include/net/sock.h| 1 + net/core/sock.c | 10 ++ net/rds/tcp_listen.c | 6 +- net

[Cluster-devel] [PATCH 13/33] tcp: add tcp_sock_set_syncnt

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the TCP_SYNCNT sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/tcp.c | 9 + include/linux/tcp.h | 1 + net/ipv4/tcp.c | 12 3 files changed, 14 insertions

[Cluster-devel] [PATCH 16/33] tcp: add tcp_sock_set_keepintvl

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the TCP_KEEPINTVL sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/linux/tcp.h | 1 + net/ipv4/tcp.c| 12 net/rds/tcp_listen.c | 4 +--- net/sunrpc/xprtsock.c | 3 +-- 4 files

[Cluster-devel] [PATCH 04/33] net: add sock_set_sndtimeo

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the SO_SNDTIMEO_NEW sockopt from kernel space without going through a fake uaccess. The interface is simplified to only pass the seconds value, as that is the only thing needed at the moment. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 8

[Cluster-devel] [PATCH 01/33] net: add sock_set_reuseaddr

2020-05-13 Thread Christoph Hellwig
. Signed-off-by: Christoph Hellwig --- drivers/infiniband/sw/siw/siw_cm.c| 18 +- drivers/nvme/target/tcp.c | 8 +--- drivers/target/iscsi/Kconfig | 2 +- drivers/target/iscsi/iscsi_target_login.c | 9 + fs/dlm/lowcomms.c

[Cluster-devel] [PATCH 03/33] net: add sock_set_priority

2020-05-13 Thread Christoph Hellwig
Add a helper to directly set the SO_PRIORITY sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/tcp.c | 12 ++-- drivers/nvme/target/tcp.c | 18 -- include/net/sock.h| 1 + net/core/sock.c

Re: [Cluster-devel] [PATCH 27/33] sctp: export sctp_setsockopt_bindx

2020-05-15 Thread Christoph Hellwig
On Fri, May 15, 2020 at 04:20:02PM +0100, David Howells wrote: > Christoph Hellwig wrote: > > > > The advantage on using kernel_setsockopt here is that sctp module will > > > only be loaded if dlm actually creates a SCTP socket. With this > > > change, sctp

Re: [Cluster-devel] [PATCH 27/33] sctp: export sctp_setsockopt_bindx

2020-05-14 Thread Christoph Hellwig
On Wed, May 13, 2020 at 03:00:58PM -0300, Marcelo Ricardo Leitner wrote: > On Wed, May 13, 2020 at 08:26:42AM +0200, Christoph Hellwig wrote: > > And call it directly from dlm instead of going through kernel_setsockopt. > > The advantage on using kernel_setsockopt here is t

Re: [Cluster-devel] remove kernel_setsockopt and kernel_getsockopt

2020-05-14 Thread Christoph Hellwig
On Wed, May 13, 2020 at 10:38:59AM -0700, Joe Perches wrote: > It might be useful to show overall object size change. > > More EXPORT_SYMBOL uses increase object size a little. > > And not sure it matters much except it reduces overall object > size, but these patches remove (unnecessary)

Re: [Cluster-devel] [PATCH 21/33] ipv4: add ip_sock_set_mtu_discover

2020-05-14 Thread Christoph Hellwig
On Wed, May 13, 2020 at 02:17:41PM +0100, David Howells wrote: > Christoph Hellwig wrote: > > > + ip_sock_set_mtu_discover(conn->params.local->socket->sk, > > + IP_PMTUDISC_DONT); > > Um... The socket in question could be an

Re: [Cluster-devel] remove kernel_setsockopt and kernel_getsockopt

2020-05-14 Thread Christoph Hellwig
On Thu, May 14, 2020 at 08:29:30AM +, David Laight wrote: > You need to export functions that do most of the socket options > for all protocols. Only for those were we have users, and all those are covered.

Re: [Cluster-devel] remove kernel_setsockopt and kernel_getsockopt

2020-05-14 Thread 'Christoph Hellwig'
On Thu, May 14, 2020 at 10:26:41AM +, David Laight wrote: > From: Christoph Hellwig > > Only for those were we have users, and all those are covered. > > What do we tell all our users when our kernel SCTP code > no longer works? We only care about in-tree modules, just li

[Cluster-devel] is it ok to always pull in sctp for dlm, was: Re: [PATCH 27/33] sctp: export sctp_setsockopt_bindx

2020-05-14 Thread Christoph Hellwig
On Wed, May 13, 2020 at 03:00:58PM -0300, Marcelo Ricardo Leitner wrote: > On Wed, May 13, 2020 at 08:26:42AM +0200, Christoph Hellwig wrote: > > And call it directly from dlm instead of going through kernel_setsockopt. > > The advantage on using kernel_setsockopt here is t

Re: [Cluster-devel] [PATCH 20/33] ipv4: add ip_sock_set_recverr

2020-05-14 Thread Christoph Hellwig
On Wed, May 13, 2020 at 02:00:43PM -0700, Joe Perches wrote: > On Wed, 2020-05-13 at 08:26 +0200, Christoph Hellwig wrote: > > Add a helper to directly set the IP_RECVERR sockopt from kernel space > > without going through a fake uaccess. > > This seems used only with t

Re: [Cluster-devel] [PATCH 29/33] rxrpc_sock_set_min_security_level

2020-05-14 Thread Christoph Hellwig
On Wed, May 13, 2020 at 02:13:07PM +0100, David Howells wrote: > Christoph Hellwig wrote: > > > +int rxrpc_sock_set_min_security_level(struct sock *sk, unsigned int val); > > + > > Looks good - but you do need to add this to Documentation/networking/rxrpc.txt > also,

Re: [Cluster-devel] [PATCH v8 00/25] Change readahead API

2020-03-19 Thread Christoph Hellwig
Any plans to resend this with the little nitpicks fixed? I'd love to get this series into 5.7..

Re: [Cluster-devel] [PATCH v10 12/25] mm: Move end_index check out of readahead loop

2020-03-24 Thread Christoph Hellwig
William Kucharski Looks good, Reviewed-by: Christoph Hellwig

Re: [Cluster-devel] [PATCH 20/33] ipv4: add ip_sock_set_recverr

2020-05-20 Thread Christoph Hellwig
On Thu, May 14, 2020 at 04:51:26AM -0700, Joe Perches wrote: > > Mostly to keep it symmetric with the sockopt. I could probably remove > > a few arguments in the series if we want to be strict. > > My preference would use strict and add > arguments only when necessary. In a few cases that would

[Cluster-devel] [PATCH 33/33] net: remove kernel_setsockopt

2020-05-20 Thread Christoph Hellwig
No users left. Signed-off-by: Christoph Hellwig --- include/linux/net.h | 2 -- net/socket.c| 31 --- 2 files changed, 33 deletions(-) diff --git a/include/linux/net.h b/include/linux/net.h index 74ef5d7315f70..e10f378194a59 100644 --- a/include/linux/net.h

[Cluster-devel] [PATCH 25/33] ipv6: add ip6_sock_set_v6only

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the IPV6_V6ONLY sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/ipv6.h| 11 +++ net/ipv6/ip6_udp_tunnel.c | 5 + net/sunrpc/svcsock.c | 6 +- 3 files changed, 13

[Cluster-devel] [PATCH 32/33] net: add a new bind_add method

2020-05-20 Thread Christoph Hellwig
space. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 9 +++-- include/net/sock.h | 6 +- net/core/sock.c| 8 net/sctp/socket.c | 23 +++ 4 files changed, 39 insertions(+), 7 deletions(-) diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c

[Cluster-devel] [PATCH 31/33] sctp: add sctp_sock_set_nodelay

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the SCTP_NODELAY sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 10 ++ include/net/sctp/sctp.h | 7 +++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/fs/dlm

[Cluster-devel] [PATCH 28/33] ipv6: add ip6_sock_set_recvpktinfo

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the IPV6_RECVPKTINFO sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/ipv6.h | 7 +++ net/sunrpc/svcsock.c | 10 ++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include

[Cluster-devel] [PATCH 21/33] ipv4: add ip_sock_set_freebind

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the IP_FREEBIND sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- drivers/target/iscsi/iscsi_target_login.c | 13 +++-- include/net/ip.h | 1 + net/ipv4/ip_sockglue.c

[Cluster-devel] [PATCH 22/33] ipv4: add ip_sock_set_recverr

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the IP_RECVERR sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig Reviewed-by: David Howells --- include/net/ip.h | 1 + net/ipv4/ip_sockglue.c | 8 net/rxrpc/local_object.c | 8 +--- 3 files

[Cluster-devel] [PATCH 19/33] tcp: add tcp_sock_set_keepcnt

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the TCP_KEEPCNT sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/linux/tcp.h | 1 + net/ipv4/tcp.c| 12 net/rds/tcp.h | 2 +- net/rds/tcp_listen.c | 17

[Cluster-devel] [PATCH 29/33] rxrpc: add rxrpc_sock_set_min_security_level

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the RXRPC_MIN_SECURITY_LEVEL sockopt from kernel space without going through a fake uaccess. Thanks to David Howells for the documentation updates. Signed-off-by: Christoph Hellwig --- Documentation/networking/rxrpc.rst | 13 +++-- fs/afs/rxrpc.c

[Cluster-devel] [PATCH 27/33] ipv6: add ip6_sock_set_addr_preferences

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the IPV6_ADD_PREFERENCES sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/ipv6.h | 67 net/ipv6/ipv6_sockglue.c | 59

[Cluster-devel] [PATCH 30/33] tipc: call tsk_set_importance from tipc_topsrv_create_listener

2020-05-20 Thread Christoph Hellwig
Avoid using kernel_setsockopt for the TIPC_IMPORTANCE option when we can just use the internal helper. The only change needed is to pass a struct sock instead of tipc_sock, which is private to socket.c Signed-off-by: Christoph Hellwig --- net/tipc/socket.c | 18 +- net/tipc

[Cluster-devel] [PATCH 18/33] tcp: add tcp_sock_set_keepintvl

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the TCP_KEEPINTVL sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/linux/tcp.h | 1 + net/ipv4/tcp.c| 12 net/rds/tcp_listen.c | 4 +--- net/sunrpc/xprtsock.c | 3 +-- 4 files

[Cluster-devel] [PATCH 24/33] ipv4: add ip_sock_set_pktinfo

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the IP_PKTINFO sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/ip.h | 1 + net/ipv4/ip_sockglue.c | 8 net/sunrpc/svcsock.c | 5 ++--- 3 files changed, 11 insertions(+), 3 deletions

[Cluster-devel] [PATCH 16/33] tcp: add tcp_sock_set_user_timeout

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the TCP_USER_TIMEOUT sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/ocfs2/cluster/tcp.c | 22 ++ include/linux/tcp.h| 1 + net/ipv4/tcp.c | 8 net/sunrpc/xprtsock.c

[Cluster-devel] [PATCH 23/33] ipv4: add ip_sock_set_mtu_discover

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the IP_MTU_DISCOVER sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig Reviewed-by: David Howells [rxrpc bits] --- include/net/ip.h | 1 + net/ipv4/ip_sockglue.c | 11 +++ net/rxrpc/local_object.c

[Cluster-devel] [PATCH 20/33] ipv4: add ip_sock_set_tos

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the IP_TOS sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig Acked-by: Sagi Grimberg --- drivers/nvme/host/tcp.c | 14 +++--- drivers/nvme/target/tcp.c | 10 ++ include/net/ip.h | 2 ++ net

[Cluster-devel] [PATCH 08/33] net: add sock_enable_timestamps

2020-05-20 Thread Christoph Hellwig
Add a helper to directly enable timestamps instead of setting the SO_TIMESTAMP* sockopts from kernel space and going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/sock.h | 1 + net/core/sock.c | 47 +--- net/rxrpc

[Cluster-devel] [PATCH 14/33] tcp: add tcp_sock_set_quickack

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the TCP_QUICKACK sockopt from kernel space without going through a fake uaccess. Cleanup the callers to avoid pointless wrappers now that this is a simple function call. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_int.h | 7 -- drivers

[Cluster-devel] [PATCH 02/33] net: remove kernel_getsockopt

2020-05-20 Thread Christoph Hellwig
No users left. Signed-off-by: Christoph Hellwig --- include/linux/net.h | 2 -- net/socket.c| 34 -- 2 files changed, 36 deletions(-) diff --git a/include/linux/net.h b/include/linux/net.h index 6451425e828f5..74ef5d7315f70 100644 --- a/include/linux

[Cluster-devel] [PATCH 15/33] tcp: add tcp_sock_set_syncnt

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the TCP_SYNCNT sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig Acked-by: Sagi Grimberg --- drivers/nvme/host/tcp.c | 9 + include/linux/tcp.h | 1 + net/ipv4/tcp.c | 12 3 files

[Cluster-devel] [PATCH 12/33] tcp: add tcp_sock_set_cork

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the TCP_CORK sockopt from kernel space without going through a fake uaccess. Cleanup the callers to avoid pointless wrappers now that this is a simple function call. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_int.h | 14 drivers

[Cluster-devel] [PATCH 05/33] net: add sock_set_priority

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the SO_PRIORITY sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig Acked-by: Sagi Grimberg --- drivers/nvme/host/tcp.c | 12 ++-- drivers/nvme/target/tcp.c | 18 -- include/net/sock.h

[Cluster-devel] [PATCH 07/33] net: add sock_bindtoindex

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the SO_BINDTOIFINDEX sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/sock.h| 1 + net/core/sock.c | 21 +++-- net/ipv4/udp_tunnel.c | 4 +--- net/ipv6

[Cluster-devel] [PATCH 01/33] dlm: use the tcp version of accept_from_sock for sctp as well

2020-05-20 Thread Christoph Hellwig
any reason for the different way of quering the peername, or all the code duplication. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 123 ++ 1 file changed, 3 insertions(+), 120 deletions(-) diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c in

[Cluster-devel] [PATCH 11/33] net: add sock_set_reuseport

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the SO_REUSEPORT sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/sock.h| 1 + net/core/sock.c | 8 net/sunrpc/xprtsock.c | 17 + 3 files changed, 10 insertions

[Cluster-devel] [PATCH 06/33] net: add sock_set_sndtimeo

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the SO_SNDTIMEO_NEW sockopt from kernel space without going through a fake uaccess. The interface is simplified to only pass the seconds value, as that is the only thing needed at the moment. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 8

[Cluster-devel] [PATCH 13/33] tcp: add tcp_sock_set_nodelay

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the TCP_NODELAY sockopt from kernel space without going through a fake uaccess. Cleanup the callers to avoid pointless wrappers now that this is a simple function call. Signed-off-by: Christoph Hellwig Acked-by: Sagi Grimberg Acked-by: Jason Gunthorpe --- drivers

[Cluster-devel] [PATCH 10/33] net: add sock_set_rcvbuf

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the SO_RCVBUFFORCE sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 7 +- include/net/sock.h | 1 + net/core/sock.c| 59 +- 3 files changed

[Cluster-devel] [PATCH 04/33] net: add sock_no_linger

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the SO_LINGER sockopt from kernel space with onoff set to true and a linger time of 0 without going through a fake uaccess. Signed-off-by: Christoph Hellwig Acked-by: Sagi Grimberg --- drivers/nvme/host/tcp.c | 9 + drivers/nvme/target/tcp.c | 6

[Cluster-devel] [PATCH 09/33] net: add sock_set_keepalive

2020-05-20 Thread Christoph Hellwig
Add a helper to directly set the SO_KEEPALIVE sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 6 +- include/net/sock.h| 1 + net/core/sock.c | 10 ++ net/rds/tcp_listen.c | 6 +- net

Re: [Cluster-devel] [PATCH 32/33] net: add a new bind_add method

2020-05-21 Thread Christoph Hellwig
On Wed, May 20, 2020 at 08:00:25PM -0300, Marcelo Ricardo Leitner wrote: > > + if (err) > > + return err; > > + > > + lock_sock(sk); > > + err = sctp_do_bind(sk, (union sctp_addr *)addr, af->sockaddr_len); > > + if (!err) > > + err = sctp_send_asconf_add_ip(sk, addr,

Re: [Cluster-devel] remove kernel_setsockopt and kernel_getsockopt v2

2020-05-21 Thread 'Christoph Hellwig'
On Thu, May 21, 2020 at 08:01:33AM +, David Laight wrote: > How much does this increase the kernel code by? 44 files changed, 660 insertions(+), 843 deletions(-) > You are also replicating a lot of code making it more > difficult to maintain. No, I specifically don't. > I don't think the

Re: [Cluster-devel] [PATCH 31/33] sctp: add sctp_sock_set_nodelay

2020-05-21 Thread 'Christoph Hellwig'
On Thu, May 21, 2020 at 09:06:19AM +, David Laight wrote: > > > The comment still applies, though. (re the duplication) > > > > Where do you see duplication? > > The whole thing just doesn't scale. > > As soon as you get to the slightly more complex requests > like SCTP_INITMSG (which

Re: [Cluster-devel] remove kernel_setsockopt and kernel_getsockopt v2

2020-05-23 Thread Christoph Hellwig
On Wed, May 20, 2020 at 09:54:36PM +0200, Christoph Hellwig wrote: > Hi Dave, > > this series removes the kernel_setsockopt and kernel_getsockopt > functions, and instead switches their users to small functions that > implement setting (or in one case getting) a sockopt directly u

Re: [Cluster-devel] [PATCH] iomap: Fix direct I/O write consistency check

2020-09-07 Thread Christoph Hellwig
any > dirty pages in that range, the write will fail and a "Page cache > invalidation failure on direct I/O" error will be logged. Looks good, Reviewed-by: Christoph Hellwig

Re: [Cluster-devel] [PATCH RFC PKS/PMEM 24/58] fs/freevxfs: Utilize new kmap_thread()

2020-10-13 Thread Christoph Hellwig
> - kaddr = kmap(pp); > + kaddr = kmap_thread(pp); > memcpy(kaddr, vip->vii_immed.vi_immed + offset, PAGE_SIZE); > - kunmap(pp); > + kunmap_thread(pp); You only Cced me on this particular patch, which means I have absolutely no idea what kmap_thread and kunmap_thread

[Cluster-devel] [PATCH 1/2] dlm: use the tcp version of accept_from_sock for sctp as well

2020-05-27 Thread Christoph Hellwig
any reason for the different way of quering the peername, or all the code duplication. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 123 ++ 1 file changed, 3 insertions(+), 120 deletions(-) diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c in

[Cluster-devel] [PATCH 2/2] net: remove kernel_getsockopt

2020-05-27 Thread Christoph Hellwig
No users left. Signed-off-by: Christoph Hellwig --- include/linux/net.h | 2 -- net/socket.c| 34 -- 2 files changed, 36 deletions(-) diff --git a/include/linux/net.h b/include/linux/net.h index 6451425e828f5..74ef5d7315f70 100644 --- a/include/linux

[Cluster-devel] remove kernel_getsockopt

2020-05-27 Thread Christoph Hellwig
Hi dear maintainers, this series reduces scope from the last round and just removes kernel_getsockopt to avoid conflicting with the sctp cleanup series.

[Cluster-devel] [PATCH 26/28] ipv6: add ip6_sock_set_recvpktinfo

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the IPV6_RECVPKTINFO sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/ipv6.h | 7 +++ net/sunrpc/svcsock.c | 10 ++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include

[Cluster-devel] [PATCH 24/28] ipv6: add ip6_sock_set_recverr

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the IPV6_RECVERR sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig Reviewed-by: David Howells --- include/net/ipv6.h | 7 +++ net/rxrpc/local_object.c | 10 ++ 2 files changed, 9 insertions(+), 8

[Cluster-devel] [PATCH 12/28] tcp: add tcp_sock_set_quickack

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the TCP_QUICKACK sockopt from kernel space without going through a fake uaccess. Cleanup the callers to avoid pointless wrappers now that this is a simple function call. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_int.h | 7 -- drivers

[Cluster-devel] [PATCH 17/28] tcp: add tcp_sock_set_keepcnt

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the TCP_KEEPCNT sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/linux/tcp.h | 1 + net/ipv4/tcp.c| 12 net/rds/tcp.h | 2 +- net/rds/tcp_listen.c | 17

[Cluster-devel] [PATCH 10/28] tcp: add tcp_sock_set_cork

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the TCP_CORK sockopt from kernel space without going through a fake uaccess. Cleanup the callers to avoid pointless wrappers now that this is a simple function call. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_int.h | 14 drivers

[Cluster-devel] [PATCH 14/28] tcp: add tcp_sock_set_user_timeout

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the TCP_USER_TIMEOUT sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/ocfs2/cluster/tcp.c | 22 ++ include/linux/tcp.h| 1 + net/ipv4/tcp.c | 8 net/sunrpc/xprtsock.c

[Cluster-devel] [PATCH 11/28] tcp: add tcp_sock_set_nodelay

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the TCP_NODELAY sockopt from kernel space without going through a fake uaccess. Cleanup the callers to avoid pointless wrappers now that this is a simple function call. Signed-off-by: Christoph Hellwig Acked-by: Sagi Grimberg Acked-by: Jason Gunthorpe --- drivers

<    1   2   3   4   5   6   7   8   9   10   >