git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
include
/
linux
/
raid
/
raid5.h
diff --git
a/include/linux/raid/raid5.h
b/include/linux/raid/raid5.h
index
baf88d2
..
914af66
100644
(file)
--- a/
include/linux/raid/raid5.h
+++ b/
include/linux/raid/raid5.h
@@
-126,7
+126,7
@@
*/
struct stripe_head {
*/
struct stripe_head {
- struct
stripe_head *hash_next, **hash_pprev; /* hash pointers */
+ struct
hlist_node hash;
struct list_head lru; /* inactive_list or handle_list */
struct raid5_private_data *raid_conf;
sector_t sector; /* sector of this row */
struct list_head lru; /* inactive_list or handle_list */
struct raid5_private_data *raid_conf;
sector_t sector; /* sector of this row */
@@
-134,6
+134,8
@@
struct stripe_head {
unsigned long state; /* state flags */
atomic_t count; /* nr of active thread/requests */
spinlock_t lock;
unsigned long state; /* state flags */
atomic_t count; /* nr of active thread/requests */
spinlock_t lock;
+ int bm_seq; /* sequence number for bitmap flushes */
+ int disks; /* disks in stripe */
struct r5dev {
struct bio req;
struct bio_vec vec;
struct r5dev {
struct bio req;
struct bio_vec vec;
@@
-151,8
+153,11
@@
struct stripe_head {
#define R5_Insync 3 /* rdev && rdev->in_sync at start */
#define R5_Wantread 4 /* want to schedule a read */
#define R5_Wantwrite 5
#define R5_Insync 3 /* rdev && rdev->in_sync at start */
#define R5_Wantread 4 /* want to schedule a read */
#define R5_Wantwrite 5
-#define R5_Syncio 6 /* this io need to be accounted as resync io */
+#define R5_Overlap 7 /* There is a pending overlapping request on this block */
+#define R5_ReadError 8 /* seen a read error here recently */
+#define R5_ReWrite 9 /* have tried to over-write the readerror */
+#define R5_Expanded 10 /* This block now has post-expand data */
/*
* Write method
*/
/*
* Write method
*/
@@
-164,13
+169,16
@@
struct stripe_head {
/*
* Stripe state
*/
/*
* Stripe state
*/
-#define STRIPE_ERROR 1
#define STRIPE_HANDLE 2
#define STRIPE_SYNCING 3
#define STRIPE_INSYNC 4
#define STRIPE_PREREAD_ACTIVE 5
#define STRIPE_DELAYED 6
#define STRIPE_HANDLE 2
#define STRIPE_SYNCING 3
#define STRIPE_INSYNC 4
#define STRIPE_PREREAD_ACTIVE 5
#define STRIPE_DELAYED 6
-
+#define STRIPE_DEGRADED 7
+#define STRIPE_BIT_DELAY 8
+#define STRIPE_EXPANDING 9
+#define STRIPE_EXPAND_SOURCE 10
+#define STRIPE_EXPAND_READY 11
/*
* Plugging:
*
/*
* Plugging:
*
@@
-200,30
+208,56
@@
struct disk_info {
};
struct raid5_private_data {
};
struct raid5_private_data {
- struct
stripe_head *
*stripe_hashtbl;
+ struct
hlist_head
*stripe_hashtbl;
mddev_t *mddev;
struct disk_info *spare;
int chunk_size, level, algorithm;
int raid_disks, working_disks, failed_disks;
int max_nr_stripes;
mddev_t *mddev;
struct disk_info *spare;
int chunk_size, level, algorithm;
int raid_disks, working_disks, failed_disks;
int max_nr_stripes;
+ /* used during an expand */
+ sector_t expand_progress; /* MaxSector when no expand happening */
+ sector_t expand_lo; /* from here up to expand_progress it out-of-bounds
+ * as we haven't flushed the metadata yet
+ */
+ int previous_raid_disks;
+
struct list_head handle_list; /* stripes needing handling */
struct list_head delayed_list; /* stripes that have plugged requests */
struct list_head handle_list; /* stripes needing handling */
struct list_head delayed_list; /* stripes that have plugged requests */
+ struct list_head bitmap_list; /* stripes delaying awaiting bitmap update */
atomic_t preread_active_stripes; /* stripes with scheduled io */
atomic_t preread_active_stripes; /* stripes with scheduled io */
- char cache_name[20];
+ atomic_t reshape_stripes; /* stripes with pending writes for reshape */
+ /* unfortunately we need two cache names as we temporarily have
+ * two caches.
+ */
+ int active_name;
+ char cache_name[2][20];
kmem_cache_t *slab_cache; /* for allocating stripes */
kmem_cache_t *slab_cache; /* for allocating stripes */
+
+ int seq_flush, seq_write;
+ int quiesce;
+
+ int fullsync; /* set to 1 if a full sync is needed,
+ * (fresh device added).
+ * Cleared when a sync completes.
+ */
+
+ struct page *spare_page; /* Used when checking P/Q in raid6 */
+
/*
* Free stripes pool
*/
atomic_t active_stripes;
struct list_head inactive_list;
wait_queue_head_t wait_for_stripe;
/*
* Free stripes pool
*/
atomic_t active_stripes;
struct list_head inactive_list;
wait_queue_head_t wait_for_stripe;
+ wait_queue_head_t wait_for_overlap;
int inactive_blocked; /* release of inactive stripes blocked,
* waiting for 25% to be free
int inactive_blocked; /* release of inactive stripes blocked,
* waiting for 25% to be free
- */
+ */
+ int pool_size; /* number of disks in stripeheads in pool */
spinlock_t device_lock;
spinlock_t device_lock;
- struct disk_info
disks[0]
;
+ struct disk_info
*disks
;
};
typedef struct raid5_private_data raid5_conf_t;
};
typedef struct raid5_private_data raid5_conf_t;