summaryrefslogtreecommitdiff
path: root/fs/orangefs/orangefs-kernel.h
diff options
context:
space:
mode:
authorMike Marshall <hubcap@omnibond.com>2019-03-25 22:52:29 +0300
committerMike Marshall <hubcap@omnibond.com>2019-05-03 21:32:39 +0300
commitc2549f8c7a28c00facaf911f700c4811cfd6f52b (patch)
tree9fb589307265149e3af3029002d1d6a81de5d82e /fs/orangefs/orangefs-kernel.h
parent8f04e1be784858ba0288c7c09b9de06627a800c9 (diff)
downloadlinux-c2549f8c7a28c00facaf911f700c4811cfd6f52b.tar.xz
orangefs: remember count when reading.
Orangefs wins when it can do IO on large (up to four meg) blocks at a time, and looses when it has to do tiny "small io" reads and writes. Accessing Orangefs through the pagecache with the kernel module helps with small io, both reading and writing, a great deal. Readpage generally tries to fetch a page (four k) at a time. We'll let users use "count" (as in read(2) or pread(2) for example) as a knob to control how much data they get from Orangefs at a time and we'll try to use the data to fill extra pagecache pages when we get to ->readpage, hopefully resulting in fewer calls to readpage and Orangefs userspace. We need a way to remember how they set count so that we can still have it available when we get to ->readpage. - We'll use file->private_data to keep track of "count". We'll wrap generic_file_open with orangefs_file_open and initialize private_data to NULL there. - In ->read_iter we have access to both "count" and file, so we'll kmalloc some space onto file->private_data and store "count" there. - We'll kfree file->private_data each time we visit ->flush and reinitialize it to NULL. Signed-off-by: Mike Marshall <hubcap@omnibond.com> Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Diffstat (limited to 'fs/orangefs/orangefs-kernel.h')
-rw-r--r--fs/orangefs/orangefs-kernel.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/orangefs/orangefs-kernel.h b/fs/orangefs/orangefs-kernel.h
index 87beab10326a..3ae2f129b9c7 100644
--- a/fs/orangefs/orangefs-kernel.h
+++ b/fs/orangefs/orangefs-kernel.h
@@ -239,6 +239,10 @@ struct orangefs_write_range {
kgid_t gid;
};
+struct orangefs_read_options {
+ ssize_t blksiz;
+};
+
extern struct orangefs_stats orangefs_stats;
/*