linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 18/56] fs/ext2: support compiling out splice
       [not found] <1415913813-362-1-git-send-email-pieter@boesman.nl>
@ 2014-11-13 21:22 ` Pieter Smith
  2014-11-13 21:22 ` [PATCH 19/56] fs/ext3: " Pieter Smith
  2014-11-13 21:22 ` [PATCH 20/56] fs/ext4: " Pieter Smith
  2 siblings, 0 replies; 4+ messages in thread
From: Pieter Smith @ 2014-11-13 21:22 UTC (permalink / raw)
  To: pieter; +Cc: Josh Triplett, Jan Kara, open list:EXT2 FILE SYSTEM, open list

Compile out splice support from ext2 when the splice-family of syscalls is not
supported by the system (i.e. CONFIG_SYSCALL_SPLICE is undefined).

Signed-off-by: Pieter Smith <pieter@boesman.nl>
---
 fs/ext2/file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ext2/file.c b/fs/ext2/file.c
index 7c87b22..8a40d04 100644
--- a/fs/ext2/file.c
+++ b/fs/ext2/file.c
@@ -74,8 +74,8 @@ const struct file_operations ext2_file_operations = {
 	.open		= dquot_file_open,
 	.release	= ext2_release_file,
 	.fsync		= ext2_fsync,
-	.splice_read	= generic_file_splice_read,
-	.splice_write	= iter_file_splice_write,
+	SPLICE_READ_INIT(generic_file_splice_read)
+	SPLICE_WRITE_INIT(iter_file_splice_write)
 };
 
 #ifdef CONFIG_EXT2_FS_XIP
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 19/56] fs/ext3: support compiling out splice
       [not found] <1415913813-362-1-git-send-email-pieter@boesman.nl>
  2014-11-13 21:22 ` [PATCH 18/56] fs/ext2: support compiling out splice Pieter Smith
@ 2014-11-13 21:22 ` Pieter Smith
  2014-11-13 21:22 ` [PATCH 20/56] fs/ext4: " Pieter Smith
  2 siblings, 0 replies; 4+ messages in thread
From: Pieter Smith @ 2014-11-13 21:22 UTC (permalink / raw)
  To: pieter
  Cc: Josh Triplett, Jan Kara, Andrew Morton, Andreas Dilger,
	open list:EXT3 FILE SYSTEM, open list

Compile out splice support from ext3 when the splice-family of syscalls is not
supported by the system (i.e. CONFIG_SYSCALL_SPLICE is undefined).

Signed-off-by: Pieter Smith <pieter@boesman.nl>
---
 fs/ext3/file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ext3/file.c b/fs/ext3/file.c
index a062fa1..e683870 100644
--- a/fs/ext3/file.c
+++ b/fs/ext3/file.c
@@ -62,8 +62,8 @@ const struct file_operations ext3_file_operations = {
 	.open		= dquot_file_open,
 	.release	= ext3_release_file,
 	.fsync		= ext3_sync_file,
-	.splice_read	= generic_file_splice_read,
-	.splice_write	= iter_file_splice_write,
+	SPLICE_READ_INIT(generic_file_splice_read)
+	SPLICE_WRITE_INIT(iter_file_splice_write)
 };
 
 const struct inode_operations ext3_file_inode_operations = {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 20/56] fs/ext4: support compiling out splice
       [not found] <1415913813-362-1-git-send-email-pieter@boesman.nl>
  2014-11-13 21:22 ` [PATCH 18/56] fs/ext2: support compiling out splice Pieter Smith
  2014-11-13 21:22 ` [PATCH 19/56] fs/ext3: " Pieter Smith
@ 2014-11-13 21:22 ` Pieter Smith
  2014-11-14  0:28   ` josh
  2 siblings, 1 reply; 4+ messages in thread
From: Pieter Smith @ 2014-11-13 21:22 UTC (permalink / raw)
  To: pieter
  Cc: Josh Triplett, Theodore Ts'o, Andreas Dilger,
	open list:EXT4 FILE SYSTEM, open list

Compile out splice support from ext4 when the splice-family of syscalls is not
supported by the system (i.e. CONFIG_SYSCALL_SPLICE is undefined).

Signed-off-by: Pieter Smith <pieter@boesman.nl>
---
 fs/ext4/file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index aca7b24..c9d2962 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -595,8 +595,8 @@ const struct file_operations ext4_file_operations = {
 	.open		= ext4_file_open,
 	.release	= ext4_release_file,
 	.fsync		= ext4_sync_file,
-	.splice_read	= generic_file_splice_read,
-	.splice_write	= iter_file_splice_write,
+	SPLICE_READ_INIT(generic_file_splice_read)
+	SPLICE_WRITE_INIT(iter_file_splice_write)
 	.fallocate	= ext4_fallocate,
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 20/56] fs/ext4: support compiling out splice
  2014-11-13 21:22 ` [PATCH 20/56] fs/ext4: " Pieter Smith
@ 2014-11-14  0:28   ` josh
  0 siblings, 0 replies; 4+ messages in thread
From: josh @ 2014-11-14  0:28 UTC (permalink / raw)
  To: Pieter Smith
  Cc: Theodore Ts'o, Andreas Dilger, open list:EXT4 FILE SYSTEM,
	open list

On Thu, Nov 13, 2014 at 10:22:57PM +0100, Pieter Smith wrote:
> Compile out splice support from ext4 when the splice-family of syscalls is not
> supported by the system (i.e. CONFIG_SYSCALL_SPLICE is undefined).
> 
> Signed-off-by: Pieter Smith <pieter@boesman.nl>

See below; you shouldn't need this or similar patches for most
filesystems at all.

>  fs/ext4/file.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/file.c b/fs/ext4/file.c
> index aca7b24..c9d2962 100644
> --- a/fs/ext4/file.c
> +++ b/fs/ext4/file.c
> @@ -595,8 +595,8 @@ const struct file_operations ext4_file_operations = {
>  	.open		= ext4_file_open,
>  	.release	= ext4_release_file,
>  	.fsync		= ext4_sync_file,
> -	.splice_read	= generic_file_splice_read,
> -	.splice_write	= iter_file_splice_write,
> +	SPLICE_READ_INIT(generic_file_splice_read)
> +	SPLICE_WRITE_INIT(iter_file_splice_write)

You can just define iter_file_splice_write as NULL when configuring out
splice.  You could almost do the same for generic_file_splice_read, but
a couple of implementations of filesystem-specific splice functions
actually call it; you can make it a no-op static inline, though.

- Josh Triplett

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-11-14  0:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1415913813-362-1-git-send-email-pieter@boesman.nl>
2014-11-13 21:22 ` [PATCH 18/56] fs/ext2: support compiling out splice Pieter Smith
2014-11-13 21:22 ` [PATCH 19/56] fs/ext3: " Pieter Smith
2014-11-13 21:22 ` [PATCH 20/56] fs/ext4: " Pieter Smith
2014-11-14  0:28   ` josh

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).