From: Mitsuo Hayasaka <mitsuo.hayasaka.hu@hitachi.com>
To: Miklos Szeredi <miklos@szeredi.hu>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
Muthukumar R <muthur@gmail.com>
Cc: fuse-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org,
yrl.pp-manager.tt@hitachi.com,
Mitsuo Hayasaka <mitsuo.hayasaka.hu@hitachi.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
Muthukumar R <muthur@gmail.com>,
Miklos Szeredi <miklos@szeredi.hu>
Subject: [PATCH -v2 1/6] pipe: make the maximum pipe size referable from kernel module
Date: Thu, 19 Jul 2012 21:49:07 +0900 [thread overview]
Message-ID: <20120719124907.6250.16564.stgit@ltc137.sdl.hitachi.co.jp> (raw)
In-Reply-To: <20120719124851.6250.43316.stgit@ltc137.sdl.hitachi.co.jp>
Make the maximum pipe size referable from a kernel module.
The /proc/sys/fs/pipe-max-size defines an upper limit for the
capacity of a pipe. It is also used as an upper limit of a
fuse read/write request size in this patch series. So, it
is necessary to make it referable from a kernel module.
Signed-off-by: Mitsuo Hayasaka <mitsuo.hayasaka.hu@hitachi.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Muthukumar R <muthur@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
---
fs/pipe.c | 7 +++++++
include/linux/pipe_fs_i.h | 3 +++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/fs/pipe.c b/fs/pipe.c
index 49c1065..f0f3768 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -36,6 +36,13 @@ unsigned int pipe_max_size = 1048576;
*/
unsigned int pipe_min_size = PAGE_SIZE;
+/* get pipe_max_size */
+unsigned int pipe_get_max_size(void)
+{
+ return pipe_max_size;
+}
+EXPORT_SYMBOL(pipe_get_max_size);
+
/*
* We use a start+len construction, which provides full use of the
* allocated memory.
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
index e1ac1ce..50a16dd 100644
--- a/include/linux/pipe_fs_i.h
+++ b/include/linux/pipe_fs_i.h
@@ -134,6 +134,9 @@ struct pipe_buf_operations {
memory allocation, whereas PIPE_BUF makes atomicity guarantees. */
#define PIPE_SIZE PAGE_SIZE
+/* get pipe_max_size */
+unsigned int pipe_get_max_size(void);
+
/* Pipe lock and unlock operations */
void pipe_lock(struct pipe_inode_info *);
void pipe_unlock(struct pipe_inode_info *);
next prev parent reply other threads:[~2012-07-19 12:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-19 12:48 [PATCH -v2 0/6] fuse: make maximum read/write request size tunable Mitsuo Hayasaka
2012-07-19 12:49 ` Mitsuo Hayasaka [this message]
2012-07-19 12:49 ` [PATCH -v2 2/6] fuse: make the " Mitsuo Hayasaka
2012-08-08 14:04 ` Miklos Szeredi
2012-07-19 12:49 ` [PATCH -v2 3/6] fuse: remove cache for fuse request allocation Mitsuo Hayasaka
2012-07-19 12:49 ` [PATCH -v2 4/6] fuse: add a sysfs parameter to control the maximum request size Mitsuo Hayasaka
2012-08-08 14:43 ` Miklos Szeredi
2012-07-19 12:49 ` [PATCH -v2 5/6] fuse: set default global limit considering tunable " Mitsuo Hayasaka
2012-07-19 12:50 ` [PATCH -v2 6/6] fuse: add documentation of sysfs parameter to limit maximum fuse " Mitsuo Hayasaka
2012-07-19 17:51 ` Rob Landley
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=20120719124907.6250.16564.stgit@ltc137.sdl.hitachi.co.jp \
--to=mitsuo.hayasaka.hu@hitachi.com \
--cc=akpm@linux-foundation.org \
--cc=fuse-devel@lists.sourceforge.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=muthur@gmail.com \
--cc=viro@zeniv.linux.org.uk \
--cc=yrl.pp-manager.tt@hitachi.com \
/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
all inboxes | Powered by JetHome®