File: raid5.h

package info (click to toggle)
kernel-source-2.0.38 2.0.38-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 34,660 kB
  • ctags: 102,964
  • sloc: ansic: 632,204; asm: 26,444; makefile: 4,286; sh: 1,276; perl: 761; tcl: 408; cpp: 277; lisp: 211; awk: 134
file content (34 lines) | stat: -rw-r--r-- 642 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef _RAID5_H
#define _RAID5_H

#include <linux/md.h>
#include <asm/atomic.h>

struct disk_info {
	kdev_t	dev;
	int	operational;
	int	number;
	int	raid_disk;
};

struct raid5_data {
	struct md_dev		*mddev;
	struct md_thread	*thread;
	struct disk_info	disks[MD_SB_DISKS];
	int			buffer_size;
	int			chunk_size, level, algorithm;
	int			raid_disks, working_disks, failed_disks;
	int			sector_count;
	unsigned long		next_sector;
	atomic_t		nr_handle;
};

/*
 * Our supported algorithms
 */
#define ALGORITHM_LEFT_ASYMMETRIC	0
#define ALGORITHM_RIGHT_ASYMMETRIC	1
#define ALGORITHM_LEFT_SYMMETRIC	2
#define ALGORITHM_RIGHT_SYMMETRIC	3

#endif