Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
dm-block-manager.c File Reference
#include "dm-block-manager.h"
#include "dm-persistent-data-internal.h"
#include "../dm-bufio.h"
#include <linux/crc32c.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/rwsem.h>
#include <linux/device-mapper.h>
#include <linux/stacktrace.h>

Go to the source code of this file.

Data Structures

struct  block_lock
 
struct  waiter
 
struct  buffer_aux
 
struct  dm_block_manager
 

Macros

#define DM_MSG_PREFIX   "block manager"
 
#define MAX_HOLDERS   4
 
#define MAX_STACK   10
 

Typedefs

typedef unsigned long stack_entries [MAX_STACK]
 

Functions

dm_block_t dm_block_location (struct dm_block *b)
 
 EXPORT_SYMBOL_GPL (dm_block_location)
 
voiddm_block_data (struct dm_block *b)
 
 EXPORT_SYMBOL_GPL (dm_block_data)
 
struct dm_block_managerdm_block_manager_create (struct block_device *bdev, unsigned block_size, unsigned cache_size, unsigned max_held_per_thread)
 
 EXPORT_SYMBOL_GPL (dm_block_manager_create)
 
void dm_block_manager_destroy (struct dm_block_manager *bm)
 
 EXPORT_SYMBOL_GPL (dm_block_manager_destroy)
 
unsigned dm_bm_block_size (struct dm_block_manager *bm)
 
 EXPORT_SYMBOL_GPL (dm_bm_block_size)
 
dm_block_t dm_bm_nr_blocks (struct dm_block_manager *bm)
 
int dm_bm_read_lock (struct dm_block_manager *bm, dm_block_t b, struct dm_block_validator *v, struct dm_block **result)
 
 EXPORT_SYMBOL_GPL (dm_bm_read_lock)
 
int dm_bm_write_lock (struct dm_block_manager *bm, dm_block_t b, struct dm_block_validator *v, struct dm_block **result)
 
 EXPORT_SYMBOL_GPL (dm_bm_write_lock)
 
int dm_bm_read_try_lock (struct dm_block_manager *bm, dm_block_t b, struct dm_block_validator *v, struct dm_block **result)
 
int dm_bm_write_lock_zero (struct dm_block_manager *bm, dm_block_t b, struct dm_block_validator *v, struct dm_block **result)
 
 EXPORT_SYMBOL_GPL (dm_bm_write_lock_zero)
 
int dm_bm_unlock (struct dm_block *b)
 
 EXPORT_SYMBOL_GPL (dm_bm_unlock)
 
int dm_bm_flush_and_unlock (struct dm_block_manager *bm, struct dm_block *superblock)
 
void dm_bm_set_read_only (struct dm_block_manager *bm)
 
 EXPORT_SYMBOL_GPL (dm_bm_set_read_only)
 
u32 dm_bm_checksum (const void *data, size_t len, u32 init_xor)
 
 EXPORT_SYMBOL_GPL (dm_bm_checksum)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Joe Thornber <[email protected]>")
 
 MODULE_DESCRIPTION ("Immutable metadata library for dm")
 

Macro Definition Documentation

#define DM_MSG_PREFIX   "block manager"

Definition at line 17 of file dm-block-manager.c.

#define MAX_HOLDERS   4

Definition at line 32 of file dm-block-manager.c.

#define MAX_STACK   10

Definition at line 33 of file dm-block-manager.c.

Typedef Documentation

typedef unsigned long stack_entries[MAX_STACK]

Definition at line 35 of file dm-block-manager.c.

Function Documentation

void* dm_block_data ( struct dm_block *  b)

Definition at line 334 of file dm-block-manager.c.

dm_block_t dm_block_location ( struct dm_block *  b)

Definition at line 328 of file dm-block-manager.c.

struct dm_block_manager* dm_block_manager_create ( struct block_device bdev,
unsigned  block_size,
unsigned  cache_size,
unsigned  max_held_per_thread 
)
read

Definition at line 370 of file dm-block-manager.c.

void dm_block_manager_destroy ( struct dm_block_manager bm)

Definition at line 403 of file dm-block-manager.c.

unsigned dm_bm_block_size ( struct dm_block_manager bm)

Definition at line 410 of file dm-block-manager.c.

u32 dm_bm_checksum ( const void data,
size_t  len,
u32  init_xor 
)

Definition at line 621 of file dm-block-manager.c.

int dm_bm_flush_and_unlock ( struct dm_block_manager bm,
struct dm_block *  superblock 
)

Definition at line 596 of file dm-block-manager.c.

dm_block_t dm_bm_nr_blocks ( struct dm_block_manager bm)

Definition at line 416 of file dm-block-manager.c.

int dm_bm_read_lock ( struct dm_block_manager bm,
dm_block_t  b,
struct dm_block_validator v,
struct dm_block **  result 
)

Definition at line 446 of file dm-block-manager.c.

int dm_bm_read_try_lock ( struct dm_block_manager bm,
dm_block_t  b,
struct dm_block_validator v,
struct dm_block **  result 
)

Definition at line 515 of file dm-block-manager.c.

void dm_bm_set_read_only ( struct dm_block_manager bm)

Definition at line 615 of file dm-block-manager.c.

int dm_bm_unlock ( struct dm_block *  b)

Definition at line 579 of file dm-block-manager.c.

int dm_bm_write_lock ( struct dm_block_manager bm,
dm_block_t  b,
struct dm_block_validator v,
struct dm_block **  result 
)

Definition at line 479 of file dm-block-manager.c.

int dm_bm_write_lock_zero ( struct dm_block_manager bm,
dm_block_t  b,
struct dm_block_validator v,
struct dm_block **  result 
)

Definition at line 548 of file dm-block-manager.c.

EXPORT_SYMBOL_GPL ( dm_block_location  )
EXPORT_SYMBOL_GPL ( dm_block_data  )
EXPORT_SYMBOL_GPL ( dm_block_manager_create  )
EXPORT_SYMBOL_GPL ( dm_block_manager_destroy  )
EXPORT_SYMBOL_GPL ( dm_bm_block_size  )
EXPORT_SYMBOL_GPL ( dm_bm_read_lock  )
EXPORT_SYMBOL_GPL ( dm_bm_write_lock  )
EXPORT_SYMBOL_GPL ( dm_bm_write_lock_zero  )
EXPORT_SYMBOL_GPL ( dm_bm_unlock  )
EXPORT_SYMBOL_GPL ( dm_bm_set_read_only  )
EXPORT_SYMBOL_GPL ( dm_bm_checksum  )
MODULE_AUTHOR ( "Joe Thornber <[email protected]>"  )
MODULE_DESCRIPTION ( "Immutable metadata library for dm"  )
MODULE_LICENSE ( "GPL"  )