* [PATCH] nilfs2: make splice write available again
@ 2021-02-08 11:35 Ryusuke Konishi
[not found] ` <1612784101-14353-1-git-send-email-konishi.ryusuke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Ryusuke Konishi @ 2021-02-08 11:35 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-nilfs, LKML
From: Joachim Henke <joachim.henke-kyawv7ubMNaakBO8gow8eQ@public.gmane.org>
Since 5.10, splice() or sendfile() to NILFS2 return EINVAL. This was
caused by commit 36e2c7421f02 ("fs: don't allow splice read/write
without explicit ops").
This patch initializes the splice_write field in file_operations, like
most file systems do, to restore the functionality.
Signed-off-by: Joachim Henke <joachim.henke-kyawv7ubMNaakBO8gow8eQ@public.gmane.org>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Tested-by: Ryusuke Konishi <konishi.ryusuke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org # 5.10+
---
fs/nilfs2/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/nilfs2/file.c b/fs/nilfs2/file.c
index 64bc81363c6c..e1bd592ce700 100644
--- a/fs/nilfs2/file.c
+++ b/fs/nilfs2/file.c
@@ -141,6 +141,7 @@ static int nilfs_file_mmap(struct file *file, struct vm_area_struct *vma)
/* .release = nilfs_release_file, */
.fsync = nilfs_sync_file,
.splice_read = generic_file_splice_read,
+ .splice_write = iter_file_splice_write,
};
const struct inode_operations nilfs_file_inode_operations = {
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread[parent not found: <1612784101-14353-1-git-send-email-konishi.ryusuke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] nilfs2: make splice write available again [not found] ` <1612784101-14353-1-git-send-email-konishi.ryusuke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2021-02-08 11:50 ` Ryusuke Konishi 0 siblings, 0 replies; 4+ messages in thread From: Ryusuke Konishi @ 2021-02-08 11:50 UTC (permalink / raw) To: Andrew Morton; +Cc: linux-nilfs, LKML Hi Andrew, Please send this to upstream. This fixes a regression of splice() on nilfs2. Thanks, Ryusuke Konishi On Mon, Feb 8, 2021 at 8:35 PM Ryusuke Konishi <konishi.ryusuke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > From: Joachim Henke <joachim.henke-kyawv7ubMNaakBO8gow8eQ@public.gmane.org> > > Since 5.10, splice() or sendfile() to NILFS2 return EINVAL. This was > caused by commit 36e2c7421f02 ("fs: don't allow splice read/write > without explicit ops"). > > This patch initializes the splice_write field in file_operations, like > most file systems do, to restore the functionality. > > Signed-off-by: Joachim Henke <joachim.henke-kyawv7ubMNaakBO8gow8eQ@public.gmane.org> > Signed-off-by: Ryusuke Konishi <konishi.ryusuke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Tested-by: Ryusuke Konishi <konishi.ryusuke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org # 5.10+ > --- > fs/nilfs2/file.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/nilfs2/file.c b/fs/nilfs2/file.c > index 64bc81363c6c..e1bd592ce700 100644 > --- a/fs/nilfs2/file.c > +++ b/fs/nilfs2/file.c > @@ -141,6 +141,7 @@ static int nilfs_file_mmap(struct file *file, struct vm_area_struct *vma) > /* .release = nilfs_release_file, */ > .fsync = nilfs_sync_file, > .splice_read = generic_file_splice_read, > + .splice_write = iter_file_splice_write, > }; > > const struct inode_operations nilfs_file_inode_operations = { > -- > 1.8.3.1 > ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <YAwwjEuHpfeFDqNo@localhost.localdomain>]
[parent not found: <YAwwjEuHpfeFDqNo-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>]
* [PATCH] nilfs2: make splice write available again [not found] ` <YAwwjEuHpfeFDqNo-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org> @ 2021-01-23 14:27 ` Joachim.Henke-kyawv7ubMNaakBO8gow8eQ [not found] ` <FR2P281MB0283D8B316988BB9F697BF3BB2BF0-0R0NmFYGjNp7RG94T+8yUSiYi8Yelr1yiGd9ebBGJoev3QGu/rdwKA@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Joachim.Henke-kyawv7ubMNaakBO8gow8eQ @ 2021-01-23 14:27 UTC (permalink / raw) To: linux-nilfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Joachim.Henke-kyawv7ubMNaakBO8gow8eQ Since 5.10, splice() or sendfile() to NILFS2 return EINVAL. This was probably caused by commit 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops"). This patch initializes the splice_write field in file_operations, like most file systems do, to restore the functionality. Signed-off-by: Joachim Henke <joachim.henke@t-systems.com> --- fs/nilfs2/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/nilfs2/file.c b/fs/nilfs2/file.c index 64bc81363c6cc..4c7a662047513 100644 --- a/fs/nilfs2/file.c +++ b/fs/nilfs2/file.c @@ -141,6 +141,7 @@ const struct file_operations nilfs_file_operations = { /* .release = nilfs_release_file, */ .fsync = nilfs_sync_file, .splice_read = generic_file_splice_read, + .splice_write = iter_file_splice_write, }; const struct inode_operations nilfs_file_inode_operations = { ^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <FR2P281MB0283D8B316988BB9F697BF3BB2BF0-0R0NmFYGjNp7RG94T+8yUSiYi8Yelr1yiGd9ebBGJoev3QGu/rdwKA@public.gmane.org>]
* Re: [PATCH] nilfs2: make splice write available again [not found] ` <FR2P281MB0283D8B316988BB9F697BF3BB2BF0-0R0NmFYGjNp7RG94T+8yUSiYi8Yelr1yiGd9ebBGJoev3QGu/rdwKA@public.gmane.org> @ 2021-01-23 15:12 ` Ryusuke Konishi 0 siblings, 0 replies; 4+ messages in thread From: Ryusuke Konishi @ 2021-01-23 15:12 UTC (permalink / raw) To: Joachim.Henke-kyawv7ubMNaakBO8gow8eQ; +Cc: linux-nilfs Hi, Thank you for quick patch submission. It looks good at a glance. I will check the details of the change and will try testing. Thanks, Ryusuke Konishi On Sat, Jan 23, 2021 at 11:39 PM <Joachim.Henke-kyawv7ubMNaakBO8gow8eQ@public.gmane.org> wrote: > > Since 5.10, splice() or sendfile() to NILFS2 return EINVAL. This was > probably caused by commit 36e2c7421f02 ("fs: don't allow splice > read/write without explicit ops"). > > This patch initializes the splice_write field in file_operations, like > most file systems do, to restore the functionality. > > Signed-off-by: Joachim Henke <joachim.henke-kyawv7ubMNaakBO8gow8eQ@public.gmane.org> > --- > fs/nilfs2/file.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/nilfs2/file.c b/fs/nilfs2/file.c > index 64bc81363c6cc..4c7a662047513 100644 > --- a/fs/nilfs2/file.c > +++ b/fs/nilfs2/file.c > @@ -141,6 +141,7 @@ const struct file_operations nilfs_file_operations = { > /* .release = nilfs_release_file, */ > .fsync = nilfs_sync_file, > .splice_read = generic_file_splice_read, > + .splice_write = iter_file_splice_write, > }; > > const struct inode_operations nilfs_file_inode_operations = { ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-02-08 11:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-08 11:35 [PATCH] nilfs2: make splice write available again Ryusuke Konishi
[not found] ` <1612784101-14353-1-git-send-email-konishi.ryusuke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2021-02-08 11:50 ` Ryusuke Konishi
[not found] <YAwwjEuHpfeFDqNo@localhost.localdomain>
[not found] ` <YAwwjEuHpfeFDqNo-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2021-01-23 14:27 ` Joachim.Henke-kyawv7ubMNaakBO8gow8eQ
[not found] ` <FR2P281MB0283D8B316988BB9F697BF3BB2BF0-0R0NmFYGjNp7RG94T+8yUSiYi8Yelr1yiGd9ebBGJoev3QGu/rdwKA@public.gmane.org>
2021-01-23 15:12 ` Ryusuke Konishi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).