summaryrefslogtreecommitdiff
path: root/include/linux/raid
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2004-11-10 21:49:10 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-11-10 21:49:10 -0800
commitf5711563c37aa28daf75bf2ba99fbea2d5d52f1e (patch)
tree33362b71875ae8cd88c8f8add8a857bb369dd9a9 /include/linux/raid
parent854d7a6fa60eaa67ef26fb0559b01a2cfb2fbcae (diff)
[PATCH] md: "Faulty" personality
The 'faulty' personality provides a layer over any block device in which errors may be synthesised. A variety of errors are possible including transient and persistent read and write errors, and read errors that persist until the next write. There error mode can be changed on a live array. Accessing this personality requires mdadm 2.8.0 or later. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/raid')
-rw-r--r--include/linux/raid/md_k.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index 945346ec2c10..c9a0d4013be7 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -25,10 +25,12 @@
#define MULTIPATH 7UL
#define RAID6 8UL
#define RAID10 9UL
-#define MAX_PERSONALITY 10UL
+#define FAULTY 10UL
+#define MAX_PERSONALITY 11UL
#define LEVEL_MULTIPATH (-4)
#define LEVEL_LINEAR (-1)
+#define LEVEL_FAULTY (-5)
#define MaxSector (~(sector_t)0)
#define MD_THREAD_NAME_MAX 14
@@ -36,6 +38,7 @@
static inline int pers_to_level (int pers)
{
switch (pers) {
+ case FAULTY: return LEVEL_FAULTY;
case MULTIPATH: return LEVEL_MULTIPATH;
case HSM: return -3;
case TRANSLUCENT: return -2;
@@ -53,6 +56,7 @@ static inline int pers_to_level (int pers)
static inline int level_to_pers (int level)
{
switch (level) {
+ case LEVEL_FAULTY: return FAULTY;
case LEVEL_MULTIPATH: return MULTIPATH;
case -3: return HSM;
case -2: return TRANSLUCENT;
@@ -290,6 +294,7 @@ struct mdk_personality_s
int (*sync_request)(mddev_t *mddev, sector_t sector_nr, int go_faster);
int (*resize) (mddev_t *mddev, sector_t sectors);
int (*reshape) (mddev_t *mddev, int raid_disks);
+ int (*reconfig) (mddev_t *mddev, int layout, int chunk_size);
};