md/r5cache: handle FLUSH and FUA
authorSong Liu <songliubraving@fb.com>
Sat, 19 Nov 2016 00:46:50 +0000 (16:46 -0800)
committerShaohua Li <shli@fb.com>
Sat, 19 Nov 2016 01:13:49 +0000 (17:13 -0800)
commit3bddb7f8f264ec58dc86e11ca97341c24f9d38f6
tree350e69ab8b594d2ce9eaa833e04294a939b8c044
parent5aabf7c49d9ebe54a318976276b187637177a03e
md/r5cache: handle FLUSH and FUA

With raid5 cache, we committing data from journal device. When
there is flush request, we need to flush journal device's cache.
This was not needed in raid5 journal, because we will flush the
journal before committing data to raid disks.

This is similar to FUA, except that we also need flush journal for
FUA. Otherwise, corruptions in earlier meta data will stop recovery
from reaching FUA data.

slightly changed the code by Shaohua

Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/raid5-cache.c
drivers/md/raid5.c
drivers/md/raid5.h