summaryrefslogtreecommitdiffstats
path: root/fs/orangefs/orangefs-bufmap.h
diff options
context:
space:
mode:
authorMike Marshall2019-03-25 23:59:29 +0100
committerMike Marshall2019-05-03 20:32:39 +0200
commitdd59a6475c4cf69afac2ade01ab732b7825a2a45 (patch)
treea7e8b69bef478fed6ed5056df3cc58bb7697522e /fs/orangefs/orangefs-bufmap.h
parentorangefs: pass slot index back to readpage. (diff)
downloadkernel-qcow2-linux-dd59a6475c4cf69afac2ade01ab732b7825a2a45.tar.gz
kernel-qcow2-linux-dd59a6475c4cf69afac2ade01ab732b7825a2a45.tar.xz
kernel-qcow2-linux-dd59a6475c4cf69afac2ade01ab732b7825a2a45.zip
orangefs: copy Orangefs-sized blocks into the pagecache if possible.
->readpage looks in file->private_data to try and find out how the userspace program set "count" in read(2) or with "dd bs=" or whatever. ->readpage uses "count" and inode->i_size to calculate how much data Orangefs should deposit in the Orangefs shared buffer, and remembers which slot the data is in. After copying data from the Orangefs shared buffer slot into "the page", readpage tries to increment through the pagecache index and fill as many pages as it can from the extra data in the shared buffer. Hopefully these extra pages will soon be needed by the vfs, and they'll be in the pagecache already. Signed-off-by: Mike Marshall <hubcap@omnibond.com> Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Diffstat (limited to 'fs/orangefs/orangefs-bufmap.h')
-rw-r--r--fs/orangefs/orangefs-bufmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/orangefs/orangefs-bufmap.h b/fs/orangefs/orangefs-bufmap.h
index c2c3c5a0eeab..75b2d2833af1 100644
--- a/fs/orangefs/orangefs-bufmap.h
+++ b/fs/orangefs/orangefs-bufmap.h
@@ -34,4 +34,6 @@ int orangefs_bufmap_copy_to_iovec(struct iov_iter *iter,
int buffer_index,
size_t size);
+void orangefs_bufmap_page_fill(void *kaddr, int buffer_index, int slot_index);
+
#endif /* __ORANGEFS_BUFMAP_H */