File: raid0.h

package info (click to toggle)
kernel-source-2.4.27 2.4.27-10sarge5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 191,224 kB
  • ctags: 610,077
  • sloc: ansic: 3,299,602; asm: 164,708; makefile: 10,962; sh: 3,725; perl: 2,273; yacc: 1,651; cpp: 820; lex: 752; tcl: 577; awk: 251; lisp: 218; sed: 79
file content (33 lines) | stat: -rw-r--r-- 747 bytes parent folder | download | duplicates (9)
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
#ifndef _RAID0_H
#define _RAID0_H

#include <linux/raid/md.h>

struct strip_zone
{
	unsigned long zone_offset;	/* Zone offset in md_dev */
	unsigned long dev_offset;	/* Zone offset in real dev */
	unsigned long size;		/* Zone size */
	int nb_dev;			/* # of devices attached to the zone */
	mdk_rdev_t *dev[MD_SB_DISKS]; /* Devices attached to the zone */
};

struct raid0_hash
{
	struct strip_zone *zone0, *zone1;
};

struct raid0_private_data
{
	struct raid0_hash *hash_table; /* Dynamically allocated */
	struct strip_zone *strip_zone; /* This one too */
	int nr_strip_zones;
	struct strip_zone *smallest;
	int nr_zones;
};

typedef struct raid0_private_data raid0_conf_t;

#define mddev_to_conf(mddev) ((raid0_conf_t *) mddev->private)

#endif