Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
drbd_req.h File Reference
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/drbd.h>
#include "drbd_int.h"
#include "drbd_wrappers.h"

Go to the source code of this file.

Data Structures

struct  bio_and_error
 

Macros

#define RQ_LOCAL_PENDING   (1UL << __RQ_LOCAL_PENDING)
 
#define RQ_LOCAL_COMPLETED   (1UL << __RQ_LOCAL_COMPLETED)
 
#define RQ_LOCAL_OK   (1UL << __RQ_LOCAL_OK)
 
#define RQ_LOCAL_ABORTED   (1UL << __RQ_LOCAL_ABORTED)
 
#define RQ_LOCAL_MASK   ((RQ_LOCAL_ABORTED << 1)-1)
 
#define RQ_NET_PENDING   (1UL << __RQ_NET_PENDING)
 
#define RQ_NET_QUEUED   (1UL << __RQ_NET_QUEUED)
 
#define RQ_NET_SENT   (1UL << __RQ_NET_SENT)
 
#define RQ_NET_DONE   (1UL << __RQ_NET_DONE)
 
#define RQ_NET_OK   (1UL << __RQ_NET_OK)
 
#define RQ_NET_SIS   (1UL << __RQ_NET_SIS)
 
#define RQ_NET_MASK   (((1UL << __RQ_NET_MAX)-1) & ~RQ_LOCAL_MASK)
 
#define RQ_WRITE   (1UL << __RQ_WRITE)
 
#define RQ_IN_ACT_LOG   (1UL << __RQ_IN_ACT_LOG)
 
#define MR_WRITE_SHIFT   0
 
#define MR_WRITE   (1 << MR_WRITE_SHIFT)
 
#define MR_READ_SHIFT   1
 
#define MR_READ   (1 << MR_READ_SHIFT)
 

Enumerations

enum  drbd_req_event {
  created, to_be_send, to_be_submitted, queue_for_net_write,
  queue_for_net_read, queue_for_send_oos, send_canceled, send_failed,
  handed_over_to_network, oos_handed_to_network, connection_lost_while_pending, read_retry_remote_canceled,
  recv_acked_by_peer, write_acked_by_peer, write_acked_by_peer_and_sis, conflict_discarded_by_peer,
  neg_acked, barrier_acked, data_received, read_completed_with_error,
  read_ahead_completed_with_error, write_completed_with_error, abort_disk_io, completed_ok,
  resend, fail_frozen_disk_io, restart_frozen_disk_io, nothing
}
 
enum  drbd_req_state_bits {
  __RQ_LOCAL_PENDING, __RQ_LOCAL_COMPLETED, __RQ_LOCAL_OK, __RQ_LOCAL_ABORTED,
  __RQ_NET_PENDING, __RQ_NET_QUEUED, __RQ_NET_SENT, __RQ_NET_DONE,
  __RQ_NET_OK, __RQ_NET_SIS, __RQ_NET_MAX, __RQ_WRITE,
  __RQ_IN_ACT_LOG
}
 

Functions

void _req_may_be_done (struct drbd_request *req, struct bio_and_error *m)
 
int __req_mod (struct drbd_request *req, enum drbd_req_event what, struct bio_and_error *m)
 
void complete_master_bio (struct drbd_conf *mdev, struct bio_and_error *m)
 
void request_timer_fn (unsigned long data)
 
void tl_restart (struct drbd_conf *mdev, enum drbd_req_event what)
 

Macro Definition Documentation

#define MR_READ   (1 << MR_READ_SHIFT)

Definition at line 228 of file drbd_req.h.

#define MR_READ_SHIFT   1

Definition at line 227 of file drbd_req.h.

#define MR_WRITE   (1 << MR_WRITE_SHIFT)

Definition at line 226 of file drbd_req.h.

#define MR_WRITE_SHIFT   0

Definition at line 225 of file drbd_req.h.

#define RQ_IN_ACT_LOG   (1UL << __RQ_IN_ACT_LOG)

Definition at line 221 of file drbd_req.h.

#define RQ_LOCAL_ABORTED   (1UL << __RQ_LOCAL_ABORTED)

Definition at line 206 of file drbd_req.h.

#define RQ_LOCAL_COMPLETED   (1UL << __RQ_LOCAL_COMPLETED)

Definition at line 204 of file drbd_req.h.

#define RQ_LOCAL_MASK   ((RQ_LOCAL_ABORTED << 1)-1)

Definition at line 208 of file drbd_req.h.

#define RQ_LOCAL_OK   (1UL << __RQ_LOCAL_OK)

Definition at line 205 of file drbd_req.h.

#define RQ_LOCAL_PENDING   (1UL << __RQ_LOCAL_PENDING)

Definition at line 203 of file drbd_req.h.

#define RQ_NET_DONE   (1UL << __RQ_NET_DONE)

Definition at line 213 of file drbd_req.h.

#define RQ_NET_MASK   (((1UL << __RQ_NET_MAX)-1) & ~RQ_LOCAL_MASK)

Definition at line 218 of file drbd_req.h.

#define RQ_NET_OK   (1UL << __RQ_NET_OK)

Definition at line 214 of file drbd_req.h.

#define RQ_NET_PENDING   (1UL << __RQ_NET_PENDING)

Definition at line 210 of file drbd_req.h.

#define RQ_NET_QUEUED   (1UL << __RQ_NET_QUEUED)

Definition at line 211 of file drbd_req.h.

#define RQ_NET_SENT   (1UL << __RQ_NET_SENT)

Definition at line 212 of file drbd_req.h.

#define RQ_NET_SIS   (1UL << __RQ_NET_SIS)

Definition at line 215 of file drbd_req.h.

#define RQ_WRITE   (1UL << __RQ_WRITE)

Definition at line 220 of file drbd_req.h.

Enumeration Type Documentation

Enumerator:
created 
to_be_send 
to_be_submitted 
queue_for_net_write 
queue_for_net_read 
queue_for_send_oos 
send_canceled 
send_failed 
handed_over_to_network 
oos_handed_to_network 
connection_lost_while_pending 
read_retry_remote_canceled 
recv_acked_by_peer 
write_acked_by_peer 
write_acked_by_peer_and_sis 
conflict_discarded_by_peer 
neg_acked 
barrier_acked 
data_received 
read_completed_with_error 
read_ahead_completed_with_error 
write_completed_with_error 
abort_disk_io 
completed_ok 
resend 
fail_frozen_disk_io 
restart_frozen_disk_io 
nothing 

Definition at line 79 of file drbd_req.h.

Enumerator:
__RQ_LOCAL_PENDING 
__RQ_LOCAL_COMPLETED 
__RQ_LOCAL_OK 
__RQ_LOCAL_ABORTED 
__RQ_NET_PENDING 
__RQ_NET_QUEUED 
__RQ_NET_SENT 
__RQ_NET_DONE 
__RQ_NET_OK 
__RQ_NET_SIS 
__RQ_NET_MAX 
__RQ_WRITE 
__RQ_IN_ACT_LOG 

Definition at line 121 of file drbd_req.h.

Function Documentation

int __req_mod ( struct drbd_request req,
enum drbd_req_event  what,
struct bio_and_error m 
)

Definition at line 402 of file drbd_req.c.

void _req_may_be_done ( struct drbd_request req,
struct bio_and_error m 
)

Definition at line 214 of file drbd_req.c.

void complete_master_bio ( struct drbd_conf mdev,
struct bio_and_error m 
)

Definition at line 201 of file drbd_req.c.

void request_timer_fn ( unsigned long  data)

Definition at line 1243 of file drbd_req.c.

void tl_restart ( struct drbd_conf mdev,
enum drbd_req_event  what 
)

Definition at line 473 of file drbd_main.c.