blob: 75b2d2833af1401e6ddb8a2d869370af7b912fd2 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Mike Marshallf7ab0932015-07-17 10:38:11 -04002/*
3 * (C) 2001 Clemson University and The University of Chicago
4 *
5 * See COPYING in top-level directory.
6 */
7
Yi Liu8bb8aef2015-11-24 15:12:14 -05008#ifndef __ORANGEFS_BUFMAP_H
9#define __ORANGEFS_BUFMAP_H
Mike Marshallf7ab0932015-07-17 10:38:11 -040010
Yi Liu8bb8aef2015-11-24 15:12:14 -050011int orangefs_bufmap_size_query(void);
Mike Marshallf7ab0932015-07-17 10:38:11 -040012
Yi Liu8bb8aef2015-11-24 15:12:14 -050013int orangefs_bufmap_shift_query(void);
Mike Marshallf7ab0932015-07-17 10:38:11 -040014
Yi Liu8bb8aef2015-11-24 15:12:14 -050015int orangefs_bufmap_initialize(struct ORANGEFS_dev_map_desc *user_desc);
Mike Marshallf7ab0932015-07-17 10:38:11 -040016
Yi Liu8bb8aef2015-11-24 15:12:14 -050017void orangefs_bufmap_finalize(void);
Mike Marshallf7ab0932015-07-17 10:38:11 -040018
Al Viroea2c9c92016-02-13 21:01:21 -050019void orangefs_bufmap_run_down(void);
20
Al Virob8a99a82016-02-16 20:10:26 -050021int orangefs_bufmap_get(void);
Mike Marshallf7ab0932015-07-17 10:38:11 -040022
Al Viro1357d062016-02-11 21:34:52 -050023void orangefs_bufmap_put(int buffer_index);
Mike Marshallf7ab0932015-07-17 10:38:11 -040024
Al Virob8a99a82016-02-16 20:10:26 -050025int orangefs_readdir_index_get(void);
Mike Marshallf7ab0932015-07-17 10:38:11 -040026
Al Viro82d37f12016-02-13 21:04:51 -050027void orangefs_readdir_index_put(int buffer_index);
Mike Marshallf7ab0932015-07-17 10:38:11 -040028
Al Virobf6bf602016-02-16 20:06:19 -050029int orangefs_bufmap_copy_from_iovec(struct iov_iter *iter,
Mike Marshall4d1c4402015-09-04 10:31:16 -040030 int buffer_index,
31 size_t size);
Mike Marshallf7ab0932015-07-17 10:38:11 -040032
Al Virobf6bf602016-02-16 20:06:19 -050033int orangefs_bufmap_copy_to_iovec(struct iov_iter *iter,
Al Viro5c278222015-10-08 17:43:58 -040034 int buffer_index,
35 size_t size);
Mike Marshallf7ab0932015-07-17 10:38:11 -040036
Mike Marshalldd59a642019-03-25 18:59:29 -040037void orangefs_bufmap_page_fill(void *kaddr, int buffer_index, int slot_index);
38
Yi Liu8bb8aef2015-11-24 15:12:14 -050039#endif /* __ORANGEFS_BUFMAP_H */