Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Enumerations | Functions
dm-region-hash.h File Reference
#include <linux/dm-dirty-log.h>

Go to the source code of this file.

Enumerations

enum  dm_rh_region_states { DM_RH_CLEAN = 0x01, DM_RH_DIRTY = 0x02, DM_RH_NOSYNC = 0x04, DM_RH_RECOVERING = 0x08 }
 

Functions

struct dm_region_hashdm_region_hash_create (void *context, void(*dispatch_bios)(void *context, struct bio_list *bios), void(*wakeup_workers)(void *context), void(*wakeup_all_recovery_waiters)(void *context), sector_t target_begin, unsigned max_recovery, struct dm_dirty_log *log, uint32_t region_size, region_t nr_regions)
 
void dm_region_hash_destroy (struct dm_region_hash *rh)
 
struct dm_dirty_log * dm_rh_dirty_log (struct dm_region_hash *rh)
 
region_t dm_rh_bio_to_region (struct dm_region_hash *rh, struct bio *bio)
 
sector_t dm_rh_region_to_sector (struct dm_region_hash *rh, region_t region)
 
voiddm_rh_region_context (struct dm_region *reg)
 
sector_t dm_rh_get_region_size (struct dm_region_hash *rh)
 
region_t dm_rh_get_region_key (struct dm_region *reg)
 
int dm_rh_get_state (struct dm_region_hash *rh, region_t region, int may_block)
 
void dm_rh_set_state (struct dm_region_hash *rh, region_t region, enum dm_rh_region_states state, int may_block)
 
void dm_rh_update_states (struct dm_region_hash *rh, int errors_handled)
 
int dm_rh_flush (struct dm_region_hash *rh)
 
void dm_rh_inc_pending (struct dm_region_hash *rh, struct bio_list *bios)
 
void dm_rh_dec (struct dm_region_hash *rh, region_t region)
 
void dm_rh_delay (struct dm_region_hash *rh, struct bio *bio)
 
void dm_rh_mark_nosync (struct dm_region_hash *rh, struct bio *bio)
 
void dm_rh_recovery_prepare (struct dm_region_hash *rh)
 
struct dm_regiondm_rh_recovery_start (struct dm_region_hash *rh)
 
void dm_rh_recovery_end (struct dm_region *reg, int error)
 
int dm_rh_recovery_in_flight (struct dm_region_hash *rh)
 
void dm_rh_start_recovery (struct dm_region_hash *rh)
 
void dm_rh_stop_recovery (struct dm_region_hash *rh)
 

Enumeration Type Documentation

Enumerator:
DM_RH_CLEAN 
DM_RH_DIRTY 
DM_RH_NOSYNC 
DM_RH_RECOVERING 

Definition at line 24 of file dm-region-hash.h.

Function Documentation

struct dm_region_hash* dm_region_hash_create ( void context,
void(*)(void *context, struct bio_list *bios dispatch_bios,
void(*)(void *context wakeup_workers,
void(*)(void *context wakeup_all_recovery_waiters,
sector_t  target_begin,
unsigned  max_recovery,
struct dm_dirty_log *  log,
uint32_t  region_size,
region_t  nr_regions 
)
read

Definition at line 159 of file dm-region-hash.c.

void dm_region_hash_destroy ( struct dm_region_hash rh)

Definition at line 234 of file dm-region-hash.c.

region_t dm_rh_bio_to_region ( struct dm_region_hash rh,
struct bio *  bio 
)

Definition at line 127 of file dm-region-hash.c.

void dm_rh_dec ( struct dm_region_hash rh,
region_t  region 
)

Definition at line 537 of file dm-region-hash.c.

void dm_rh_delay ( struct dm_region_hash rh,
struct bio *  bio 
)

Definition at line 689 of file dm-region-hash.c.

struct dm_dirty_log* dm_rh_dirty_log ( struct dm_region_hash rh)
read

Definition at line 259 of file dm-region-hash.c.

int dm_rh_flush ( struct dm_region_hash rh)

Definition at line 683 of file dm-region-hash.c.

region_t dm_rh_get_region_key ( struct dm_region reg)

Definition at line 139 of file dm-region-hash.c.

sector_t dm_rh_get_region_size ( struct dm_region_hash rh)

Definition at line 145 of file dm-region-hash.c.

int dm_rh_get_state ( struct dm_region_hash rh,
region_t  region,
int  may_block 
)

Definition at line 337 of file dm-region-hash.c.

void dm_rh_inc_pending ( struct dm_region_hash rh,
struct bio_list bios 
)

Definition at line 525 of file dm-region-hash.c.

void dm_rh_mark_nosync ( struct dm_region_hash rh,
struct bio *  bio 
)

Definition at line 394 of file dm-region-hash.c.

void dm_rh_recovery_end ( struct dm_region reg,
int  error 
)

Definition at line 660 of file dm-region-hash.c.

int dm_rh_recovery_in_flight ( struct dm_region_hash rh)

Definition at line 677 of file dm-region-hash.c.

void dm_rh_recovery_prepare ( struct dm_region_hash rh)

Definition at line 621 of file dm-region-hash.c.

struct dm_region* dm_rh_recovery_start ( struct dm_region_hash rh)
read

Definition at line 644 of file dm-region-hash.c.

void* dm_rh_region_context ( struct dm_region reg)

Definition at line 133 of file dm-region-hash.c.

sector_t dm_rh_region_to_sector ( struct dm_region_hash rh,
region_t  region 
)

Definition at line 121 of file dm-region-hash.c.

void dm_rh_set_state ( struct dm_region_hash rh,
region_t  region,
enum dm_rh_region_states  state,
int  may_block 
)
void dm_rh_start_recovery ( struct dm_region_hash rh)

Definition at line 710 of file dm-region-hash.c.

void dm_rh_stop_recovery ( struct dm_region_hash rh)

Definition at line 700 of file dm-region-hash.c.

void dm_rh_update_states ( struct dm_region_hash rh,
int  errors_handled 
)

Definition at line 439 of file dm-region-hash.c.