md/raid5-cache: clear MD_SB_CHANGE_PENDING before flushing stripes
authorSong Liu <songliubraving@fb.com>
Mon, 6 Jul 2020 21:57:32 +0000 (14:57 -0700)
committerSong Liu <songliubraving@fb.com>
Wed, 15 Jul 2020 06:01:31 +0000 (23:01 -0700)
commitc9020e64cf33f2dd5b2a7295f2bfea787279218a
treeaec0586fc3450a91410ce822972a21048113ea33
parente1a86dbbbd6a77f73c3d099030495fa31f181e2f
md/raid5-cache: clear MD_SB_CHANGE_PENDING before flushing stripes

In recovery, if we process too much data, raid5-cache may set
MD_SB_CHANGE_PENDING, which causes spinning in handle_stripe().
Fix this issue by clearing the bit before flushing data only
stripes. This issue was initially discussed in [1].

[1] https://www.spinics.net/lists/raid/msg64409.html

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