Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
drbd_worker.c File Reference
#include <linux/module.h>
#include <linux/drbd.h>
#include <linux/sched.h>
#include <linux/wait.h>
#include <linux/mm.h>
#include <linux/memcontrol.h>
#include <linux/mm_inline.h>
#include <linux/slab.h>
#include <linux/random.h>
#include <linux/string.h>
#include <linux/scatterlist.h>
#include "drbd_int.h"
#include "drbd_req.h"

Go to the source code of this file.

Macros

#define GFP_TRY   (__GFP_HIGHMEM | __GFP_NOWARN)
 

Functions

void drbd_md_io_complete (struct bio *bio, int error)
 
void drbd_endio_read_sec_final (struct drbd_epoch_entry *e) __releases(local)
 
void drbd_endio_sec (struct bio *bio, int error)
 
void drbd_endio_pri (struct bio *bio, int error)
 
int w_read_retry_remote (struct drbd_conf *mdev, struct drbd_work *w, int cancel)
 
void drbd_csum_ee (struct drbd_conf *mdev, struct crypto_hash *tfm, struct drbd_epoch_entry *e, void *digest)
 
void drbd_csum_bio (struct drbd_conf *mdev, struct crypto_hash *tfm, struct bio *bio, void *digest)
 
int w_e_send_csum (struct drbd_conf *mdev, struct drbd_work *w, int cancel)
 
int w_resync_timer (struct drbd_conf *mdev, struct drbd_work *w, int cancel)
 
void resync_timer_fn (unsigned long data)
 
void start_resync_timer_fn (unsigned long data)
 
int w_start_resync (struct drbd_conf *mdev, struct drbd_work *w, int cancel)
 
int w_ov_finished (struct drbd_conf *mdev, struct drbd_work *w, int cancel)
 
int drbd_resync_finished (struct drbd_conf *mdev)
 
int w_e_end_data_req (struct drbd_conf *mdev, struct drbd_work *w, int cancel)
 
int w_e_end_rsdata_req (struct drbd_conf *mdev, struct drbd_work *w, int cancel)
 
int w_e_end_csum_rs_req (struct drbd_conf *mdev, struct drbd_work *w, int cancel)
 
int w_e_end_ov_req (struct drbd_conf *mdev, struct drbd_work *w, int cancel)
 
void drbd_ov_oos_found (struct drbd_conf *mdev, sector_t sector, int size)
 
int w_e_end_ov_reply (struct drbd_conf *mdev, struct drbd_work *w, int cancel)
 
int w_prev_work_done (struct drbd_conf *mdev, struct drbd_work *w, int cancel)
 
int w_send_barrier (struct drbd_conf *mdev, struct drbd_work *w, int cancel)
 
int w_send_write_hint (struct drbd_conf *mdev, struct drbd_work *w, int cancel)
 
int w_send_oos (struct drbd_conf *mdev, struct drbd_work *w, int cancel)
 
int w_send_dblock (struct drbd_conf *mdev, struct drbd_work *w, int cancel)
 
int w_send_read_req (struct drbd_conf *mdev, struct drbd_work *w, int cancel)
 
int w_restart_disk_io (struct drbd_conf *mdev, struct drbd_work *w, int cancel)
 
void resume_next_sg (struct drbd_conf *mdev)
 
void suspend_other_sg (struct drbd_conf *mdev)
 
int drbd_alter_sa (struct drbd_conf *mdev, int na)
 
void drbd_rs_controller_reset (struct drbd_conf *mdev)
 
void drbd_start_resync (struct drbd_conf *mdev, enum drbd_conns side)
 
int drbd_worker (struct drbd_thread *thi)
 

Variables

rwlock_t global_state_lock
 

Macro Definition Documentation

#define GFP_TRY   (__GFP_HIGHMEM | __GFP_NOWARN)

Definition at line 367 of file drbd_worker.c.

Function Documentation

int drbd_alter_sa ( struct drbd_conf mdev,
int  na 
)

Definition at line 1457 of file drbd_worker.c.

void drbd_csum_bio ( struct drbd_conf mdev,
struct crypto_hash tfm,
struct bio *  bio,
void digest 
)

Definition at line 299 of file drbd_worker.c.

void drbd_csum_ee ( struct drbd_conf mdev,
struct crypto_hash tfm,
struct drbd_epoch_entry e,
void digest 
)

Definition at line 272 of file drbd_worker.c.

void drbd_endio_pri ( struct bio *  bio,
int  error 
)

Definition at line 212 of file drbd_worker.c.

void drbd_endio_read_sec_final ( struct drbd_epoch_entry e)

Definition at line 101 of file drbd_worker.c.

void drbd_endio_sec ( struct bio *  bio,
int  error 
)

Definition at line 176 of file drbd_worker.c.

void drbd_md_io_complete ( struct bio *  bio,
int  error 
)

Definition at line 70 of file drbd_worker.c.

void drbd_ov_oos_found ( struct drbd_conf mdev,
sector_t  sector,
int  size 
)

Definition at line 1141 of file drbd_worker.c.

int drbd_resync_finished ( struct drbd_conf mdev)

Definition at line 780 of file drbd_worker.c.

void drbd_rs_controller_reset ( struct drbd_conf mdev)

Definition at line 1475 of file drbd_worker.c.

void drbd_start_resync ( struct drbd_conf mdev,
enum drbd_conns  side 
)

drbd_start_resync() - Start the resync process : DRBD device. : Either C_SYNC_SOURCE or C_SYNC_TARGET

This function might bring you directly into one of the C_PAUSED_SYNC_* states.

Definition at line 1494 of file drbd_worker.c.

int drbd_worker ( struct drbd_thread thi)

Definition at line 1627 of file drbd_worker.c.

void resume_next_sg ( struct drbd_conf mdev)

Definition at line 1419 of file drbd_worker.c.

void resync_timer_fn ( unsigned long  data)

Definition at line 422 of file drbd_worker.c.

void start_resync_timer_fn ( unsigned long  data)

Definition at line 733 of file drbd_worker.c.

void suspend_other_sg ( struct drbd_conf mdev)

Definition at line 1426 of file drbd_worker.c.

int w_e_end_csum_rs_req ( struct drbd_conf mdev,
struct drbd_work w,
int  cancel 
)

Definition at line 1032 of file drbd_worker.c.

int w_e_end_data_req ( struct drbd_conf mdev,
struct drbd_work w,
int  cancel 
)

w_e_end_data_req() - Worker callback, to send a P_DATA_REPLY packet in response to a P_DATA_REQUEST : DRBD device. : work object. : The connection will be closed anyways

Definition at line 948 of file drbd_worker.c.

int w_e_end_ov_reply ( struct drbd_conf mdev,
struct drbd_work w,
int  cancel 
)

Definition at line 1152 of file drbd_worker.c.

int w_e_end_ov_req ( struct drbd_conf mdev,
struct drbd_work w,
int  cancel 
)

Definition at line 1095 of file drbd_worker.c.

int w_e_end_rsdata_req ( struct drbd_conf mdev,
struct drbd_work w,
int  cancel 
)

w_e_end_rsdata_req() - Worker callback to send a P_RS_DATA_REPLY packet in response to a P_RS_DATA_REQUESTRS : DRBD device. : work object. : The connection will be closed anyways

Definition at line 984 of file drbd_worker.c.

int w_e_send_csum ( struct drbd_conf mdev,
struct drbd_work w,
int  cancel 
)

Definition at line 320 of file drbd_worker.c.

int w_ov_finished ( struct drbd_conf mdev,
struct drbd_work w,
int  cancel 
)

Definition at line 754 of file drbd_worker.c.

int w_prev_work_done ( struct drbd_conf mdev,
struct drbd_work w,
int  cancel 
)

Definition at line 1219 of file drbd_worker.c.

int w_read_retry_remote ( struct drbd_conf mdev,
struct drbd_work w,
int  cancel 
)

Definition at line 253 of file drbd_worker.c.

int w_restart_disk_io ( struct drbd_conf mdev,
struct drbd_work w,
int  cancel 
)

Definition at line 1332 of file drbd_worker.c.

int w_resync_timer ( struct drbd_conf mdev,
struct drbd_work w,
int  cancel 
)

Definition at line 408 of file drbd_worker.c.

int w_send_barrier ( struct drbd_conf mdev,
struct drbd_work w,
int  cancel 
)

Definition at line 1226 of file drbd_worker.c.

int w_send_dblock ( struct drbd_conf mdev,
struct drbd_work w,
int  cancel 
)

w_send_dblock() - Worker callback to send a P_DATA packet in order to mirror a write request : DRBD device. : work object. : The connection will be closed anyways

Definition at line 1286 of file drbd_worker.c.

int w_send_oos ( struct drbd_conf mdev,
struct drbd_work w,
int  cancel 
)

Definition at line 1264 of file drbd_worker.c.

int w_send_read_req ( struct drbd_conf mdev,
struct drbd_work w,
int  cancel 
)

w_send_read_req() - Worker callback to send a read request (P_DATA_REQUEST) packet : DRBD device. : work object. : The connection will be closed anyways

Definition at line 1308 of file drbd_worker.c.

int w_send_write_hint ( struct drbd_conf mdev,
struct drbd_work w,
int  cancel 
)

Definition at line 1257 of file drbd_worker.c.

int w_start_resync ( struct drbd_conf mdev,
struct drbd_work w,
int  cancel 
)

Definition at line 740 of file drbd_worker.c.

Variable Documentation

rwlock_t global_state_lock

Definition at line 65 of file drbd_worker.c.