Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
drbd_receiver.c File Reference
#include <linux/module.h>
#include <asm/uaccess.h>
#include <net/sock.h>
#include <linux/drbd.h>
#include <linux/fs.h>
#include <linux/file.h>
#include <linux/in.h>
#include <linux/mm.h>
#include <linux/memcontrol.h>
#include <linux/mm_inline.h>
#include <linux/slab.h>
#include <linux/pkt_sched.h>
#include <linux/unistd.h>
#include <linux/vmalloc.h>
#include <linux/random.h>
#include <linux/string.h>
#include <linux/scatterlist.h>
#include "drbd_int.h"
#include "drbd_req.h"
#include "drbd_vli.h"

Go to the source code of this file.

Data Structures

struct  data_cmd
 
struct  asender_cmd
 

Macros

#define __KERNEL_SYSCALLS__
 
#define GFP_TRY   (__GFP_HIGHMEM | __GFP_NOWARN)
 
#define OVERLAPS   overlaps(i->sector, i->size, sector, size)
 

Typedefs

typedef int(* drbd_cmd_handler_f )(struct drbd_conf *, enum drbd_packets cmd, unsigned int to_receive)
 
typedef struct drbd_request *( req_validator_fn )(struct drbd_conf *mdev, u64 id, sector_t sector)
 

Enumerations

enum  finish_epoch { FE_STILL_LIVE, FE_DESTROYED, FE_RECYCLED }
 

Functions

struct drbd_epoch_entrydrbd_alloc_ee (struct drbd_conf *mdev, u64 id, sector_t sector, unsigned int data_size, gfp_t gfp_mask) __must_hold(local)
 
void drbd_free_some_ee (struct drbd_conf *mdev, struct drbd_epoch_entry *e, int is_net)
 
int drbd_release_ee (struct drbd_conf *mdev, struct list_head *list)
 
void _drbd_wait_ee_list_empty (struct drbd_conf *mdev, struct list_head *head)
 
void drbd_wait_ee_list_empty (struct drbd_conf *mdev, struct list_head *head)
 
void drbd_bump_write_ordering (struct drbd_conf *mdev, enum write_ordering_e wo) __must_hold(local)
 
int drbd_submit_ee (struct drbd_conf *mdev, struct drbd_epoch_entry *e, const unsigned rw, const int fault_type)
 
int drbd_rs_should_slow_down (struct drbd_conf *mdev, sector_t sector)
 
struct crypto_hashdrbd_crypto_alloc_digest_safe (const struct drbd_conf *mdev, const char *alg, const char *name)
 
void INFO_bm_xfer_stats (struct drbd_conf *mdev, const char *direction, struct bm_xfer_ctx *c)
 
void drbd_flush_workqueue (struct drbd_conf *mdev)
 
void drbd_free_tl_hash (struct drbd_conf *mdev)
 
int drbdd_init (struct drbd_thread *thi)
 
int drbd_asender (struct drbd_thread *thi)
 

Macro Definition Documentation

#define __KERNEL_SYSCALLS__

Definition at line 40 of file drbd_receiver.c.

#define GFP_TRY   (__GFP_HIGHMEM | __GFP_NOWARN)

Definition at line 64 of file drbd_receiver.c.

#define OVERLAPS   overlaps(i->sector, i->size, sector, size)

Typedef Documentation

typedef int(* drbd_cmd_handler_f)(struct drbd_conf *, enum drbd_packets cmd, unsigned int to_receive)

Definition at line 3692 of file drbd_receiver.c.

typedef struct drbd_request*( req_validator_fn)(struct drbd_conf *mdev, u64 id, sector_t sector)
read

Definition at line 4343 of file drbd_receiver.c.

Enumeration Type Documentation

Enumerator:
FE_STILL_LIVE 
FE_DESTROYED 
FE_RECYCLED 

Definition at line 51 of file drbd_receiver.c.

Function Documentation

void _drbd_wait_ee_list_empty ( struct drbd_conf mdev,
struct list_head head 
)

Definition at line 425 of file drbd_receiver.c.

struct drbd_epoch_entry* drbd_alloc_ee ( struct drbd_conf mdev,
u64  id,
sector_t  sector,
unsigned int  data_size,
gfp_t  gfp_mask 
)
read

Definition at line 315 of file drbd_receiver.c.

int drbd_asender ( struct drbd_thread thi)

Definition at line 4595 of file drbd_receiver.c.

void drbd_bump_write_ordering ( struct drbd_conf mdev,
enum write_ordering_e  wo 
)

drbd_bump_write_ordering() - Fall back to an other write ordering method : DRBD device. : Write ordering method to try.

Definition at line 1062 of file drbd_receiver.c.

struct crypto_hash* drbd_crypto_alloc_digest_safe ( const struct drbd_conf mdev,
const char alg,
const char name 
)
read

Definition at line 2787 of file drbd_receiver.c.

void drbd_flush_workqueue ( struct drbd_conf mdev)

Definition at line 3786 of file drbd_receiver.c.

void drbd_free_some_ee ( struct drbd_conf mdev,
struct drbd_epoch_entry e,
int  is_net 
)

Definition at line 358 of file drbd_receiver.c.

void drbd_free_tl_hash ( struct drbd_conf mdev)

Definition at line 3796 of file drbd_receiver.c.

int drbd_release_ee ( struct drbd_conf mdev,
struct list_head list 
)

Definition at line 368 of file drbd_receiver.c.

int drbd_rs_should_slow_down ( struct drbd_conf mdev,
sector_t  sector 
)

Definition at line 1929 of file drbd_receiver.c.

int drbd_submit_ee ( struct drbd_conf mdev,
struct drbd_epoch_entry e,
const unsigned  rw,
const int  fault_type 
)

drbd_submit_ee() : DRBD device. : epoch entry : flag field, see bio->bi_rw

May spread the pages to multiple bios, depending on bio_add_page restrictions.

Returns 0 if all bios have been submitted, -ENOMEM if we could not allocate enough bios, -ENOSPC (any better suggestion?) if we have not been able to bio_add_page a single page to an empty bio (which should never happen and likely indicates that the lower level IO stack is in some way broken). This has been observed on certain Xen deployments.

Definition at line 1099 of file drbd_receiver.c.

void drbd_wait_ee_list_empty ( struct drbd_conf mdev,
struct list_head head 
)

Definition at line 440 of file drbd_receiver.c.

int drbdd_init ( struct drbd_thread thi)

Definition at line 4224 of file drbd_receiver.c.

void INFO_bm_xfer_stats ( struct drbd_conf mdev,
const char direction,
struct bm_xfer_ctx c 
)

Definition at line 3512 of file drbd_receiver.c.