mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
dd59a6475c
->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>
39 lines
925 B
C
39 lines
925 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* (C) 2001 Clemson University and The University of Chicago
|
|
*
|
|
* See COPYING in top-level directory.
|
|
*/
|
|
|
|
#ifndef __ORANGEFS_BUFMAP_H
|
|
#define __ORANGEFS_BUFMAP_H
|
|
|
|
int orangefs_bufmap_size_query(void);
|
|
|
|
int orangefs_bufmap_shift_query(void);
|
|
|
|
int orangefs_bufmap_initialize(struct ORANGEFS_dev_map_desc *user_desc);
|
|
|
|
void orangefs_bufmap_finalize(void);
|
|
|
|
void orangefs_bufmap_run_down(void);
|
|
|
|
int orangefs_bufmap_get(void);
|
|
|
|
void orangefs_bufmap_put(int buffer_index);
|
|
|
|
int orangefs_readdir_index_get(void);
|
|
|
|
void orangefs_readdir_index_put(int buffer_index);
|
|
|
|
int orangefs_bufmap_copy_from_iovec(struct iov_iter *iter,
|
|
int buffer_index,
|
|
size_t size);
|
|
|
|
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 */
|