diff options
| author | NeilBrown <neilb@suse.de> | 2006-01-06 03:20:12 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:34:01 -0500 |
| commit | 17999be4aa408e7ff3b9d32c735649676567a3cd (patch) | |
| tree | 14f9fd4ef0299f16274ce2980baef7b96f111bea /include/linux/raid/raid1.h | |
| parent | ac81b2ee45eb811fdb0aa1cfb71d468d944d00ce (diff) | |
[PATCH] md: improve raid1 "IO Barrier" concept
raid1 needs to put up a barrier to new requests while it does resync or other
background recovery. The code for this is currently open-coded, slighty
obscure by its use of two waitqueues, and not documented.
This patch gathers all the related code into 4 functions, and includes a
comment which (hopefully) explains what is happening.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/raid/raid1.h')
| -rw-r--r-- | include/linux/raid/raid1.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/raid/raid1.h b/include/linux/raid/raid1.h index 292b98f2b408..c55674252533 100644 --- a/include/linux/raid/raid1.h +++ b/include/linux/raid/raid1.h | |||
| @@ -45,6 +45,7 @@ struct r1_private_data_s { | |||
| 45 | 45 | ||
| 46 | spinlock_t resync_lock; | 46 | spinlock_t resync_lock; |
| 47 | int nr_pending; | 47 | int nr_pending; |
| 48 | int nr_waiting; | ||
| 48 | int barrier; | 49 | int barrier; |
| 49 | sector_t next_resync; | 50 | sector_t next_resync; |
| 50 | int fullsync; /* set to 1 if a full sync is needed, | 51 | int fullsync; /* set to 1 if a full sync is needed, |
| @@ -52,8 +53,7 @@ struct r1_private_data_s { | |||
| 52 | * Cleared when a sync completes. | 53 | * Cleared when a sync completes. |
| 53 | */ | 54 | */ |
| 54 | 55 | ||
| 55 | wait_queue_head_t wait_idle; | 56 | wait_queue_head_t wait_barrier; |
| 56 | wait_queue_head_t wait_resume; | ||
| 57 | 57 | ||
| 58 | struct pool_info *poolinfo; | 58 | struct pool_info *poolinfo; |
| 59 | 59 | ||
