Orangefs: Swap order of include files
[linux-block.git] / fs / orangefs / pvfs2-bufmap.h
CommitLineData
f7ab093f
MM
1/*
2 * (C) 2001 Clemson University and The University of Chicago
3 *
4 * See COPYING in top-level directory.
5 */
6
7#ifndef __PVFS2_BUFMAP_H
8#define __PVFS2_BUFMAP_H
9
10/* used to describe mapped buffers */
11struct pvfs_bufmap_desc {
12 void *uaddr; /* user space address pointer */
13 struct page **page_array; /* array of mapped pages */
14 int array_count; /* size of above arrays */
15 struct list_head list_link;
16};
17
18struct pvfs2_bufmap;
19
20struct pvfs2_bufmap *pvfs2_bufmap_ref(void);
21void pvfs2_bufmap_unref(struct pvfs2_bufmap *bufmap);
22
23/*
24 * pvfs_bufmap_size_query is now an inline function because buffer
25 * sizes are not hardcoded
26 */
27int pvfs_bufmap_size_query(void);
28
29int pvfs_bufmap_shift_query(void);
30
31int pvfs_bufmap_initialize(struct PVFS_dev_map_desc *user_desc);
32
33int get_bufmap_init(void);
34
35void pvfs_bufmap_finalize(void);
36
37int pvfs_bufmap_get(struct pvfs2_bufmap **mapp, int *buffer_index);
38
39void pvfs_bufmap_put(struct pvfs2_bufmap *bufmap, int buffer_index);
40
41int readdir_index_get(struct pvfs2_bufmap **mapp, int *buffer_index);
42
43void readdir_index_put(struct pvfs2_bufmap *bufmap, int buffer_index);
44
45int pvfs_bufmap_copy_iovec_from_user(struct pvfs2_bufmap *bufmap,
46 int buffer_index,
47 const struct iovec *iov,
48 unsigned long nr_segs,
49 size_t size);
50
51int pvfs_bufmap_copy_iovec_from_kernel(struct pvfs2_bufmap *bufmap,
52 int buffer_index,
53 const struct iovec *iov,
54 unsigned long nr_segs,
55 size_t size);
56
57int pvfs_bufmap_copy_to_user_iovec(struct pvfs2_bufmap *bufmap,
58 int buffer_index,
59 const struct iovec *iov,
60 unsigned long nr_segs,
61 size_t size);
62
63int pvfs_bufmap_copy_to_kernel_iovec(struct pvfs2_bufmap *bufmap,
64 int buffer_index,
65 const struct iovec *iov,
66 unsigned long nr_segs,
67 size_t size);
68
69size_t pvfs_bufmap_copy_to_user_task_iovec(struct task_struct *tsk,
70 struct iovec *iovec,
71 unsigned long nr_segs,
72 struct pvfs2_bufmap *bufmap,
73 int buffer_index,
74 size_t bytes_to_be_copied);
75
76#endif /* __PVFS2_BUFMAP_H */