diff options
| author | Neil Brown <neilb@cse.unsw.edu.au> | 2002-06-18 04:21:49 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-06-18 04:21:49 -0700 |
| commit | 86711d5ed6932fe71188d0c66605e00d021cafd9 (patch) | |
| tree | 36ddddaf6f3b045bf152674d55a384d0139b0ff7 /include/linux/raid/md.h | |
| parent | 7444c7185d2d8735a7f9d7db1e73523577365dc0 (diff) | |
[PATCH] md 22 of 22 - Generalise md sync threads
Previously each raid personality (Well, 1 and 5) started their
own thread to do resync, but md.c had a single common thread to do
reconstruct. Apart from being untidy, this means that you cannot
have two arrays reconstructing at the same time, though you can have
to array resyncing at the same time..
This patch changes the personalities so they don't start the resync,
but just leave a flag to say that it is needed.
The common thread (mdrecoveryd) now just monitors things and starts a
separate per-array thread whenever resync or recovery (or both) is
needed.
When the recovery finishes, mdrecoveryd will be woken up to re-lock
the device and activate the spares or whatever.
raid1 needs to know when resync/recovery starts and ends so it can
allocate and release resources.
It allocated when a resync request for stripe 0 is received.
Previously it deallocated for resync in it's own thread, and
deallocated for recovery when the spare is made active or inactive
(depending on success).
As raid1 doesn't own a thread anymore this needed to change. So to
match the "alloc on 0", the md_do_resync now calls sync_request one
last time asking to sync one block past the end. This is a signal to
release any resources.
Diffstat (limited to 'include/linux/raid/md.h')
| -rw-r--r-- | include/linux/raid/md.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h index adcff3f86295..19ebeb0a4988 100644 --- a/include/linux/raid/md.h +++ b/include/linux/raid/md.h @@ -76,12 +76,8 @@ extern void md_unregister_thread (mdk_thread_t *thread); extern void md_wakeup_thread(mdk_thread_t *thread); extern void md_interrupt_thread (mdk_thread_t *thread); extern void md_update_sb (mddev_t *mddev); -extern int md_do_sync(mddev_t *mddev, mdp_disk_t *spare); extern void md_done_sync(mddev_t *mddev, int blocks, int ok); extern void md_sync_acct(kdev_t dev, unsigned long nr_sectors); -extern void md_recover_arrays (void); -extern int md_notify_reboot(struct notifier_block *this, - unsigned long code, void *x); extern int md_error (mddev_t *mddev, struct block_device *bdev); extern int md_run_setup(void); |
