mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
[PATCH] md: improve raid10 "IO Barrier" concept
raid10 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>
This commit is contained in:
parent
17999be4aa
commit
0a27ec96b6
2 changed files with 81 additions and 58 deletions
|
@ -39,11 +39,11 @@ struct r10_private_data_s {
|
|||
|
||||
spinlock_t resync_lock;
|
||||
int nr_pending;
|
||||
int nr_waiting;
|
||||
int barrier;
|
||||
sector_t next_resync;
|
||||
|
||||
wait_queue_head_t wait_idle;
|
||||
wait_queue_head_t wait_resume;
|
||||
wait_queue_head_t wait_barrier;
|
||||
|
||||
mempool_t *r10bio_pool;
|
||||
mempool_t *r10buf_pool;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue