Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
raid5.h File Reference
#include <linux/raid/xor.h>
#include <linux/dmaengine.h>

Go to the source code of this file.

Data Structures

struct  stripe_head
 
struct  stripe_head::stripe_operations
 
struct  stripe_head::r5dev
 
struct  stripe_head_state
 
struct  disk_info
 
struct  r5conf
 
struct  r5conf::raid5_percpu
 

Macros

#define ALGORITHM_LEFT_ASYMMETRIC   0 /* Rotating Parity N with Data Restart */
 
#define ALGORITHM_RIGHT_ASYMMETRIC   1 /* Rotating Parity 0 with Data Restart */
 
#define ALGORITHM_LEFT_SYMMETRIC   2 /* Rotating Parity N with Data Continuation */
 
#define ALGORITHM_RIGHT_SYMMETRIC   3 /* Rotating Parity 0 with Data Continuation */
 
#define ALGORITHM_PARITY_0   4 /* P or P,Q are initial devices */
 
#define ALGORITHM_PARITY_N   5 /* P or P,Q are final devices. */
 
#define ALGORITHM_ROTATING_ZERO_RESTART   8 /* DDF PRL=6 RLQ=1 */
 
#define ALGORITHM_ROTATING_N_RESTART   9 /* DDF PRL=6 RLQ=2 */
 
#define ALGORITHM_ROTATING_N_CONTINUE   10 /*DDF PRL=6 RLQ=3 */
 
#define ALGORITHM_LEFT_ASYMMETRIC_6   16
 
#define ALGORITHM_RIGHT_ASYMMETRIC_6   17
 
#define ALGORITHM_LEFT_SYMMETRIC_6   18
 
#define ALGORITHM_RIGHT_SYMMETRIC_6   19
 
#define ALGORITHM_PARITY_0_6   20
 
#define ALGORITHM_PARITY_N_6   ALGORITHM_PARITY_N
 

Enumerations

enum  check_states {
  check_state_idle = 0, check_state_run, check_state_run_q, check_state_run_pq,
  check_state_check_result, check_state_compute_run, check_state_compute_result
}
 
enum  reconstruct_states {
  reconstruct_state_idle = 0, reconstruct_state_prexor_drain_run, reconstruct_state_drain_run, reconstruct_state_run,
  reconstruct_state_prexor_drain_result, reconstruct_state_drain_result, reconstruct_state_result
}
 
enum  r5dev_flags {
  R5_UPTODATE, R5_LOCKED, R5_DOUBLE_LOCKED, R5_OVERWRITE,
  R5_Insync, R5_Wantread, R5_Wantwrite, R5_Overlap,
  R5_ReadNoMerge, R5_ReadError, R5_ReWrite, R5_Expanded,
  R5_Wantcompute, R5_Wantfill, R5_Wantdrain, R5_WantFUA,
  R5_SyncIO, R5_WriteError, R5_MadeGood, R5_ReadRepl,
  R5_MadeGoodRepl, R5_NeedReplace, R5_WantReplace, R5_Discard
}
 
enum  {
  STRIPE_ACTIVE, STRIPE_HANDLE, STRIPE_SYNC_REQUESTED, STRIPE_SYNCING,
  STRIPE_INSYNC, STRIPE_PREREAD_ACTIVE, STRIPE_DELAYED, STRIPE_DEGRADED,
  STRIPE_BIT_DELAY, STRIPE_EXPANDING, STRIPE_EXPAND_SOURCE, STRIPE_EXPAND_READY,
  STRIPE_IO_STARTED, STRIPE_FULL_WRITE, STRIPE_BIOFILL_RUN, STRIPE_COMPUTE_RUN,
  STRIPE_OPS_REQ_PENDING, STRIPE_ON_UNPLUG_LIST
}
 
enum  {
  STRIPE_OP_BIOFILL, STRIPE_OP_COMPUTE_BLK, STRIPE_OP_PREXOR, STRIPE_OP_BIODRAIN,
  STRIPE_OP_RECONSTRUCT, STRIPE_OP_CHECK
}
 

Functions

int md_raid5_congested (struct mddev *mddev, int bits)
 
void md_raid5_kick_device (struct r5conf *conf)
 
int raid5_set_cache_size (struct mddev *mddev, int size)
 

Macro Definition Documentation

#define ALGORITHM_LEFT_ASYMMETRIC   0 /* Rotating Parity N with Data Restart */

Definition at line 468 of file raid5.h.

#define ALGORITHM_LEFT_ASYMMETRIC_6   16

Definition at line 501 of file raid5.h.

#define ALGORITHM_LEFT_SYMMETRIC   2 /* Rotating Parity N with Data Continuation */

Definition at line 470 of file raid5.h.

#define ALGORITHM_LEFT_SYMMETRIC_6   18

Definition at line 503 of file raid5.h.

#define ALGORITHM_PARITY_0   4 /* P or P,Q are initial devices */

Definition at line 476 of file raid5.h.

#define ALGORITHM_PARITY_0_6   20

Definition at line 505 of file raid5.h.

#define ALGORITHM_PARITY_N   5 /* P or P,Q are final devices. */

Definition at line 477 of file raid5.h.

#define ALGORITHM_PARITY_N_6   ALGORITHM_PARITY_N

Definition at line 506 of file raid5.h.

#define ALGORITHM_RIGHT_ASYMMETRIC   1 /* Rotating Parity 0 with Data Restart */

Definition at line 469 of file raid5.h.

#define ALGORITHM_RIGHT_ASYMMETRIC_6   17

Definition at line 502 of file raid5.h.

#define ALGORITHM_RIGHT_SYMMETRIC   3 /* Rotating Parity 0 with Data Continuation */

Definition at line 471 of file raid5.h.

#define ALGORITHM_RIGHT_SYMMETRIC_6   19

Definition at line 504 of file raid5.h.

#define ALGORITHM_ROTATING_N_CONTINUE   10 /*DDF PRL=6 RLQ=3 */

Definition at line 493 of file raid5.h.

#define ALGORITHM_ROTATING_N_RESTART   9 /* DDF PRL=6 RLQ=2 */

Definition at line 492 of file raid5.h.

#define ALGORITHM_ROTATING_ZERO_RESTART   8 /* DDF PRL=6 RLQ=1 */

Definition at line 491 of file raid5.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
STRIPE_ACTIVE 
STRIPE_HANDLE 
STRIPE_SYNC_REQUESTED 
STRIPE_SYNCING 
STRIPE_INSYNC 
STRIPE_PREREAD_ACTIVE 
STRIPE_DELAYED 
STRIPE_DEGRADED 
STRIPE_BIT_DELAY 
STRIPE_EXPANDING 
STRIPE_EXPAND_SOURCE 
STRIPE_EXPAND_READY 
STRIPE_IO_STARTED 
STRIPE_FULL_WRITE 
STRIPE_BIOFILL_RUN 
STRIPE_COMPUTE_RUN 
STRIPE_OPS_REQ_PENDING 
STRIPE_ON_UNPLUG_LIST 

Definition at line 307 of file raid5.h.

anonymous enum
Enumerator:
STRIPE_OP_BIOFILL 
STRIPE_OP_COMPUTE_BLK 
STRIPE_OP_PREXOR 
STRIPE_OP_BIODRAIN 
STRIPE_OP_RECONSTRUCT 
STRIPE_OP_CHECK 

Definition at line 331 of file raid5.h.

enum check_states - handles syncing / repairing a stripe - check operations are quiesced - check operation is running - set outside lock when check result is valid - check failed and we are repairing - set outside lock when compute result is valid

Enumerator:
check_state_idle 
check_state_run 
check_state_run_q 
check_state_run_pq 
check_state_check_result 
check_state_compute_run 
check_state_compute_result 

Definition at line 174 of file raid5.h.

Enumerator:
R5_UPTODATE 
R5_LOCKED 
R5_DOUBLE_LOCKED 
R5_OVERWRITE 
R5_Insync 
R5_Wantread 
R5_Wantwrite 
R5_Overlap 
R5_ReadNoMerge 
R5_ReadError 
R5_ReWrite 
R5_Expanded 
R5_Wantcompute 
R5_Wantfill 
R5_Wantdrain 
R5_WantFUA 
R5_SyncIO 
R5_WriteError 
R5_MadeGood 
R5_ReadRepl 
R5_MadeGoodRepl 
R5_NeedReplace 
R5_WantReplace 
R5_Discard 

Definition at line 266 of file raid5.h.

enum reconstruct_states - handles writing or expanding a stripe

Enumerator:
reconstruct_state_idle 
reconstruct_state_prexor_drain_run 
reconstruct_state_drain_run 
reconstruct_state_run 
reconstruct_state_prexor_drain_result 
reconstruct_state_drain_result 
reconstruct_state_result 

Definition at line 187 of file raid5.h.

Function Documentation

int md_raid5_congested ( struct mddev mddev,
int  bits 
)

Definition at line 3774 of file raid5.c.

void md_raid5_kick_device ( struct r5conf conf)
int raid5_set_cache_size ( struct mddev mddev,
int  size 
)

Definition at line 4845 of file raid5.c.