orangefs: remove wrapper around mutex_lock(&inode->i_mutex)
[cascardo/linux.git] / fs / orangefs / orangefs-bufmap.h
1 /*
2  * (C) 2001 Clemson University and The University of Chicago
3  *
4  * See COPYING in top-level directory.
5  */
6
7 #ifndef __ORANGEFS_BUFMAP_H
8 #define __ORANGEFS_BUFMAP_H
9
10 struct orangefs_bufmap;
11
12 int orangefs_bufmap_size_query(void);
13
14 int orangefs_bufmap_shift_query(void);
15
16 int orangefs_bufmap_initialize(struct ORANGEFS_dev_map_desc *user_desc);
17
18 void orangefs_bufmap_finalize(void);
19
20 void orangefs_bufmap_run_down(void);
21
22 int orangefs_bufmap_get(struct orangefs_bufmap **mapp, int *buffer_index);
23
24 void orangefs_bufmap_put(int buffer_index);
25
26 int orangefs_readdir_index_get(struct orangefs_bufmap **mapp, int *buffer_index);
27
28 void orangefs_readdir_index_put(int buffer_index);
29
30 int orangefs_bufmap_copy_from_iovec(struct orangefs_bufmap *bufmap,
31                                 struct iov_iter *iter,
32                                 int buffer_index,
33                                 size_t size);
34
35 int orangefs_bufmap_copy_to_iovec(struct orangefs_bufmap *bufmap,
36                               struct iov_iter *iter,
37                               int buffer_index,
38                               size_t size);
39
40 size_t orangefs_bufmap_copy_to_user_task_iovec(struct task_struct *tsk,
41                                            struct iovec *iovec,
42                                            unsigned long nr_segs,
43                                            struct orangefs_bufmap *bufmap,
44                                            int buffer_index,
45                                            size_t bytes_to_be_copied);
46
47 #endif /* __ORANGEFS_BUFMAP_H */