diff options
author | NeilBrown <neilb@cse.unsw.edu.au> | 2005-06-21 20:17:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-21 22:07:46 -0400 |
commit | 191ea9b2c7cc3ebbe0678834ab710d7d95ad3f9a (patch) | |
tree | 25ccd0d191742f4e25f37784370520d254aacc12 /include/linux/raid | |
parent | aa3163f81654fa057039258e32a6811147bf0c14 (diff) |
[PATCH] md: raid1 support for bitmap intent logging
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/raid1.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/linux/raid/raid1.h b/include/linux/raid/raid1.h index abbfdd9afe1e..9d93cf12e890 100644 --- a/include/linux/raid/raid1.h +++ b/include/linux/raid/raid1.h | |||
@@ -36,12 +36,21 @@ struct r1_private_data_s { | |||
36 | spinlock_t device_lock; | 36 | spinlock_t device_lock; |
37 | 37 | ||
38 | struct list_head retry_list; | 38 | struct list_head retry_list; |
39 | /* queue pending writes and submit them on unplug */ | ||
40 | struct bio_list pending_bio_list; | ||
41 | /* queue of writes that have been unplugged */ | ||
42 | struct bio_list flushing_bio_list; | ||
43 | |||
39 | /* for use when syncing mirrors: */ | 44 | /* for use when syncing mirrors: */ |
40 | 45 | ||
41 | spinlock_t resync_lock; | 46 | spinlock_t resync_lock; |
42 | int nr_pending; | 47 | int nr_pending; |
43 | int barrier; | 48 | int barrier; |
44 | sector_t next_resync; | 49 | sector_t next_resync; |
50 | int fullsync; /* set to 1 if a full sync is needed, | ||
51 | * (fresh device added). | ||
52 | * Cleared when a sync completes. | ||
53 | */ | ||
45 | 54 | ||
46 | wait_queue_head_t wait_idle; | 55 | wait_queue_head_t wait_idle; |
47 | wait_queue_head_t wait_resume; | 56 | wait_queue_head_t wait_resume; |
@@ -85,14 +94,17 @@ struct r1bio_s { | |||
85 | int read_disk; | 94 | int read_disk; |
86 | 95 | ||
87 | struct list_head retry_list; | 96 | struct list_head retry_list; |
97 | struct bitmap_update *bitmap_update; | ||
88 | /* | 98 | /* |
89 | * if the IO is in WRITE direction, then multiple bios are used. | 99 | * if the IO is in WRITE direction, then multiple bios are used. |
90 | * We choose the number when they are allocated. | 100 | * We choose the number when they are allocated. |
91 | */ | 101 | */ |
92 | struct bio *bios[0]; | 102 | struct bio *bios[0]; |
103 | /* DO NOT PUT ANY NEW FIELDS HERE - bios array is contiguously alloced*/ | ||
93 | }; | 104 | }; |
94 | 105 | ||
95 | /* bits for r1bio.state */ | 106 | /* bits for r1bio.state */ |
96 | #define R1BIO_Uptodate 0 | 107 | #define R1BIO_Uptodate 0 |
97 | #define R1BIO_IsSync 1 | 108 | #define R1BIO_IsSync 1 |
109 | #define R1BIO_Degraded 2 | ||
98 | #endif | 110 | #endif |