src/segcol_list.c File Reference

List implementation of segcol_t. More...

#include <stdlib.h>
#include <errno.h>
#include "segcol.h"
#include "segcol_internal.h"
#include "segcol_list.h"
#include "type_limits.h"
#include "list.h"
#include "debug.h"
Include dependency graph for segcol_list.c:

Go to the source code of this file.

Functions

static int find_seg_entry (segcol_t *segcol, struct segment_entry **entry, off_t *mapping, off_t offset)
 Finds the segment entry in the segcol_list that contains a logical offset.
static int segcol_list_clear_cache (struct segcol_list_impl *impl)
 Clears the search cache of a segcol_list_impl.
static int segcol_list_set_cache (struct segcol_list_impl *impl, struct list_node *node, off_t mapping)
 Sets the search cache of a segcol_list_impl.
int segcol_list_new (segcol_t **segcol)
 Creates a new segcol_t using a linked list implementation.

Detailed Description

List implementation of segcol_t.

Definition in file segcol_list.c.


Function Documentation

static int find_seg_entry ( segcol_t segcol,
struct segment_entry **  entry,
off_t *  mapping,
off_t  offset 
) [static]

Finds the segment entry in the segcol_list that contains a logical offset.

Parameters:
segcol the segcol_t to search
[out] entry the found entry (or NULL if not found)
[out] mapping the mapping of the found node
offset the offset to look for
Returns:
the operation error code

Definition at line 99 of file segcol_list.c.

References list_entry, segcol_find(), segcol_iter_free(), segcol_iter_get_impl(), and segcol_iter_is_valid().

Here is the call graph for this function:

static int segcol_list_clear_cache ( struct segcol_list_impl *  impl  )  [static]

Clears the search cache of a segcol_list_impl.

Parameters:
impl the segcol_list_impl
Returns:
the operation error code

Definition at line 129 of file segcol_list.c.

Referenced by segcol_list_new().

Here is the caller graph for this function:

static int segcol_list_set_cache ( struct segcol_list_impl *  impl,
struct list_node *  node,
off_t  mapping 
) [static]

Sets the search cache of a segcol_list_impl.

Parameters:
impl the segcol_list_impl
node the cached list node
mapping the logical mapping of the cached node in the segcol_list
Returns:
the operation error code

Definition at line 149 of file segcol_list.c.


Generated on Sun Nov 15 15:27:50 2009 for libbls by  doxygen 1.6.1