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

Go to the source code of this file.

Data Structures

struct  raid_template
 
struct  raid_function_template
 
struct  raid_data
 

Macros

#define RAID_MAX_RESYNC   (10000)
 
#define DEFINE_RAID_ATTRIBUTE(type, attr)
 

Enumerations

enum  raid_state {
  RAID_STATE_UNKNOWN = 0, RAID_STATE_ACTIVE, RAID_STATE_DEGRADED, RAID_STATE_RESYNCING,
  RAID_STATE_OFFLINE
}
 
enum  raid_level {
  RAID_LEVEL_UNKNOWN = 0, RAID_LEVEL_LINEAR, RAID_LEVEL_0, RAID_LEVEL_1,
  RAID_LEVEL_10, RAID_LEVEL_1E, RAID_LEVEL_3, RAID_LEVEL_4,
  RAID_LEVEL_5, RAID_LEVEL_50, RAID_LEVEL_6
}
 

Functions

struct raid_templateraid_class_attach (struct raid_function_template *)
 
void raid_class_release (struct raid_template *)
 
int __must_check raid_component_add (struct raid_template *, struct device *, struct device *)
 

Macro Definition Documentation

#define DEFINE_RAID_ATTRIBUTE (   type,
  attr 
)
Value:
static inline void \
raid_set_##attr(struct raid_template *r, struct device *dev, type value) { \
attribute_container_find_class_device(&r->raid_attrs.ac, dev);\
BUG_ON(!device); \
rd = dev_get_drvdata(device); \
rd->attr = value; \
} \
static inline type \
raid_get_##attr(struct raid_template *r, struct device *dev) { \
attribute_container_find_class_device(&r->raid_attrs.ac, dev);\
BUG_ON(!device); \
rd = dev_get_drvdata(device); \
return rd->attr; \
}

Definition at line 54 of file raid_class.h.

#define RAID_MAX_RESYNC   (10000)

Definition at line 52 of file raid_class.h.

Enumeration Type Documentation

enum raid_level
Enumerator:
RAID_LEVEL_UNKNOWN 
RAID_LEVEL_LINEAR 
RAID_LEVEL_0 
RAID_LEVEL_1 
RAID_LEVEL_10 
RAID_LEVEL_1E 
RAID_LEVEL_3 
RAID_LEVEL_4 
RAID_LEVEL_5 
RAID_LEVEL_50 
RAID_LEVEL_6 

Definition at line 29 of file raid_class.h.

enum raid_state
Enumerator:
RAID_STATE_UNKNOWN 
RAID_STATE_ACTIVE 
RAID_STATE_DEGRADED 
RAID_STATE_RESYNCING 
RAID_STATE_OFFLINE 

Definition at line 21 of file raid_class.h.

Function Documentation

struct raid_template* raid_class_attach ( struct raid_function_template )
read

Definition at line 262 of file raid_class.c.

void raid_class_release ( struct raid_template )

Definition at line 291 of file raid_class.c.

int __must_check raid_component_add ( struct raid_template ,
struct device ,
struct device  
)

Definition at line 223 of file raid_class.c.