linux/fs/orangefs/orangefs-bufmap.c

// SPDX-License-Identifier: GPL-2.0
/*
 * (C) 2001 Clemson University and The University of Chicago
 *
 * See COPYING in top-level directory.
 */
#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)
{}

/* used to describe mapped buffers */
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)
{}

/*
 * XXX: Can the size and shift change while the caller gives up the
 * XXX: lock between calling this and doing something useful?
 */

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)
{}

/*
 * orangefs_bufmap_initialize()
 *
 * initializes the mapped buffer interface
 *
 * returns 0 on success, -errno on failure
 */
int orangefs_bufmap_initialize(struct ORANGEFS_dev_map_desc *user_desc)
{}

/*
 * orangefs_bufmap_finalize()
 *
 * shuts down the mapped buffer interface and releases any resources
 * associated with it
 *
 * no return value
 */
void orangefs_bufmap_finalize(void)
{}

void orangefs_bufmap_run_down(void)
{}

/*
 * orangefs_bufmap_get()
 *
 * gets a free mapped buffer descriptor, will sleep until one becomes
 * available if necessary
 *
 * returns slot on success, -errno on failure
 */
int orangefs_bufmap_get(void)
{}

/*
 * orangefs_bufmap_put()
 *
 * returns a mapped buffer descriptor to the collection
 *
 * no return value
 */
void orangefs_bufmap_put(int buffer_index)
{}

/*
 * orangefs_readdir_index_get()
 *
 * gets a free descriptor, will sleep until one becomes
 * available if necessary.
 * Although the readdir buffers are not mapped into kernel space
 * we could do that at a later point of time. Regardless, these
 * indices are used by the client-core.
 *
 * returns slot on success, -errno on failure
 */
int orangefs_readdir_index_get(void)
{}

void orangefs_readdir_index_put(int buffer_index)
{}

/*
 * we've been handed an iovec, we need to copy it to
 * the shared memory descriptor at "buffer_index".
 */
int orangefs_bufmap_copy_from_iovec(struct iov_iter *iter,
				int buffer_index,
				size_t size)
{}

/*
 * we've been handed an iovec, we need to fill it from
 * the shared memory descriptor at "buffer_index".
 */
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)
{}