diff options
author | Song Liu <songliubraving@fb.com> | 2017-11-19 22:17:01 -0800 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2017-12-11 08:52:34 -0800 |
commit | d5d885fd514fcebc9da5503c88aa0112df7514ef (patch) | |
tree | 71cf428b0bba2cf5c1afd32b8a32fc3ab5724708 /drivers/md/raid5-log.h | |
parent | 50c4c4e268a2d7a3e58ebb698ac74da0de40ae36 (diff) | |
download | op-kernel-dev-d5d885fd514fcebc9da5503c88aa0112df7514ef.zip op-kernel-dev-d5d885fd514fcebc9da5503c88aa0112df7514ef.tar.gz |
md: introduce new personality funciton start()
In do_md_run(), md threads should not wake up until the array is fully
initialized in md_run(). However, in raid5_run(), raid5-cache may wake
up mddev->thread to flush stripes that need to be written back. This
design doesn't break badly right now. But it could lead to bad bug in
the future.
This patch tries to resolve this problem by splitting start up work
into two personality functions, run() and start(). Tasks that do not
require the md threads should go into run(), while task that require
the md threads go into start().
r5l_load_log() is moved to raid5_start(), so it is not called until
the md threads are started in do_md_run().
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/raid5-log.h')
-rw-r--r-- | drivers/md/raid5-log.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/raid5-log.h b/drivers/md/raid5-log.h index 284578b..3860041 100644 --- a/drivers/md/raid5-log.h +++ b/drivers/md/raid5-log.h @@ -32,6 +32,7 @@ extern struct md_sysfs_entry r5c_journal_mode; extern void r5c_update_on_rdev_error(struct mddev *mddev, struct md_rdev *rdev); extern bool r5c_big_stripe_cached(struct r5conf *conf, sector_t sect); +extern int r5l_start(struct r5l_log *log); extern struct dma_async_tx_descriptor * ops_run_partial_parity(struct stripe_head *sh, struct raid5_percpu *percpu, |