Pass the iomap_iter structure instead of individual parameters to
various internal helpers for buffered I/O.
Signed-off-by: Christoph Hellwig
---
fs/iomap/buffered-io.c | 117 -
1 file changed, 56 insertions(+), 61 deletions(-)
diff --git a/fs/iomap
iomap_apply is unused now, so remove it.
Signed-off-by: Christoph Hellwig
---
fs/iomap/Makefile | 1 -
fs/iomap/apply.c | 99 ---
fs/iomap/trace.h | 40 -
include/linux/iomap.h | 10 -
4 files changed, 150 deletions
Switch the dax_iomap_rw implementation to use iomap_iter.
Signed-off-by: Christoph Hellwig
---
fs/dax.c | 49 -
1 file changed, 24 insertions(+), 25 deletions(-)
diff --git a/fs/dax.c b/fs/dax.c
index 4d63040fd71f56..51da45301350a6 100644
Switch iomap_zero_range to use iomap_iter.
Signed-off-by: Christoph Hellwig
---
fs/iomap/buffered-io.c | 36 ++--
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 59781c72c278e5..e5832ffb413cb6
Switch iomap_swapfile_activate to use iomap_iter.
Signed-off-by: Christoph Hellwig
---
fs/iomap/swapfile.c | 38 --
1 file changed, 16 insertions(+), 22 deletions(-)
diff --git a/fs/iomap/swapfile.c b/fs/iomap/swapfile.c
index 6250ca6a1f851d..7069606eca85b2
Rewrite iomap_seek_data to use iomap_iter.
Signed-off-by: Christoph Hellwig
---
fs/iomap/seek.c | 42 +-
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/fs/iomap/seek.c b/fs/iomap/seek.c
index 7d6ed9af925e96..0a758e3851fcb7 100644
--- a/fs
Rewrite the ->bmap implementation based on iomap_iter.
Signed-off-by: Christoph Hellwig
---
fs/iomap/fiemap.c | 31 +--
1 file changed, 13 insertions(+), 18 deletions(-)
diff --git a/fs/iomap/fiemap.c b/fs/iomap/fiemap.c
index acad09a8c188df..60daadba16c149 100
Rewrite the ->fiemap implementation based on iomap_iter.
Signed-off-by: Christoph Hellwig
---
fs/iomap/fiemap.c | 70 ---
1 file changed, 29 insertions(+), 41 deletions(-)
diff --git a/fs/iomap/fiemap.c b/fs/iomap/fiemap.c
index aab070df4a2
Switch __iomap_dio_rw to use iomap_iter.
Signed-off-by: Christoph Hellwig
---
fs/btrfs/inode.c | 5 +-
fs/iomap/direct-io.c | 162 +-
include/linux/iomap.h | 4 +-
3 files changed, 85 insertions(+), 86 deletions(-)
diff --git a/fs/btrfs/inode.c
Switch the page cache read functions to use iomap_iter instead of
iomap_apply.
Signed-off-by: Christoph Hellwig
---
fs/iomap/buffered-io.c | 79 +++---
1 file changed, 36 insertions(+), 43 deletions(-)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered
Switch iomap_page_mkwrite to use iomap_iter.
Signed-off-by: Christoph Hellwig
---
fs/iomap/buffered-io.c | 39 +--
1 file changed, 17 insertions(+), 22 deletions(-)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index e5832ffb413cb6
Switch iomap_file_buffered_write to use iomap_iter.
Signed-off-by: Christoph Hellwig
---
fs/iomap/buffered-io.c | 49 +-
1 file changed, 25 insertions(+), 24 deletions(-)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 3b18cafa72bec6
Switch iomap_file_unshare to use iomap_iter.
Signed-off-by: Christoph Hellwig
---
fs/iomap/buffered-io.c | 35 ++-
1 file changed, 18 insertions(+), 17 deletions(-)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 7195e82d15775e..59781c72c278e5
ed-off-by: Christoph Hellwig
---
fs/iomap/Makefile | 1 +
fs/iomap/iter.c | 74 +++
fs/iomap/trace.h | 37 +-
include/linux/iomap.h | 56
4 files changed, 167 insertions(+), 1 deletion(-)
creat
Hi all,
this series replies the existing callback-based iomap_apply to an iter based
model. The prime aim here is to simply the DAX reflink support, which
requires iterating through two inodes, something that is rather painful
with the apply model. It also helps to kill an indirect call per
iomap_read_page_sync never modifies the passed in iomap, so mark
it const.
Signed-off-by: Christoph Hellwig
---
fs/iomap/buffered-io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index e47380259cf7e1..8c26cf7cbd72b0 100644
iomap_read_inline_data never modifies the passed in iomap, so mark
it const.
Signed-off-by: Christoph Hellwig
---
fs/iomap/buffered-io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 75310f6fcf8401..e47380259cf7e1
Signed-off-by: Christoph Hellwig
---
fs/dax.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/dax.c b/fs/dax.c
index da41f9363568e0..4d63040fd71f56 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -1005,7 +1005,7 @@ int dax_writeback_mapping_range(struct address_space
*mapping
__block_write_begin_int never modifies the passed in iomap, so mark it
const.
Signed-off-by: Christoph Hellwig
---
fs/buffer.c | 4 ++--
fs/internal.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index 6290c3afdba488..bd6a9e9fbd64c9 100644
Signed-off-by: Christoph Hellwig
---
include/linux/iomap.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 093519d91cc9cc..f9c36df6a3061b 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -91,8 +91,7
These aren't actually used by the only instance implementing the methods.
Signed-off-by: Christoph Hellwig
---
fs/gfs2/bmap.c | 5 ++---
fs/iomap/buffered-io.c | 6 +++---
include/linux/iomap.h | 5 ++---
3 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/fs/gfs2/bmap.c b
Signed-off-by: Christoph Hellwig
---
fs/iomap/trace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/iomap/trace.h b/fs/iomap/trace.h
index fdc7ae388476f5..e9cd5cc0d6ba40 100644
--- a/fs/iomap/trace.h
+++ b/fs/iomap/trace.h
@@ -2,7 +2,7 @@
/*
* Copyright (c) 2009-2019
;
> To prevent this kind of bug from occurring in the future, make sure the
> page doesn't have private data attached in iomap_read_inline_data.
>
> Signed-off-by: Andreas Gruenbacher
Ok, given that you want a quick fix this looks good for now:
Reviewed-by: Christoph Hellwig
On Thu, Jul 08, 2021 at 09:27:37PM -0700, Darrick J. Wong wrote:
> I was under the impression that for blksize page always had to have an iop attached.
Currently it does. But I've talked since day one of the !bufferhead
iomap code that we should eventually lift that.
On Wed, Jul 07, 2021 at 01:55:24PM +0200, Andreas Gruenbacher wrote:
> Now that we create those objects in iomap_writepage_map when needed,
> there's no need to pre-create them in iomap_page_mkwrite_actor anymore.
>
> Signed-off-by: Andreas Gruenbacher
Looks good,
Reviewed-b
On Mon, Jul 05, 2021 at 08:18:23PM +0200, Andreas Gruenbacher wrote:
> In iomap_readpage_actor, don't create iop objects for inline inodes.
> Otherwise, iomap_read_inline_data will set PageUptodate without setting
> iop->uptodate, and iomap_page_release will eventually complain.
>
> To prevent
s
> which are entirely within an extent. It also allows for an iop to be
> removed from pages in the future (eg page split).
>
> Co-developed-by: Matthew Wilcox (Oracle)
> Signed-off-by: Matthew Wilcox (Oracle)
> Signed-off-by: Andreas Gruenbacher
Looks good,
Reviewed-by: Christoph Hellwig
On Mon, Jul 05, 2021 at 05:51:22PM +0200, Andreas Gruenbacher wrote:
> On Wed, Jun 30, 2021 at 2:29 PM Andreas Gruenbacher
> wrote:
> > Darrick,
> >
> > will you pick up those two patches and push them to Linus? They both
> > seem pretty safe.
>
> Hello, is there anybody out there?
>
> I've
On Mon, Jun 28, 2021 at 10:59:55PM +0100, Matthew Wilcox wrote:
> > > so permit pages without an iop to enter writeback and create an iop
> > > *then*. Would that solve your problem?
> >
> > It is the right thing to do, especially when combined with a feature
> > patch to not bother to create
On Tue, Jun 29, 2021 at 06:29:48AM +0100, Christoph Hellwig wrote:
> Hmm. Actually ->page_mkwrite is always is always called on an uptodate
> page and we even assert that. I should have remembered the whole page
> fault path better.
>
> So yeah, I think we should take pa
On Mon, Jun 28, 2021 at 06:39:09PM +0100, Matthew Wilcox wrote:
> Not hugely happy with either of these options, tbh. I'd rather we apply
> a patch akin to this one (plucked from the folio tree), so won't apply:
> so permit pages without an iop to enter writeback and create an iop
> *then*.
> - 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
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
On Tue, Jul 21, 2020 at 01:37:49PM -0700, Darrick J. Wong wrote:
> On Tue, Jul 21, 2020 at 08:31:57PM +0200, Christoph Hellwig wrote:
> > Failing to invalid the page cache means data in incoherent, which is
> > a very bad state for the system. Always fall back to buffered I/O
>
Failing to invalid the page cache means data in incoherent, which is
a very bad state for the system. Always fall back to buffered I/O
through the page cache if we can't invalidate mappings.
Signed-off-by: Christoph Hellwig
Acked-by: Dave Chinner
Reviewed-by: Goldwyn Rodrigues
---
fs/ext4
invalidating the page cache of a file.
Signed-off-by: Dave Chinner
Reviewed-by: Darrick J. Wong
Reviewed-by: Matthew Wilcox (Oracle)
Signed-off-by: Christoph Hellwig
---
fs/iomap/direct-io.c | 31 +++
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/fs
Changes since v1:
- use -ENOTBLK for the direct to buffered I/O fallback everywhere
- document the choice of -ENOTBLK better
- update a comment in XFS
This is what the classic fs/direct-io.c implementation and thuse other
file systems use.
Signed-off-by: Christoph Hellwig
---
fs/xfs/xfs_file.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 00db81eac80d6c..a6ef90457abf97
On Tue, Jul 21, 2020 at 04:31:36PM +0100, Matthew Wilcox wrote:
> > Umm, no. -ENOTBLK is internal - the file systems will retry using
> > buffered I/O and the error shall never escape to userspace (or even the
> > VFS for that matter).
>
> Ah, I made the mistake of believing the comments that I
On Tue, Jul 21, 2020 at 08:27:54AM -0700, Darrick J. Wong wrote:
> On Tue, Jul 21, 2020 at 05:16:16PM +0200, Christoph Hellwig wrote:
> > On Tue, Jul 21, 2020 at 04:14:37PM +0100, Matthew Wilcox wrote:
> > > On Tue, Jul 21, 2020 at 05:06:15PM +0200, Christoph Hellwig wrote:
>
On Tue, Jul 21, 2020 at 04:14:37PM +0100, Matthew Wilcox wrote:
> On Tue, Jul 21, 2020 at 05:06:15PM +0200, Christoph Hellwig wrote:
> > On Tue, Jul 21, 2020 at 04:04:32PM +0100, Matthew Wilcox wrote:
> > > I thought you were going to respin this with EREMCHG changed to ENOTBLK?
On Tue, Jul 21, 2020 at 04:04:32PM +0100, Matthew Wilcox wrote:
> On Tue, Jul 21, 2020 at 04:53:13PM +0200, Christoph Hellwig wrote:
> > On Mon, Jul 20, 2020 at 04:51:25PM -0500, Goldwyn Rodrigues wrote:
> > > Hi Christoph,
> > >
> > > On 9:46 13/07, Chr
On Mon, Jul 20, 2020 at 04:51:25PM -0500, Goldwyn Rodrigues wrote:
> Hi Christoph,
>
> On 9:46 13/07, Christoph Hellwig wrote:
> > Hi all,
> >
> > this series has two parts: the first one picks up Dave's patch to avoid
> > invalidation entierly for reads, p
On Mon, Jul 13, 2020 at 08:39:20AM -0700, Darrick J. Wong wrote:
> -ENOTBLK is already being used as a "magic" return code that means
> "retry this direct write as a buffered write". Shouldn't we use that
> instead?
>
> -EREMCHG was a private hack we put in XFS for the one case where a
> direct
On Mon, Jul 13, 2020 at 12:55:09PM +0100, Matthew Wilcox wrote:
> On Mon, Jul 13, 2020 at 09:46:33AM +0200, Christoph Hellwig wrote:
> > Failing to invalid the page cache means data in incoherent, which is
> > a very bad state for the system. Always fall back to buffered I/O
>
Hi all,
this series has two parts: the first one picks up Dave's patch to avoid
invalidation entierly for reads, picked up deep down from the btrfs iomap
thread. The second one falls back to buffered writes if invalidation fails
instead of leaving a stale cache around. Let me know what you
invalidating the page cache of a file.
Signed-off-by: Dave Chinner
Reviewed-by: Darrick J. Wong
Reviewed-by: Matthew Wilcox (Oracle)
Signed-off-by: Christoph Hellwig
---
fs/iomap/direct-io.c | 31 +++
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/fs
Failing to invalid the page cache means data in incoherent, which is
a very bad state for the system. Always fall back to buffered I/O
through the page cache if we can't invalidate mappings.
Signed-off-by: Christoph Hellwig
---
fs/ext4/file.c | 2 ++
fs/gfs2/file.c | 3 ++-
fs
This looks sane - slightly updated version below to not bother with
the ret and a few tidyups.
That being said and to get back to the discussion in this thread:
I think it would be saner to give up on direct I/O in case of the
invalidation failure. I've cooked up a patch on top of this one
(for
On Wed, Jul 08, 2020 at 02:54:37PM +0100, Matthew Wilcox wrote:
> Direct I/O isn't deterministic though. If the file isn't shared, then
> it works great, but as soon as you get mixed buffered and direct I/O,
> everything is already terrible. Direct I/Os perform pagecache lookups
> already, but
On Tue, Jul 07, 2020 at 01:57:05PM +0100, Matthew Wilcox wrote:
> On Tue, Jul 07, 2020 at 07:43:46AM -0500, Goldwyn Rodrigues wrote:
> > On 9:53 01/07, Christoph Hellwig wrote:
> > > On Mon, Jun 29, 2020 at 02:23:49PM -0500, Goldwyn Rodrigues wrote:
> > >
On Mon, Jun 29, 2020 at 02:23:49PM -0500, Goldwyn Rodrigues wrote:
> From: Goldwyn Rodrigues
>
> For direct I/O, add the flag IOMAP_DIO_RWF_NO_STALE_PAGECACHE to indicate
> that if the page invalidation fails, return back control to the
> filesystem so it may fallback to buffered mode.
>
>
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 | 14 ++
4 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index
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
Split out a sctp_setsockopt_bindx_kernel that takes a kernel pointer
to the sockaddr and make sctp_setsockopt_bindx a small wrapper around
it. This prepares for adding a new bind_add proto op.
Signed-off-by: Christoph Hellwig
---
net/sctp/socket.c | 61
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
On Fri, May 29, 2020 at 12:27:12PM +, David Laight wrote:
> From: Christoph Hellwig
> > Sent: 29 May 2020 13:10
> >
> > No users left.
>
> There is no point even proposing this until all the changes to remove
> its use have made it at least as far into 'net-nex
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
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
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
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
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
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
Hi Dave,
this series removes most callers of the kernel_setsockopt functions, and
instead switches their users to small functions that implement setting a
sockopt directly using a normal kernel function call with type safety and
all the other benefits of not having a function call.
In some cases
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
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
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
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
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
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
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
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
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
.
Signed-off-by: Christoph Hellwig
Acked-by: Sagi Grimberg
---
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
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
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
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
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
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
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
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
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
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
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
Acked-by: David Howells
---
Documentation/networking/rxrpc.rst | 13
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
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
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
Hi dear maintainers,
this series reduces scope from the last round and just removes
kernel_getsockopt to avoid conflicting with the sctp cleanup series.
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
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
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
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,
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
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
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
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
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
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
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
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
401 - 500 of 976 matches
Mail list logo