]> git.baikalelectronics.ru Git - kernel.git/commit
md: introduce new personality funciton start()
authorSong Liu <songliubraving@fb.com>
Mon, 20 Nov 2017 06:17:01 +0000 (22:17 -0800)
committerShaohua Li <shli@fb.com>
Mon, 11 Dec 2017 16:52:34 +0000 (08:52 -0800)
commitf1360b4ab85303600b87f41cf66be2dce20e13eb
tree71cf428b0bba2cf5c1afd32b8a32fc3ab5724708
parentea68337e28b82c07e8a30cf1ca577c275fb830c6
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>
drivers/md/dm-raid.c
drivers/md/md.c
drivers/md/md.h
drivers/md/raid5-cache.c
drivers/md/raid5-log.h
drivers/md/raid5.c