#include "protocol.h"
#include "orangefs-kernel.h"
#include "orangefs-bufmap.h"
struct slot_map { … };
static struct slot_map rw_map = …;
static struct slot_map readdir_map = …;
static void install(struct slot_map *m, int count, unsigned long *map)
{ … }
static void mark_killed(struct slot_map *m)
{ … }
static void run_down(struct slot_map *m)
{ … }
static void put(struct slot_map *m, int slot)
{ … }
static int wait_for_free(struct slot_map *m)
{ … }
static int get(struct slot_map *m)
{ … }
struct orangefs_bufmap_desc { … };
static struct orangefs_bufmap { … } *__orangefs_bufmap;
static DEFINE_SPINLOCK(orangefs_bufmap_lock);
static void
orangefs_bufmap_unmap(struct orangefs_bufmap *bufmap)
{ … }
static void
orangefs_bufmap_free(struct orangefs_bufmap *bufmap)
{ … }
int orangefs_bufmap_size_query(void)
{ … }
int orangefs_bufmap_shift_query(void)
{ … }
static DECLARE_WAIT_QUEUE_HEAD(bufmap_waitq);
static DECLARE_WAIT_QUEUE_HEAD(readdir_waitq);
static struct orangefs_bufmap *
orangefs_bufmap_alloc(struct ORANGEFS_dev_map_desc *user_desc)
{ … }
static int
orangefs_bufmap_map(struct orangefs_bufmap *bufmap,
struct ORANGEFS_dev_map_desc *user_desc)
{ … }
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 *page_to,
int buffer_index,
int slot_index)
{ … }