From: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
To: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk,
linux-kernel@vger.kernel.org
Cc: criu@openvz.org, skinsbursky@virtuozzo.com
Subject: [PATCH RFC 1/3] pipe: make is_packetized() non-static and declare in pipe_fs_i.h
Date: Tue, 15 Dec 2015 21:29:01 +0400 [thread overview]
Message-ID: <20151215172901.16355.80770.stgit@localhost.localdomain> (raw)
In-Reply-To: <20151215172356.16355.29361.stgit@localhost.localdomain>
With introduction of packetized pipe mode, represented by O_DIRECT flag,
splice stopped working correctly with a pipe in this mode.
To be able to fix them, this helper have to exposed.
Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
---
fs/pipe.c | 2 +-
include/linux/pipe_fs_i.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/pipe.c b/fs/pipe.c
index 42cf8dd..645d142 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -329,7 +329,7 @@ pipe_read(struct kiocb *iocb, struct iov_iter *to)
return ret;
}
-static inline int is_packetized(struct file *file)
+int is_packetized(struct file *file)
{
return (file->f_flags & O_DIRECT) != 0;
}
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
index eb8b8ac..9fdaf8f 100644
--- a/include/linux/pipe_fs_i.h
+++ b/include/linux/pipe_fs_i.h
@@ -146,4 +146,6 @@ struct pipe_inode_info *get_pipe_info(struct file *file);
int create_pipe_files(struct file **, int);
+int is_packetized(struct file *file);
+
#endif
next prev parent reply other threads:[~2015-12-15 17:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-15 17:28 [PATCH RFC 0/3] Fix splice for packetized pipes Stanislav Kinsburskiy
2015-12-15 17:29 ` Stanislav Kinsburskiy [this message]
2015-12-15 17:29 ` [PATCH RFC 2/3] splice: new SPLICE_F_PACKET flag introduced Stanislav Kinsburskiy
2015-12-15 17:29 ` [PATCH RFC 3/3] splice: add support of splicing to packetized pipe Stanislav Kinsburskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151215172901.16355.80770.stgit@localhost.localdomain \
--to=skinsbursky@virtuozzo.com \
--cc=criu@openvz.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).