Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 2 | /* |
3 | * (C) 2001 Clemson University and The University of Chicago | ||||
4 | * | ||||
5 | * See COPYING in top-level directory. | ||||
6 | */ | ||||
7 | |||||
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 8 | #ifndef __ORANGEFS_BUFMAP_H |
9 | #define __ORANGEFS_BUFMAP_H | ||||
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 10 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 11 | int orangefs_bufmap_size_query(void); |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 12 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 13 | int orangefs_bufmap_shift_query(void); |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 14 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 15 | int orangefs_bufmap_initialize(struct ORANGEFS_dev_map_desc *user_desc); |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 16 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 17 | void orangefs_bufmap_finalize(void); |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 18 | |
Al Viro | ea2c9c9 | 2016-02-13 21:01:21 -0500 | [diff] [blame] | 19 | void orangefs_bufmap_run_down(void); |
20 | |||||
Al Viro | b8a99a8 | 2016-02-16 20:10:26 -0500 | [diff] [blame] | 21 | int orangefs_bufmap_get(void); |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 22 | |
Al Viro | 1357d06 | 2016-02-11 21:34:52 -0500 | [diff] [blame] | 23 | void orangefs_bufmap_put(int buffer_index); |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 24 | |
Al Viro | b8a99a8 | 2016-02-16 20:10:26 -0500 | [diff] [blame] | 25 | int orangefs_readdir_index_get(void); |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 26 | |
Al Viro | 82d37f1 | 2016-02-13 21:04:51 -0500 | [diff] [blame] | 27 | void orangefs_readdir_index_put(int buffer_index); |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 28 | |
Al Viro | bf6bf60 | 2016-02-16 20:06:19 -0500 | [diff] [blame] | 29 | int orangefs_bufmap_copy_from_iovec(struct iov_iter *iter, |
Mike Marshall | 4d1c440 | 2015-09-04 10:31:16 -0400 | [diff] [blame] | 30 | int buffer_index, |
31 | size_t size); | ||||
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 32 | |
Al Viro | bf6bf60 | 2016-02-16 20:06:19 -0500 | [diff] [blame] | 33 | int orangefs_bufmap_copy_to_iovec(struct iov_iter *iter, |
Al Viro | 5c27822 | 2015-10-08 17:43:58 -0400 | [diff] [blame] | 34 | int buffer_index, |
35 | size_t size); | ||||
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 36 | |
Mike Marshall | dd59a64 | 2019-03-25 18:59:29 -0400 | [diff] [blame] | 37 | void orangefs_bufmap_page_fill(void *kaddr, int buffer_index, int slot_index); |
38 | |||||
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 39 | #endif /* __ORANGEFS_BUFMAP_H */ |